Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
1.35.0
Description
The return type of
array_compact(array[null, 1, null, 2])
is INTEGER ARRAY NOT NULL, but from semantics the correct type should be
INTEGER NOT NULL ARRAY NOT NULL.
because the returned result can not has NULL value.
currently, array_compact use ARG0_NULLABLE which is not enough.
public static final SqlFunction ARRAY_COMPACT = SqlBasicFunction.create(SqlKind.ARRAY_COMPACT, ReturnTypes.ARG0_NULLABLE, OperandTypes.ARRAY);
Attachments
Issue Links
- is related to
-
CALCITE-5734 Add ARRAY_COMPACT for Spark dialect
- Closed
- links to