Description
SET unmapped_fields="nullify";
from airports
| sort city
| where qstr("country:test")
| stats min(unmapped_field_baz)
results in
[QSTR] function cannot be used after SORT",
"stack_trace": "org.elasticsearch.xpack.esql.VerificationException: Found 1 problem
line 5:3: [QSTR] function cannot be used after SORT
at org.elasticsearch.xpack.esql.analysis.Analyzer.verify(Analyzer.java:280)
at org.elasticsearch.xpack.esql.analysis.Analyzer.analyze(Analyzer.java:274)
If stats is on an existent field, then things are resulting in an error.
Quickly checking the code at FullTextFunction.checkFullTextQueryFunctionForCondition a SORT command should be ok before QSTR command under unrelated conditions. But the query above should be ok for QSTR usage.
Description
results in
If
statsis on an existent field, then things are resulting in an error.Quickly checking the code at
FullTextFunction.checkFullTextQueryFunctionForConditionaSORTcommand should be ok before QSTR command under unrelated conditions. But the query above should be ok for QSTR usage.