[
https://issues.apache.org/jira/browse/FLINK-19659?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Flink Jira Bot updated FLINK-19659:
-----------------------------------
Labels: auto-unassigned pull-request-available stale-major (was:
auto-unassigned pull-request-available)
I am the [Flink Jira Bot|https://github.com/apache/flink-jira-bot/] and I help
the community manage its development. I see this issues has been marked as
Major but is unassigned and neither itself nor its Sub-Tasks have been updated
for 30 days. I have gone ahead and added a "stale-major" to the issue". If this
ticket is a Major, please either assign yourself or give an update. Afterwards,
please remove the label or in 7 days the issue will be deprioritized.
> Array type supports equals and not_equals operator when element types are
> different but castable
> ------------------------------------------------------------------------------------------------
>
> Key: FLINK-19659
> URL: https://issues.apache.org/jira/browse/FLINK-19659
> Project: Flink
> Issue Type: New Feature
> Components: Table SQL / API
> Affects Versions: 1.11.0
> Reporter: hailong wang
> Priority: Major
> Labels: auto-unassigned, pull-request-available, stale-major
> Fix For: 1.14.0
>
>
> Currently, Array type supports `equals` and `not_equals` when element types
> are the same or can not be cased. For example,
> {code:java}
> Array[1] <> Array[1] -> false{code}
> {code:java}
> Array[1] <> Array[cast(1 as bigint)] -> false
> {code}
> But for the element types which are castable, it will throw error,
> {code:java}
> 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){code}
> But the result should be false or true, for example,
> {code:java}
> /Array[1] <> Array[cast(1 as bigint)] -> false
> {code}
>
> BTW, Map and MultiSet type are same as this, If it did, I am pleasure to open
> other issues to track those.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)