You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hive.apache.org by "Zoltan Haindrich (JIRA)" <ji...@apache.org> on 2018/12/03 16:03:00 UTC

[jira] [Resolved] (HIVE-20913) Narrowing nullability may cause typecheck failures

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

Zoltan Haindrich resolved HIVE-20913.
-------------------------------------
    Resolution: Fixed

CALCITE-2675 fixes this issue

> Narrowing nullability may cause typecheck failures
> --------------------------------------------------
>
>                 Key: HIVE-20913
>                 URL: https://issues.apache.org/jira/browse/HIVE-20913
>             Project: Hive
>          Issue Type: Bug
>            Reporter: Zoltan Haindrich
>            Assignee: Zoltan Haindrich
>            Priority: Major
>
> CALCITE-1413 have added a logic to narrow an expression's type from nullable to non-nullable - this causes some issues for Hive side sanity checks.
> can be reproduced with a calcite 1.18.0-SNAPSHOT ; and {{-Dtest=TestCliDriver#*[semijoin5]}}
> {code}
> java.lang.AssertionError: 
> Cannot add expression of different type to set:
> set type is RecordType(INTEGER int_col, INTEGER int_col_1, BIGINT float_col, BIGINT int_col_2) NOT NULL
> expression type is RecordType(INTEGER NOT NULL int_col, INTEGER int_col_1, BIGINT float_col, BIGINT int_col_2) NOT NULL
> set is rel#202:HiveProject.HIVE.[](input=HepRelVertex#201,int_col=CASE(IS NOT NULL(498), 498, IS NOT NULL($116), $116, 524),int_col_1=+($99, CAST($49):INTEGER),float_col=FLOOR($15),int_col_2=CASE(IS NOT NULL($117), $117, 704))
> expression is HiveProject#289
> 	at org.apache.calcite.plan.RelOptUtil.verifyTypeEquivalence(RelOptUtil.java:381)
> 	at org.apache.calcite.plan.hep.HepRuleCall.transformTo(HepRuleCall.java:57)
> 	at org.apache.calcite.plan.RelOptRuleCall.transformTo(RelOptRuleCall.java:234)
> 	at org.apache.calcite.rel.rules.ReduceExpressionsRule$ProjectReduceExpressionsRule.onMatch(ReduceExpressionsRule.java:291)
> 	at org.apache.calcite.plan.AbstractRelOptPlanner.fireRule(AbstractRelOptPlanner.java:319)
> 	at org.apache.calcite.plan.hep.HepPlanner.applyRule(HepPlanner.java:559)
> {code}



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