[8.x] [ES|QL] Deep check if CHANGE_POINT ON option has any contents (#216093)#216136
Merged
kibanamachine merged 2 commits intoelastic:8.xfrom Mar 31, 2025
Merged
Conversation
…astic#216093) ## Summary When `ON` option in `CHANGE_POINT` has no value, it is invalid syntax according ANTLR grammar. However, ANTLR does not fail but succeeds and returns a column name, which is an empty string. Hence, in the past we created an `ON` option with an empty column name, but marked as `incomplete: true`, beucause ANTLR at least told us that. <img width="295" alt="Screenshot 2025-03-26 at 18 13 32" src="https://github.com/user-attachments/assets/b5fd4512-04a2-48b3-b874-1ea35a3c7e84" /> All of the above, IMO, relies on the ANTLR's behavior of trying to parse even invalid input, and mark some nodes with exception. This behavior is somewhat a "black box", not something we should rely on, as ANTLR will be able to parse or not invalid input depending on the complexity of the grammar rule at hand, and the rules themselves change over time. Hence, better and more consistent, to not mark nodes as `incomplete` but not generate the `ON` option altogether. This PR does a deep check, simple string check, to see if there is anything in the `ON` option at all, if not, it does not generate it. ### Checklist - [x] [Unit or functional tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html) were updated or added to match the most common scenarios (cherry picked from commit f7d8bc3)
1 task
Contributor
💔 Build Failed
Failed CI StepsTest Failures
Metrics [docs]Page load bundle
Historycc @vadimkibana |
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.
Backport
This will backport the following commits from
mainto8.x:CHANGE_POINTONoption has any contents (#216093)Questions ?
Please refer to the Backport tool documentation