why can't i use `SUM0` in flink sql?
# troubleshooting
s
why can't i use
SUM0
in flink sql?
m
Copy code
select sum(0);
Copy code
EXPR$0
           0
Works here
s
No, i mean sum0
If all values are null, 0 is returned
m
Do you have an example?
Because
sum0
sounds like incorrect SQL syntax
If a value is null, there's nothing to sum because null is not an integer.
Under aggregate functions section
m
That's not an example, but it's a reference πŸ™‚
What is the SQL syntax you're trying to execute?
s
Why is it N/A
m
There's no equivalent for it in the SQL syntax
s
I don't get it it's already part of the table api
m
Table API is Flink's own definition, but for SQL we rely on the ANSI SQL Standard
And there's no "sum0" function on the ANSI Sql Standard
s
If i want to ise it, i need a udf?
use*
m
Yes
m
Most likely yes