You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by "Flink Jira Bot (Jira)" <ji...@apache.org> on 2022/04/08 22:39:00 UTC

[jira] [Updated] (FLINK-18234) Implicit type conversion in join condition

     [ https://issues.apache.org/jira/browse/FLINK-18234?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Flink Jira Bot updated FLINK-18234:
-----------------------------------
    Labels: auto-deprioritized-major stale-minor  (was: auto-deprioritized-major)

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 Minor but is unassigned and neither itself nor its Sub-Tasks have been updated for 180 days. I have gone ahead and marked it "stale-minor". If this ticket is still Minor, please either assign yourself or give an update. Afterwards, please remove the label or in 7 days the issue will be deprioritized.


> Implicit type conversion in join condition
> ------------------------------------------
>
>                 Key: FLINK-18234
>                 URL: https://issues.apache.org/jira/browse/FLINK-18234
>             Project: Flink
>          Issue Type: Bug
>          Components: Table SQL / Planner
>    Affects Versions: 1.10.1
>            Reporter: YufeiLiu
>            Priority: Minor
>              Labels: auto-deprioritized-major, stale-minor
>
> Execute sql "SELECT a1, b1 FROM A JOIN B ON a2 = b4", a2(BIGINT) b4(VARCHAR) will throw exception 
> {code}
> org.apache.flink.table.api.TableException: VARCHAR(2147483647) and INTEGER does not have common type now
> 	at org.apache.flink.table.planner.plan.rules.logical.JoinConditionTypeCoerceRule$$anonfun$onMatch$1.apply(JoinConditionTypeCoerceRule.scala:76)
> 	at org.apache.flink.table.planner.plan.rules.logical.JoinConditionTypeCoerceRule$$anonfun$onMatch$1.apply(JoinConditionTypeCoerceRule.scala:65)
> 	at scala.collection.Iterator$class.foreach(Iterator.scala:891)
> 	at scala.collection.AbstractIterator.foreach(Iterator.scala:1334)
> 	at scala.collection.IterableLike$class.foreach(IterableLike.scala:72)
> 	at scala.collection.AbstractIterable.foreach(Iterable.scala:54)
> 	at org.apache.flink.table.planner.plan.rules.logical.JoinConditionTypeCoerceRule.onMatch(JoinConditionTypeCoerceRule.scala:65)
> 	at org.apache.calcite.plan.AbstractRelOptPlanner.fireRule(AbstractRelOptPlanner.java:328)
> 	at org.apache.calcite.plan.hep.HepPlanner.applyRule(HepPlanner.java:562)
> 	at org.apache.calcite.plan.hep.HepPlanner.applyRules(HepPlanner.java:427)
> 	at org.apache.calcite.plan.hep.HepPlanner.executeInstruction(HepPlanner.java:264)
> 	at org.apache.calcite.plan.hep.HepInstruction$RuleInstance.execute(HepInstruction.java:127)
> 	at org.apache.calcite.plan.hep.HepPlanner.executeProgram(HepPlanner.java:223)
> 	at org.apache.calcite.plan.hep.HepPlanner.findBestExp(HepPlanner.java:210)
> 	at org.apache.flink.table.planner.plan.optimize.program.FlinkHepProgram.optimize(FlinkHepProgram.scala:69)
> {code}
> Should we do some implicit type coercion in this case? It works on old version, and also can use in WHERE condition like "WHERE a4 = 3"



--
This message was sent by Atlassian Jira
(v8.20.1#820001)