Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

QL: Introduce common analyzer base class #65325

Merged
merged 4 commits into from
Nov 23, 2020
Merged

Conversation

costin
Copy link
Member

@costin costin commented Nov 20, 2020

Extract the analyzer base classes into a common project similar to the
Optimizer ones.
Extract AddMissingEqualsOnBoolFields a common rule to be used across

Close #63695

Extract the analyzer base classes into a common project similar to the
Optimizer ones.
Extract AddMissingEqualsOnBoolFields a common rule to be used across

Close elastic#63695
@elasticmachine elasticmachine added the Team:QL (Deprecated) Meta label for query languages team label Nov 20, 2020
@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-ql (Team:QL)

@costin
Copy link
Member Author

costin commented Nov 20, 2020

Once merged in, this PR needs a follow-up to add the same rule inside SQL along side some tests since the same syntax SELECT x WHERE bool is allowed in SQL as well.
@bpintea or @palesz feel free to pick up.

@@ -38,7 +38,7 @@ SELECT TRUNCATE(YEAR(TODAY() - INTERVAL 50 YEARS) / 1000) AS result;


currentDateFilter
SELECT first_name FROM test_emp WHERE hire_date > CURRENT_DATE() - INTERVAL 35 YEARS ORDER BY first_name ASC LIMIT 10;
SELECT first_name FROM test_emp WHERE hire_date > CURRENT_DATE() - INTERVAL 44 YEARS ORDER BY first_name ASC LIMIT 10;
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just as it happens an entry in the dataset failed this condition today (21/11/1985) - I've updated the filter to remain the same for another 9 years :)

Copy link
Contributor

@astefan astefan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. The fix in #65348 should go to 6.8 as well. Should we move forward with that one as well?

@costin costin merged commit 7b4fcb6 into elastic:master Nov 23, 2020
@costin costin deleted the fix/64388 branch November 23, 2020 12:19
costin added a commit that referenced this pull request Nov 23, 2020
Extract the analyzer base classes into a common project similar to the
Optimizer ones.
Extract AddMissingEqualsOnBoolFields a common rule to be used across

Close #63695

(cherry picked from commit 7b4fcb6)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

EQL: Improve grammar to handle bool declarations
6 participants