Bug 161964 - MATCH function doesn't work with Type=0.
Summary: MATCH function doesn't work with Type=0.
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
24.8.0.0 beta1+
Hardware: All All
: medium critical
Assignee: Balázs Varga (allotropia)
URL:
Whiteboard: target:25.2.0 target:24.8.0.2
Keywords: bibisected, bisected, regression
Depends on:
Blocks: Excel-Functions
  Show dependency treegraph
 
Reported: 2024-07-09 09:49 UTC by m_a_riosv
Modified: 2024-07-11 19:25 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
Sample file showing the issue. (20.29 KB, application/vnd.oasis.opendocument.spreadsheet)
2024-07-09 09:49 UTC, m_a_riosv
Details

Note You need to log in before you can comment on or make changes to this bug.
Description m_a_riosv 2024-07-09 09:49:12 UTC
Created attachment 195180 [details]
Sample file showing the issue.

MATCH function doesn't work with Type=0.

Only when searching for the first value in the searched array, it works.

Reproducible with
Version: 24.8.0.0.beta1 (X86_64) / LibreOffice Community
Build ID: 318462181c709ed29c01eb3239b4d600d7b82ecc
CPU threads: 16; OS: Windows 11 X86_64 (10.0 build 22631); UI render: Skia/Vulkan; VCL: win
Locale: es-ES (es_ES); UI: en-US
Calc: CL threaded
and
Version: 25.2.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 7a5d0c413f37e02356d0bd1e1da7a9445ee25fe8
CPU threads: 16; OS: Windows 11 X86_64 (10.0 build 22631); UI render: Skia/Raster; VCL: win
Locale: es-ES (es_ES); UI: en-US
Calc: CL threaded

Regressopm. works fine with:
Version: 24.8.0.0.beta1 (X86_64) / LibreOffice Community
Build ID: 318462181c709ed29c01eb3239b4d600d7b82ecc
CPU threads: 16; OS: Windows 11 X86_64 (10.0 build 22631); UI render: Skia/Vulkan; VCL: win
Locale: es-ES (es_ES); UI: en-US
Calc: CL threaded
Comment 1 Xisco Faulí 2024-07-09 10:26:43 UTC
Regression introduced by:

author	Balazs Varga <balazs.varga.extern@allotropia.de>	2024-04-26 16:27:43 +0200
committer	Balazs Varga <balazs.varga.extern@allotropia.de>	2024-05-01 20:32:17 +0200
commit 85f733a9242339d8e92f992ff1ad6d1b99d3f383 (patch)
tree 618f865d2777476ad42e7f45e35a10da27a6b0ec
parent b265b547b9e09893187aab0aa1085ba51c43563b (diff)
Related: tdf#160725 - Add horizontal binary search mode for SortedCache

Bisected with: bibisect-linux64-24.8
Comment 2 ady 2024-07-09 12:31:34 UTC
The problem seems to be the only-row reference:
$1:$1

when type=0.

Replacing $1:$1 with a column+row reference such as $A$1:$D$1 (or $A1:$D1, or...), the formula works.

To be clear, I'm not saying that the $1:$1 reference is wrong (although, Calc has a history of problems with this type of references). I am just pointing to a symptom that potentially shows where the problem lies.
Comment 3 Commit Notification 2024-07-10 06:48:20 UTC
Balazs Varga committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/46d55cf7960ecea3bc8af29f7a05159e5979c3ac

tdf#161964 - sc Fix Lookup functions error with only-row reference

It will be available in 25.2.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 4 Commit Notification 2024-07-11 16:04:05 UTC
Balazs Varga committed a patch related to this issue.
It has been pushed to "libreoffice-24-8":

https://git.libreoffice.org/core/commit/f649a02ab6556c4cd404b7acf5a9d50c2c4582a6

tdf#161964 - sc Fix Lookup functions error with only-row reference

It will be available in 24.8.0.2.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 5 m_a_riosv 2024-07-11 19:25:19 UTC
Version: 25.2.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 37217909f2e7c042eab9a8b5eb1ab0a88cdda513
CPU threads: 16; OS: Windows 11 X86_64 (10.0 build 22631); UI render: Skia/Raster; VCL: win
Locale: es-ES (es_ES); UI: en-US
Calc: CL threaded