Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
None
Description
In CALCITE-2464, an in-depth discussion on nullability of structured type has been conducted.
According to SQL standards, a record's value (with structure type) is considered null if and only if all of its fields are null.
Based on that, the ROW function's return type can be nullable.
Moreover, current implementor for ROW function's NullPolicy (NullPolicy.ANY) contradicts its runtime behavior.
Query: select ROW(1, cast(null as int)) Result: {1, null}
However, according to the NullPolicy, the result should be null.