You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@calcite.apache.org by "Bohdan Kazydub (JIRA)" <ji...@apache.org> on 2019/05/03 15:25:00 UTC

[jira] [Comment Edited] (CALCITE-3020) throws AssertionError:Type mismatch in VolcanoPlanner

    [ https://issues.apache.org/jira/browse/CALCITE-3020?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16832576#comment-16832576 ] 

Bohdan Kazydub edited comment on CALCITE-3020 at 5/3/19 3:24 PM:
-----------------------------------------------------------------

[~vlsi] what do you think abouth this?


was (Author: kazydubb):
@vsitnikov what do you think abouth this?

> throws AssertionError:Type mismatch in VolcanoPlanner
> -----------------------------------------------------
>
>                 Key: CALCITE-3020
>                 URL: https://issues.apache.org/jira/browse/CALCITE-3020
>             Project: Calcite
>          Issue Type: Bug
>          Components: core
>    Affects Versions: 1.19.0
>            Reporter: godfrey he
>            Priority: Major
>
> after [CALCITE-2454|https://issues.apache.org/jira/browse/CALCITE-2454] merged, an AssertionError:Type mismatch will be thrown in VolcanoPlanner when running the following sql:
> {code:sql}
> WITH t1 AS (SELECT CAST(a as BIGINT) AS a, SUM(b) AS b FROM x GROUP BY CAST(a as BIGINT)),
>      t2 AS (SELECT CAST(a as DOUBLE) AS a, SUM(b) AS b FROM x GROUP BY CAST(a as DOUBLE))
> SELECT t1.*, t2.* FROM t1, t2 WHERE t1.b = t2.b
> {code}
> Caused by: java.lang.AssertionError: Type mismatch:
> left:
> RecordType(BIGINT a, BIGINT b) NOT NULL
> right:
> RecordType(DOUBLE a, BIGINT b) NOT NULL
> 	at org.apache.calcite.util.Litmus$1.fail(Litmus.java:31)
> 	at org.apache.calcite.plan.RelOptUtil.equal(RelOptUtil.java:1858)
> 	at org.apache.calcite.plan.volcano.VolcanoPlanner.registerImpl(VolcanoPlanner.java:1705)
> 	at org.apache.calcite.plan.volcano.VolcanoPlanner.register(VolcanoPlanner.java:850)
> 	at org.apache.calcite.plan.volcano.VolcanoPlanner.ensureRegistered(VolcanoPlanner.java:872)
> 	at org.apache.calcite.plan.volcano.VolcanoPlanner.ensureRegistered(VolcanoPlanner.java:1958)
> 	at org.apache.calcite.plan.volcano.VolcanoRuleCall.transformTo(VolcanoRuleCall.java:126)
> 	at org.apache.calcite.plan.RelOptRuleCall.transformTo(RelOptRuleCall.java:234)
> 	at org.apache.calcite.rel.convert.ConverterRule.onMatch(ConverterRule.java:141)
> 	at org.apache.calcite.plan.volcano.VolcanoRuleCall.onMatch(VolcanoRuleCall.java:205)
> 	at org.apache.calcite.plan.volcano.VolcanoPlanner.findBestExp(VolcanoPlanner.java:637)



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)