SQL: Fix null handling for AND and OR in SELECT#35277
Merged
matriv merged 2 commits intoelastic:masterfrom Nov 6, 2018
Merged
Conversation
Override `process()` in `BinaryLogicProcessor` which doesn't immediately return null if left or right argument is null, which is the behaviour of `process()` of the parent class `BinaryProcessor`. Also, add more tests for `AND` and `OR` in SELECT clause with literal. Fixes: elastic#35240
Collaborator
|
Pinging @elastic/es-search-aggs |
|
Can I take up this issue ? |
astefan
reviewed
Nov 6, 2018
| assertNull(new BinaryLogicProcessor(NULL, NULL, BinaryLogicProcessor.BinaryLogicOperation.AND).process(null)); | ||
| } | ||
|
|
||
| private static Boolean randomBooleanOrNull() { |
Contributor
There was a problem hiding this comment.
Instead of this method, any of the randomFrom() methods could work?
Contributor
Author
There was a problem hiding this comment.
Sure, didn't think of that, fixed, thx!
Contributor
Author
|
retest this please |
Member
|
@klobin Thank you for your interest. Thanks! |
matriv
pushed a commit
that referenced
this pull request
Nov 6, 2018
Override `process()` in `BinaryLogicProcessor` which doesn't immediately return null if left or right argument is null, which is the behaviour of `process()` of the parent class `BinaryProcessor`. Also, add more tests for `AND` and `OR` in SELECT clause with literal. Fixes: #35240
Contributor
Author
|
Backported to |
matriv
pushed a commit
that referenced
this pull request
Nov 6, 2018
Override `process()` in `BinaryLogicProcessor` which doesn't immediately return null if left or right argument is null, which is the behaviour of `process()` of the parent class `BinaryProcessor`. Also, add more tests for `AND` and `OR` in SELECT clause with literal. Fixes: #35240
Contributor
Author
|
Backported to |
matarrese
added a commit
to matarrese/elasticsearch
that referenced
this pull request
Nov 6, 2018
…-agg * master: (528 commits) Register Azure max_retries setting (elastic#35286) add version 6.4.4 [Docs] Add painless context details for bucket_script (elastic#35142) Upgrade jline to 3.8.2 (elastic#35288) SQL: new SQL CLI logo (elastic#35261) Logger: Merge ESLoggerFactory into Loggers (elastic#35146) Docs: Add section about range query for range type (elastic#35222) [ILM] change remove-policy-from-index http method from DELETE to POST (elastic#35268) [CCR] Forgot missing return statement, SQL: Fix null handling for AND and OR in SELECT (elastic#35277) [TEST] Mute ChangePolicyForIndexIT#testChangePolicyForIndex Serialize ignore_throttled also to 6.6 after backport Check for java 11 in buildSrc (elastic#35260) [TEST] increase await timeout in RemoteClusterConnectionTests Add missing up-to-date configuration (elastic#35255) Adapt Lucene BWC version SQL: Introduce Coalesce function (elastic#35253) Upgrade to lucene-8.0.0-snapshot-31d7dfe6b1 (elastic#35224) Fix failing ICU tests (elastic#35207) Prevent throttled indices to be searched through wildcards by default (elastic#34354) ...
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.
Override
process()inBinaryLogicProcessorwhich doesn't immediatelyreturn null if left or right argument is null, which is the behaviour of
process()of the parent classBinaryProcessor.Also, add more tests for
ANDandORin SELECT clause with literal.Fixes: #35240