hive-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Zoltan Haindrich (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (HIVE-20913) Narrowing nullability may cause typecheck failures
Date Wed, 14 Nov 2018 15:04:00 GMT

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

Zoltan Haindrich updated HIVE-20913:
------------------------------------
    Description: 
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}

  was: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.


> 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)

Mime
View raw message