-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
[function] isnotnull #22702
Comments
Hi, I am interested in this issue, but I didn't find a function name "isnull" in gensrc/script/functions.py. |
yep.
The implements is like this:
|
@kateshaowanjou Can you assign this issue to me? |
Fixes #22702 Test select * from test.t_leo; +------+------+-------+ | id | name | money | +------+------+-------+ | 1 | a | NULL | +------+------+-------+ select isnotnull(money) from test.t_leo; +-------------------+ | money IS NOT NULL | +-------------------+ | 0 | +-------------------+ select isnotnull(id) from test.t_leo; +----------------+ | id IS NOT NULL | +----------------+ | 1 | +----------------+ Signed-off-by: leoyy0316 <571684903@qq.com>
Fixes StarRocks#22702 Test select * from test.t_leo; +------+------+-------+ | id | name | money | +------+------+-------+ | 1 | a | NULL | +------+------+-------+ select isnotnull(money) from test.t_leo; +-------------------+ | money IS NOT NULL | +-------------------+ | 0 | +-------------------+ select isnotnull(id) from test.t_leo; +----------------+ | id IS NOT NULL | +----------------+ | 1 | +----------------+ Signed-off-by: leoyy0316 <571684903@qq.com>
Fixes StarRocks#22702 Test select * from test.t_leo; +------+------+-------+ | id | name | money | +------+------+-------+ | 1 | a | NULL | +------+------+-------+ select isnotnull(money) from test.t_leo; +-------------------+ | money IS NOT NULL | +-------------------+ | 0 | +-------------------+ select isnotnull(id) from test.t_leo; +----------------+ | id IS NOT NULL | +----------------+ | 1 | +----------------+ Signed-off-by: leoyy0316 <571684903@qq.com>
StarRocks already have a function named isnull.
https://docs.starrocks.io/en-us/latest/sql-reference/sql-functions/utility-functions/isnull
For easy of use, it's better to have a function that isnotnull.
The text was updated successfully, but these errors were encountered: