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: Painless script filtering in HAVING can throw NPE #35107

Closed
matriv opened this issue Oct 30, 2018 · 1 comment
Closed

SQL: Painless script filtering in HAVING can throw NPE #35107

matriv opened this issue Oct 30, 2018 · 1 comment

Comments

@matriv
Copy link
Contributor

matriv commented Oct 30, 2018

The AggFilter is not wrapping the script with nullSafeFilter therefore if the expression in the HAVING clause evaluates to NULL (e.g. max(col_name) IN (10, null)) an NPE is thrown.

@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-search-aggs

matriv added a commit to matriv/elasticsearch that referenced this issue Oct 30, 2018
Surround script with `nullSafeFilter` also for `AggFilter` translation.
Fixed query translation tests to properly set `onAggs`.

Fixes: elastic#35107
matriv pushed a commit that referenced this issue Oct 31, 2018
Surround script with `nullSafeFilter` also for `AggFilter` translation.
Fixed query translation tests to properly set `onAggs`.

Fixes: #35107
matriv pushed a commit that referenced this issue Oct 31, 2018
Surround script with `nullSafeFilter` also for `AggFilter` translation.
Fixed query translation tests to properly set `onAggs`.

Fixes: #35107
matriv pushed a commit that referenced this issue Oct 31, 2018
Surround script with `nullSafeFilter` also for `AggFilter` translation.
Fixed query translation tests to properly set `onAggs`.

Fixes: #35107
@colings86 colings86 added v6.5.0 and removed v6.5.1 labels Nov 2, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants