-
Notifications
You must be signed in to change notification settings - Fork 727
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
Add expression nullable support #3452
Conversation
Thanks for the contribution! Please review the labels and make any necessary changes. |
1 similar comment
Thanks for the contribution! Please review the labels and make any necessary changes. |
This pull request is being automatically deployed with Vercel (learn more). 🔍 Inspect: https://vercel.com/databend/databend/Enz2YQm8UTFZteu3EBr3Q24aPmNB [Deployment for 35957b0 canceled] |
Codecov Report
@@ Coverage Diff @@
## main #3452 +/- ##
=====================================
Coverage 61% 61%
=====================================
Files 610 611 +1
Lines 34185 34220 +35
=====================================
+ Hits 20996 21033 +37
+ Misses 13189 13187 -2
Continue to review full report at Codecov.
|
-- test 'create table as select' statement, expect db2.test3 has the data from db1.test1 with casting | ||
CREATE TABLE db2.test3(x Varchar, y Varchar) ENGINE=fuse AS SELECT * FROM db1.test1; | ||
SELECT x FROM db2.test3; | ||
SELECT '====END TEST CREATE TABLE AS SELECT STATEMENT===='; | ||
|
||
-- clean up test databases | ||
DROP DATABASE db1; | ||
DROP DATABASE db2; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
new line needed.
Nullable is annoyment. ClickHouse takes Nullable as a separated datatype. So in the function, there are two kinds of ways to handle nullable:
I prefer the first one, thus we can control the return type. |
|
Sure, will address. Do we have an example of the 'isNull' ? -- the inputs are not nullable but output is null ?
|
Right, that is why I just check the function's nullable() return. My initial thoughts are just like, checking the input, if any of them is nullable, the output should be nullable. BTW, I think we return +inf for '3/0', which makes more sense than mysql. Also aggregate function is a little special too, that, input can be nullable, but output is most not nullable. |
Wait for another reviewer approval |
Thank you @junli1026 ! |
Wait for another reviewer approval |
I hereby agree to the terms of the CLA available at: https://databend.rs/policies/cla/
Summary
Add expression nullable support.
Changelog
Related Issues
Fixes #issue
Test Plan
Stateless Tests