Details
-
New Feature
-
Status: Open
-
Minor
-
Resolution: Unresolved
-
1.11.0
Description
Currently, Array type supports `equals` and `not_equals` when element types are the same or can not be cased. For example,
Array[1] <> Array[1] -> false
Array[1] <> Array[cast(1 as bigint)] -> false
But for the element types which are castable, it will throw error,
org.apache.flink.table.planner.codegen.CodeGenException: Unsupported cast from 'ARRAY<INT NOT NULL> NOT NULL' to 'ARRAY<BIGINT NOT NULL> NOT NULL'.org.apache.flink.table.planner.codegen.CodeGenException: Unsupported cast from 'ARRAY<INT NOT NULL> NOT NULL' to 'ARRAY<BIGINT NOT NULL> NOT NULL'. at org.apache.flink.table.planner.codegen.calls.ScalarOperatorGens$.generateCast(ScalarOperatorGens.scala:1295) at org.apache.flink.table.planner.codegen.ExprCodeGenerator.generateCallExpression(ExprCodeGenerator.scala:703) at org.apache.flink.table.planner.codegen.ExprCodeGenerator.visitCall(ExprCodeGenerator.scala:498) at org.apache.flink.table.planner.codegen.ExprCodeGenerator.visitCall(ExprCodeGenerator.scala:55) at org.apache.calcite.rex.RexCall.accept(RexCall.java:288)
But the result should be false or true, for example,
/Array[1] <> Array[cast(1 as bigint)] -> false
BTW, Map and MultiSet type are same as this, If it did, I am pleasure to open other issues to track those.
Attachments
Issue Links
- relates to
-
FLINK-17321 Support for casting collection types.
- Closed
- links to