ES|QL: Handle multi values in FUSE#135448
Merged
ioanatia merged 5 commits intoelastic:mainfrom Sep 26, 2025
Merged
Conversation
ioanatia
commented
Sep 25, 2025
Comment on lines
+335
to
+336
| int scorePosition = layout.get(fuse.score().id()).channel(); | ||
| int discriminatorPosition = layout.get(fuse.discriminator().id()).channel(); |
Member
Author
There was a problem hiding this comment.
this is actually the canonical way to get the position of the block representing the values of an attribute 🙈 .
Collaborator
|
Pinging @elastic/es-search-relevance (Team:Search Relevance) |
carlosdelest
approved these changes
Sep 26, 2025
Member
carlosdelest
left a comment
There was a problem hiding this comment.
LGTM 👍
Fun with MultiValues and NULLs!
| ; | ||
|
|
||
| warning:Line 6:3: evaluation of [FUSE LINEAR SCORE BY my_score GROUP BY my_fork] failed, treating result as null. Only first 20 failures recorded. | ||
| warning:Line 6:3: java.lang.IllegalArgumentException: group column contains multivalued entries; assigning null scores |
Member
There was a problem hiding this comment.
Can we get rid of the java.lang.IllegalArgumentException in the warning? I don't think it provides additional info to users
Member
Author
There was a problem hiding this comment.
That's a good point, I am not sure, I just followed what we already have - there are many examples of warnings that include IllegalArgumentException, some examples:
660:x-pack/plugin/esql/qa/testFixtures/src/main/resources/union_types.csv-spec:warningRegex:java.lang.IllegalArgumentException: milliSeconds \[-1457696696640\] are before the epoch in 1970 and cannot be converted to nanoseconds
662:x-pack/plugin/esql/qa/testFixtures/src/main/resources/union_types.csv-spec:warningRegex:java.lang.IllegalArgumentException: milliSeconds \[-1457696696640\] are before the epoch in 1970 and cannot be converted to nanoseconds
664:x-pack/plugin/esql/qa/testFixtures/src/main/resources/union_types.csv-spec:warningRegex:java.lang.IllegalArgumentException: milliSeconds \[-1457696696640\] are before the epoch in 1970 and cannot be converted to nanoseconds
666:x-pack/plugin/esql/qa/testFixtures/src/main/resources/union_types.csv-spec:warningRegex:java.lang.IllegalArgumentException: milliSeconds \[-1457696696640\] are before the epoch in 1970 and cannot be converted to nanoseconds
668:x-pack/plugin/esql/qa/testFixtures/src/main/resources/union_types.csv-spec:warningRegex:java.lang.IllegalArgumentException: milliSeconds \[-1457696696640\] are before the epoch in 1970 and cannot be converted to nanoseconds
670:x-pack/plugin/esql/qa/testFixtures/src/main/resources/union_types.csv-spec:warningRegex:java.lang.IllegalArgumentException: milliSeconds \[-1457696696640\] are before the epoch in 1970 and cannot be converted to nanoseconds
674:x-pack/plugin/esql/qa/testFixtures/src/main/resources/unsigned_long.csv-spec:warningRegex:java.lang.IllegalArgumentException: single-value function encountered multi-value
676:x-pack/plugin/esql/qa/testFixtures/src/main/resources/unsigned_long.csv-spec:warningRegex:java.lang.IllegalArgumentException: single-value function encountered multi-value
678:x-pack/plugin/esql/qa/testFixtures/src/main/resources/unsigned_long.csv-spec:warningRegex:java.lang.IllegalArgumentException: single-value function encountered multi-value
680:x-pack/plugin/esql/qa/testFixtures/src/main/resources/unsigned_long.csv-spec:warningRegex:java.lang.IllegalArgumentException: single-value function encountered multi-value
682:x-pack/plugin/esql/qa/testFixtures/src/main/resources/unsigned_long.csv-spec:warningRegex:java.lang.IllegalArgumentException: single-value function encountered multi-value
684:x-pack/plugin/esql/qa/testFixtures/src/main/resources/unsigned_long.csv-spec:warningRegex:java.lang.IllegalArgumentException: single-value function encountered multi-value
686:x-pack/plugin/esql/qa/testFixtures/src/main/resources/unsigned_long.csv-spec:warningRegex:java.lang.IllegalArgumentException: single-value function encountered multi-value
688:x-pack/plugin/esql/qa/testFixtures/src/main/resources/unsigned_long.csv-spec:warningRegex:java.lang.IllegalArgumentException: single-value function encountered multi-value
690:x-pack/plugin/esql/qa/testFixtures/src/main/resources/unsigned_long.csv-spec:warningRegex:java.lang.IllegalArgumentException: single-value function encountered multi-value
692:x-pack/plugin/esql/qa/testFixtures/src/main/resources/where-like.csv-spec:warningRegex:java.lang.IllegalArgumentException: single-value function encountered multi-value
694:x-pack/plugin/esql/qa/testFixtures/src/main/resources/where-like.csv-spec:warningRegex:java.lang.IllegalArgumentException: single-value function encountered multi-value
I think removing it might require us changing all the existing warning messages.
17 tasks
szybia
added a commit
to szybia/elasticsearch
that referenced
this pull request
Sep 26, 2025
…-dls
* upstream/main: (55 commits)
Mute org.elasticsearch.upgrades.MatchOnlyTextRollingUpgradeIT testIndexing {upgradedNodes=1} elastic#135525
Address es819 tsdb doc values format performance bug (elastic#135505)
Remove obsolete --add-opens from JDK API extractor tool (elastic#135445)
[CI] Fix MergeWithFailureIT (elastic#135447)
Increase wait time in AdaptiveAllocationsScalerServiceTests (elastic#135510)
ES|QL: Handle multi values in FUSE (elastic#135448)
Mute org.elasticsearch.upgrades.SyntheticSourceRollingUpgradeIT testIndexing {upgradedNodes=1} elastic#135512
Add trust configuration for cross cluster api keys (elastic#134893)
ESQL: Fix flakiness in SessionUtilsTests (elastic#135375)
Mute org.elasticsearch.upgrades.LogsdbIndexingRollingUpgradeIT testIndexing {upgradedNodes=1} elastic#135511
Mute org.elasticsearch.upgrades.MatchOnlyTextRollingUpgradeIT testIndexing {upgradedNodes=2} elastic#135325
Require all functions to provide examples (elastic#135094)
Mute org.elasticsearch.upgrades.SyntheticSourceRollingUpgradeIT testIndexing {upgradedNodes=2} elastic#135344
Mute org.elasticsearch.upgrades.TextRollingUpgradeIT testIndexing {upgradedNodes=1} elastic#135236
Mute org.elasticsearch.upgrades.TextRollingUpgradeIT testIndexing {upgradedNodes=2} elastic#135238
Mute org.elasticsearch.upgrades.LogsdbIndexingRollingUpgradeIT testIndexing {upgradedNodes=2} elastic#135327
Mute org.elasticsearch.upgrades.MatchOnlyTextRollingUpgradeIT testIndexing {upgradedNodes=3} elastic#135324
Mute org.elasticsearch.upgrades.StandardToLogsDbIndexModeRollingUpgradeIT testLogsIndexing {upgradedNodes=3} elastic#135315
ESQL: Handle right hand side of Inline Stats coming optimized with LocalRelation shortcut (elastic#135011)
Mute org.elasticsearch.upgrades.TextRollingUpgradeIT testIndexing {upgradedNodes=3} elastic#135237
...
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
tracked by #123389
Handles the case where the score column or the group column (_fork) has multi values.
In this case, we cannot properly assign a score value, so we assign a score value of null.
We also issue a warning header when we encounter this case.
This is consistent with what other commands or functions are doing.
I based a lot of the multi values handling implementation on the
ChangePointOperator.There is still the case where the key columns have multi values.
I have not included that here, since this proves to be a bit more tricky to handle and it's directly tied to how STATS handles grouping by multi valued columns.