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

SQL: Translate MIN/MAX on keyword fields as FIRST/LAST #41247

Merged
merged 3 commits into from
Apr 16, 2019

Conversation

matriv
Copy link
Contributor

@matriv matriv commented Apr 16, 2019

Although the translation rule was implemented in the Optimizer
and the docs are in place, the rule was not added in the list of rules
to be executed.

Relates to #41195
Follows #37936

Although the translation rule was implemented in the `Optimizer`,
the rule was not added in the list of rules to be executed.

Relates to elastic#41195
Follows elastic#37936
@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-search

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.

Can you add a test to QueryTranslatorTests specifically for MIN(string) and MAX(string), please?
And I would also like to see more tests in general, with these two for strings.

@astefan
Copy link
Contributor

astefan commented Apr 16, 2019

I missed those from OptimizerTests class; if you believe they are enough, it's ok with me. I was used to those in the QueryTranslatorTests class.

Yes, more integration tests are welcomed. The more, the better. Thanks.

Copy link
Member

@costin costin left a comment

Choose a reason for hiding this comment

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

+1 on having a bit more integration tests - they don't hurt and will check potential mistakes.

@matriv
Copy link
Contributor Author

matriv commented Apr 16, 2019

Added also query translator tests and one more integ test.
MIN/MAX on keyword cannot be used in HAVING currently (there is a limitation documented) so I couldn't think of another integration test.

@matriv matriv requested a review from astefan April 16, 2019 13:06
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

@matriv matriv merged commit f426a33 into elastic:master Apr 16, 2019
@matriv matriv deleted the fix-min-max branch April 16, 2019 17:40
matriv added a commit that referenced this pull request Apr 16, 2019
Although the translation rule was implemented in the `Optimizer`,
the rule was not added in the list of rules to be executed.

Relates to #41195
Follows #37936


(cherry picked from commit f426a33)
matriv added a commit that referenced this pull request Apr 16, 2019
Although the translation rule was implemented in the `Optimizer`,
the rule was not added in the list of rules to be executed.

Relates to #41195
Follows #37936


(cherry picked from commit f426a33)
matriv added a commit that referenced this pull request Apr 16, 2019
Although the translation rule was implemented in the `Optimizer`,
the rule was not added in the list of rules to be executed.

Relates to #41195
Follows #37936


(cherry picked from commit f426a33)
gurkankaymak pushed a commit to gurkankaymak/elasticsearch that referenced this pull request May 27, 2019
Although the translation rule was implemented in the `Optimizer`,
the rule was not added in the list of rules to be executed.

Relates to elastic#41195
Follows elastic#37936
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants