Created attachment 132876 [details] Demonstration announced in the original bug report {=MATCH($E3;$C$3:$C$11;-1)} e.g. is returning the correct result even if it is unnecessarily entered for array evaluation. {=MATCH($E3;0+$B$3:$B$11;-1)} returns the position of the wrong end if the SearchVector is containing a group of equal values determining the match. In the attached example this is demonstrated for the case that C3:C11 is calculated by exactly the same trivial array formula provoking the error if directly passed to MATCH. The bug may have sparse gray hair, and the demonstrated case is not realistic. There ARE applications of some interest, and it's a bug anyway.
The issue with your second formula is the use of '0+' as array modification, with a modification different than '0', or with any other modification or a clean array works fine for me. So it can be a trick way to get the reverse behavior.
(In reply to m.a.riosv from comment #1) > The issue with your second formula is the use of '0+' as array modification, > with a modification different than '0', or with any other modification or a > clean array works fine for me. > > So it can be a trick way to get the reverse behavior. Who should have decided to establish that "trick way"? Where is it specified? Of course, the "0+" is only the extreme simplification of what I had originally when I discovered the bug. There are also relevant formulas resulting in arrays to pass to MATCH in the second place. In fact I discovered the bug when I tried to get a REVERSE MATCH against an ascending column-array by something like {=MATCH(Value;INDEX($B$1:$B$10;ROW($B$10)-ROW($B$1:$B$10)+1;1);-1)} I did not find too easily the way back to the root of the bug: making a difference between an array referenced directly and one with the identical elements calculated in the parameter position where it's used. The bug is from ancient days and seemingly was not reported all the time. It's a bug nonetheless. And it may e.g. throw light on a flaw in the design of the code concerned with array evaluation generally. It may also be an isolated problem with MATCH.
Created attachment 132971 [details] Sample file N(In reply to Wolfgang Jäger from comment #2) > (In reply to m.a.riosv from comment #1) > > So it can be a trick way to get the reverse behavior. > > Who should have decided to establish that "trick way"? Where is it specified? I didn't say that. I have done a new sample, where to seems the issue is the -1 for third MATCH parameter. But it happens with a modified 'Reference|Array SearchRegion', what I am not sure it is allowed in the specification, at least explicitly. http://docs.oasis-open.org/office/v1.2/csd06/OpenDocument-v1.2-csd06-part2.pdf page 133. Syntax: MATCH(Scalar Search ;Reference|Array SearchRegion [;Integer MatchType = 1 ] Hi @Eike, @Winfried some light.
(In reply to m.a.riosv from comment #3) > I have done a new sample, where to seems the issue is the -1 for third MATCH > parameter. Ack. See subject. However, I wouldn't see the -1 as the issue but as a condition for its incidence. > But it happens with a modified 'Reference|Array SearchRegion', what I am not > sure it is allowed in the specification, at least explicitly. What do you think is the rationale for the alternative "Reference|Array" given in the type position for the parameter SearchRange. We shouldn't get deceived by the slightly misleading name. Parameter names are arbitrary basically. However, type names used somewhere should be defined in advance. In fact there is an issue with subchapter 4.10 of the document you mentioned. It reads as if "Array" is synonym with something like "Range" or "RangeReference". The implemented functions concerned accept Calculated Arrays anyway), and I assume this to be the intention of OpenDocument V1.2 part 2, too. A different interpretation would make powerless toys of some functions. Is there a draft for a next version of odf (recalc) concerning this?
(In reply to Wolfgang Jäger from comment #4) >.............. > For me, if it is not explicit, it's not explicit, and I can't interpreter as I like. Even I think I understand your interpretation, that sounds reasonable. > Is there a draft for a next version of odf (recalc) concerning this? https://www.oasis-open.org/committees/document.php?document_id=51469&wg_abbrev=office-collab In any case testing with a inner array gives what seems an erroneous result =MATCH(5;{20;19;18;17;16;15;14;13;12;11;10;6;6;5;5;4;4;3;2;1};-1) = 14 1 2 3 4 5 6 7 8 9 10 1 2 3 4 5 6 7 8 9 20 If I'm not wrong result should be 15 as happens with an unmodified address array.
** Please read this message in its entirety before responding ** To make sure we're focusing on the bugs that affect our users today, LibreOffice QA is asking bug reporters and confirmers to retest open, confirmed bugs which have not been touched for over a year. There have been thousands of bug fixes and commits since anyone checked on this bug report. During that time, it's possible that the bug has been fixed, or the details of the problem have changed. We'd really appreciate your help in getting confirmation that the bug is still present. If you have time, please do the following: Test to see if the bug is still present with the latest version of LibreOffice from https://www.libreoffice.org/download/ If the bug is present, please leave a comment that includes the information from Help - About LibreOffice. If the bug is NOT present, please set the bug's Status field to RESOLVED-WORKSFORME and leave a comment that includes the information from Help - About LibreOffice. Please DO NOT Update the version field Reply via email (please reply directly on the bug tracker) Set the bug's Status field to RESOLVED - FIXED (this status has a particular meaning that is not appropriate in this case) If you want to do more to help you can test to see if your issue is a REGRESSION. To do so: 1. Download and install oldest version of LibreOffice (usually 3.3 unless your bug pertains to a feature added after 3.3) from http://downloadarchive.documentfoundation.org/libreoffice/old/ 2. Test your bug 3. Leave a comment with your results. 4a. If the bug was present with 3.3 - set version to 'inherited from OOo'; 4b. If the bug was not present in 3.3 - add 'regression' to keyword Feel free to come ask questions or to say hello in our QA chat: https://kiwiirc.com/nextclient/irc.freenode.net/#libreoffice-qa Thank you for helping us make LibreOffice even better for everyone! Warm Regards, QA Team MassPing-UntouchedBug
Eike Rathke committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/core/commit/6f80e2d37ce11e3ea728b7ce5987f912fdfa60b3 Resolves: tdf#107459 MATCH() in descending sorted array find last equal value It will be available in 7.1.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.
Pending review https://gerrit.libreoffice.org/c/core/+/102428 for 7-0
Eike Rathke committed a patch related to this issue. It has been pushed to "libreoffice-7-0": https://git.libreoffice.org/core/commit/181c737d5f2ed3718612dcafeaf458f5f147ce89 Resolves: tdf#107459 MATCH() in descending sorted array find last equal value It will be available in 7.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.
Xisco Fauli committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/core/commit/a4a6594b6475ef2e397852862ec120e33350b352 tdf#107459: sc_ucalc: Add unittest It will be available in 7.1.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.
Xisco Fauli committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/core/commit/ce507a14c551b9d2ce64c5cf1580431bb04b01a0 tdf#107459: move unittest to function test It will be available in 7.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.