You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[BUG] match function allows any constant as field name. #613
What is the bug?
The following queries are accepted by the SQL endpoint: SELECT * FROM index WHERE MATCH(-3.14, "query") SELECT * FROM index WHERE MATCH(interval 3 second, "query")
PPL endpoint is equally permissive.
What is the expected behavior?
SQL and PPL engines should only accept valid identifiers as field parameter of MATCH.
If the specified field does not exist, the user should receive the same error as they would if the field was used in SELECT clause.
This should be consistent across all single-field query functions described in #182.
The error comes from parser (ANTLR).
Actually, it fails on V2 engine, then in V1 and this error comes from V1.
The error aggregation and reporting is reworked in scope of #691. The error itself remains the same and it is not too verbose.
The error comes from parser (ANTLR). Actually, it fails on V2 engine, then in V1 and this error comes from V1. The error aggregation and reporting is reworked in scope of #691. The error itself remains the same and it is not too verbose.
I see. Probably because only identifier is allowed as first argument in v2, it fallback to legacy. This may go away when legacy is deprecated. Thanks
Activity
dai-chen commentedon Aug 9, 2022
Wondering if this is already fixed in latest support for MATCH in SQL engine v2?
Yury-Fridlyand commentedon Aug 9, 2022
Just tested on one of the latest builds:
dai-chen commentedon Aug 9, 2022
Thanks for the quick test! The query is rejected now but the syntax error seems unexpected? Or is just the message not accurate?
Yury-Fridlyand commentedon Aug 9, 2022
The error comes from parser (ANTLR).
Actually, it fails on V2 engine, then in V1 and this error comes from V1.
The error aggregation and reporting is reworked in scope of #691. The error itself remains the same and it is not too verbose.
dai-chen commentedon Aug 30, 2022
I see. Probably because only identifier is allowed as first argument in v2, it fallback to legacy. This may go away when legacy is deprecated. Thanks
dai-chen commentedon Jan 20, 2023
Can we close this now?
forestmvey commentedon Jan 23, 2023
Yes this was fixed under #1067.