Tests for CASE/WHEN query with NULL support#11395
Tests for CASE/WHEN query with NULL support#11395Jackie-Jiang merged 6 commits intoapache:masterfrom
Conversation
Codecov Report
@@ Coverage Diff @@
## master #11395 +/- ##
============================================
+ Coverage 61.46% 62.88% +1.41%
+ Complexity 6514 207 -6307
============================================
Files 2233 2300 +67
Lines 120144 123622 +3478
Branches 18234 18796 +562
============================================
+ Hits 73848 77740 +3892
+ Misses 40882 40356 -526
- Partials 5414 5526 +112
Flags with carried forward coverage won't be shown. Click here to find out more. see 347 files with indirect coverage changes 📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
Jackie-Jiang
left a comment
There was a problem hiding this comment.
@shenyu0127 Please also take a look
| } | ||
| if (!unselectedDocs.isEmpty()) { | ||
| if (_elseStatement == null) { | ||
| if (_elseStatement == null || LiteralTransformFunction.isNullLiteralTransform(_elseStatement)) { |
There was a problem hiding this comment.
To simplify this, we can change constructStatementListCalcite() (also change constructStatementListLegacy() for backward compatible) to set _elseStatement to null when it is null literal
| /* | ||
| * Util function to check whether the Literal transform is null or not. | ||
| */ | ||
| public static boolean isNullLiteralTransform(TransformFunction function) { |
There was a problem hiding this comment.
Suggest adding boolean isNull() instead. Checking _dataType itself should be enough (consistent with getNullBitmap())
|
Without this PR, the query |
Initially, when I started looking a couple of months back, it was an issue, but as of now, it is more or less a performance improvement and enabling the ignored queries. Please let me know if we can drop the performance improvement changes. Thanks |
I see. Please drop the performance improvement changes. |
Just out of curiosity, any particular reason for not having the performance logic? |
We prefer one PR to do one simple thing.
|
|
As suggested, diving this PR into two
|
Jackie-Jiang
left a comment
There was a problem hiding this comment.
LGTM
Could you revise the title and description for the PR accordingly?
This PR is for the issue
ENABLE_NULL_HANDLINGfor multistage query testing.cc: @shenyu0127, @Jackie-Jiang