You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If that NULL expression is used in an arithmetic operation, the result of the operation will be NULL:
SELECT x +1FROM s1 EMIT CHANGES;
However, if a NULL literal is used in the same way, an NPE will be thrown:
ksql> SELECT NULL + 1 FROM s1 EMIT CHANGES;
java.lang.NullPointerException
We should make NULL handling consistent regardless of context, as some users will evaluate ksqlDB's NULL handling by testing a simple example using a NULL literal like the one above. Any assumptions they derive from such tests will currently not be valid for actual queries.
The text was updated successfully, but these errors were encountered:
select ARRAY[value0+5, 1+5], ARRAY[1+5], value0 + 5 from TEST emit changes;
If value0 is null in a record, then the output is null, [6], null. This seems a bit strange since it seems like the first array should be [null, 6]
select ARRAY[ucase(value0), 'test'] from TEST1 emit changes; returns [null, 'test']
It seems like if there's a NPE thrown in the expression when the query is processing, the corresponding select column gets a null value. The NPE thrown before the query is created/executed is because of our type checking of the expression before we create the query which fails.
We got rid of the NPE, and we now give a new error message in such cases. See the description of #7554 for more details. I am closing this issue, and I have created this issue #7602 instead since the scope of feature that we want is much larger.
Given a stream
s1
that contains aNULL
value:If that
NULL
expression is used in an arithmetic operation, the result of the operation will beNULL
:However, if a
NULL
literal is used in the same way, an NPE will be thrown:We should make
NULL
handling consistent regardless of context, as some users will evaluate ksqlDB'sNULL
handling by testing a simple example using aNULL
literal like the one above. Any assumptions they derive from such tests will currently not be valid for actual queries.The text was updated successfully, but these errors were encountered: