[jira] [Commented] (HIVE-13094) CBO: Assertion error in Case expression

2017-11-01 Thread Jesus Camacho Rodriguez (JIRA)

[ 
https://issues.apache.org/jira/browse/HIVE-13094?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16234352#comment-16234352
 ] 

Jesus Camacho Rodriguez commented on HIVE-13094:


[~julianhyde], we verified that issue was fixed by CALCITE-1502 indeed. Once we 
moved to post Calcite 1.10, the changes introduced by this patch (except the 
test) were removed, i.e., _HiveRexUtil_ does not exist anymore in the Hive 
codebase and we rely on Calcite code.

> CBO: Assertion error  in Case expression
> 
>
> Key: HIVE-13094
> URL: https://issues.apache.org/jira/browse/HIVE-13094
> Project: Hive
>  Issue Type: Bug
>  Components: CBO
>Affects Versions: 2.0.0, 2.1.0
>Reporter: Gopal V
>Assignee: Jesus Camacho Rodriguez
>Priority: Major
> Fix For: 2.1.0
>
> Attachments: HIVE-13094.01.patch, HIVE-13094.patch
>
>
> Triggered by a trap case in the case evaluation
> {code}
> CASE WHEN (-2) >= 0  THEN SUBSTRING(str0, 1,CAST((-2) AS INT)) ELSE NULL
> {code}
> {code}
> Exception in thread "b367ad08-d900-4672-8e75-a4e90a52141b 
> b367ad08-d900-4672-8e75-a4e90a52141b main" java.lang.AssertionError: Internal 
> error: Cannot add expression of different type to set:
> set type is RecordType(VARCHAR(2147483647) CHARACTER SET "ISO-8859-1" COLLATE 
> "ISO-8859-1$en_US$primary" $f0, VARCHAR(2147483647) CHARACTER SET 
> "ISO-8859-1" COLLATE "ISO-8859-1$en_US$primary" $f1, VARCL
> expression type is RecordType(VARCHAR(2147483647) CHARACTER SET "ISO-8859-1" 
> COLLATE "ISO-8859-1$en_US$primary" $f0, VARCHAR(2147483647) CHARACTER SET 
> "ISO-8859-1" COLLATE "ISO-8859-1$en_US$primary" $fL
> set is 
> rel#12408:HiveProject.HIVE.[](input=HepRelVertex#12407,$f0=$0,$f1=$6,$f2=CASE(>=(-(2),
>  0), substring($6, 1, -(2)), null))
> expression is HiveProject#12414
> at org.apache.calcite.util.Util.newInternal(Util.java:774)
> at 
> org.apache.calcite.plan.RelOptUtil.verifyTypeEquivalence(RelOptUtil.java:317)
> at 
> org.apache.calcite.plan.hep.HepRuleCall.transformTo(HepRuleCall.java:57)
> at 
> org.apache.calcite.plan.RelOptRuleCall.transformTo(RelOptRuleCall.java:224)
> at 
> org.apache.hadoop.hive.ql.optimizer.calcite.rules.HiveReduceExpressionsRule$ProjectReduceExpressionsRule.onMatch(HiveReduceExpressionsRule.java:208)
> at 
> org.apache.calcite.plan.AbstractRelOptPlanner.fireRule(AbstractRelOptPlanner.java:318)
> at 
> org.apache.calcite.plan.hep.HepPlanner.applyRule(HepPlanner.java:514)
> at 
> org.apache.calcite.plan.hep.HepPlanner.applyRules(HepPlanner.java:392)
> at 
> org.apache.calcite.plan.hep.HepPlanner.executeInstruction(HepPlanner.java:285)
> at 
> org.apache.calcite.plan.hep.HepInstruction$RuleCollection.execute(HepInstruction.java:72)
> at 
> org.apache.calcite.plan.hep.HepPlanner.executeProgram(HepPlanner.java:207)
> at 
> org.apache.calcite.plan.hep.HepPlanner.findBestExp(HepPlanner.java:194)
> at 
> org.apache.hadoop.hive.ql.parse.CalcitePlanner$CalcitePlannerAction.hepPlan(CalcitePlanner.java:1265)
> at 
> org.apache.hadoop.hive.ql.parse.CalcitePlanner$CalcitePlannerAction.applyPreJoinOrderingTransforms(CalcitePlanner.java:1125)
> at 
> org.apache.hadoop.hive.ql.parse.CalcitePlanner$CalcitePlannerAction.apply(CalcitePlanner.java:938)
> at 
> org.apache.hadoop.hive.ql.parse.CalcitePlanner$CalcitePlannerAction.apply(CalcitePlanner.java:878)
> at org.apache.calcite.tools.Frameworks$1.apply(Frameworks.java:113)
> at 
> org.apache.calcite.prepare.CalcitePrepareImpl.perform(CalcitePrepareImpl.java:969)
> {code}



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (HIVE-13094) CBO: Assertion error in Case expression

2017-11-01 Thread Julian Hyde (JIRA)

[ 
https://issues.apache.org/jira/browse/HIVE-13094?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16234326#comment-16234326
 ] 

Julian Hyde commented on HIVE-13094:


[~jcamachorodriguez], Did this ever get ported to Calcite? Looks as if 
CALCITE-1502 is similar.

> CBO: Assertion error  in Case expression
> 
>
> Key: HIVE-13094
> URL: https://issues.apache.org/jira/browse/HIVE-13094
> Project: Hive
>  Issue Type: Bug
>  Components: CBO
>Affects Versions: 2.0.0, 2.1.0
>Reporter: Gopal V
>Assignee: Jesus Camacho Rodriguez
>Priority: Major
> Fix For: 2.1.0
>
> Attachments: HIVE-13094.01.patch, HIVE-13094.patch
>
>
> Triggered by a trap case in the case evaluation
> {code}
> CASE WHEN (-2) >= 0  THEN SUBSTRING(str0, 1,CAST((-2) AS INT)) ELSE NULL
> {code}
> {code}
> Exception in thread "b367ad08-d900-4672-8e75-a4e90a52141b 
> b367ad08-d900-4672-8e75-a4e90a52141b main" java.lang.AssertionError: Internal 
> error: Cannot add expression of different type to set:
> set type is RecordType(VARCHAR(2147483647) CHARACTER SET "ISO-8859-1" COLLATE 
> "ISO-8859-1$en_US$primary" $f0, VARCHAR(2147483647) CHARACTER SET 
> "ISO-8859-1" COLLATE "ISO-8859-1$en_US$primary" $f1, VARCL
> expression type is RecordType(VARCHAR(2147483647) CHARACTER SET "ISO-8859-1" 
> COLLATE "ISO-8859-1$en_US$primary" $f0, VARCHAR(2147483647) CHARACTER SET 
> "ISO-8859-1" COLLATE "ISO-8859-1$en_US$primary" $fL
> set is 
> rel#12408:HiveProject.HIVE.[](input=HepRelVertex#12407,$f0=$0,$f1=$6,$f2=CASE(>=(-(2),
>  0), substring($6, 1, -(2)), null))
> expression is HiveProject#12414
> at org.apache.calcite.util.Util.newInternal(Util.java:774)
> at 
> org.apache.calcite.plan.RelOptUtil.verifyTypeEquivalence(RelOptUtil.java:317)
> at 
> org.apache.calcite.plan.hep.HepRuleCall.transformTo(HepRuleCall.java:57)
> at 
> org.apache.calcite.plan.RelOptRuleCall.transformTo(RelOptRuleCall.java:224)
> at 
> org.apache.hadoop.hive.ql.optimizer.calcite.rules.HiveReduceExpressionsRule$ProjectReduceExpressionsRule.onMatch(HiveReduceExpressionsRule.java:208)
> at 
> org.apache.calcite.plan.AbstractRelOptPlanner.fireRule(AbstractRelOptPlanner.java:318)
> at 
> org.apache.calcite.plan.hep.HepPlanner.applyRule(HepPlanner.java:514)
> at 
> org.apache.calcite.plan.hep.HepPlanner.applyRules(HepPlanner.java:392)
> at 
> org.apache.calcite.plan.hep.HepPlanner.executeInstruction(HepPlanner.java:285)
> at 
> org.apache.calcite.plan.hep.HepInstruction$RuleCollection.execute(HepInstruction.java:72)
> at 
> org.apache.calcite.plan.hep.HepPlanner.executeProgram(HepPlanner.java:207)
> at 
> org.apache.calcite.plan.hep.HepPlanner.findBestExp(HepPlanner.java:194)
> at 
> org.apache.hadoop.hive.ql.parse.CalcitePlanner$CalcitePlannerAction.hepPlan(CalcitePlanner.java:1265)
> at 
> org.apache.hadoop.hive.ql.parse.CalcitePlanner$CalcitePlannerAction.applyPreJoinOrderingTransforms(CalcitePlanner.java:1125)
> at 
> org.apache.hadoop.hive.ql.parse.CalcitePlanner$CalcitePlannerAction.apply(CalcitePlanner.java:938)
> at 
> org.apache.hadoop.hive.ql.parse.CalcitePlanner$CalcitePlannerAction.apply(CalcitePlanner.java:878)
> at org.apache.calcite.tools.Frameworks$1.apply(Frameworks.java:113)
> at 
> org.apache.calcite.prepare.CalcitePrepareImpl.perform(CalcitePrepareImpl.java:969)
> {code}



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (HIVE-13094) CBO: Assertion error in Case expression

2016-02-23 Thread Hive QA (JIRA)

[ 
https://issues.apache.org/jira/browse/HIVE-13094?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15159317#comment-15159317
 ] 

Hive QA commented on HIVE-13094:




Here are the results of testing the latest attachment:
https://issues.apache.org/jira/secure/attachment/12789187/HIVE-13094.01.patch

{color:green}SUCCESS:{color} +1 due to 1 test(s) being added or modified.

{color:red}ERROR:{color} -1 due to 3 failed/errored test(s), 9803 tests executed
*Failed tests:*
{noformat}
TestCliDriver-show_conf.q-groupby2_noskew_multi_distinct.q-ptf_rcfile.q-and-12-more
 - did not produce a TEST-*.xml file
org.apache.hadoop.hive.cli.TestNegativeCliDriver.testNegativeCliDriver_authorization_uri_import
org.apache.hive.jdbc.TestSSL.testSSLVersion
{noformat}

Test results: 
http://ec2-174-129-184-35.compute-1.amazonaws.com/jenkins/job/PreCommit-HIVE-TRUNK-Build/7069/testReport
Console output: 
http://ec2-174-129-184-35.compute-1.amazonaws.com/jenkins/job/PreCommit-HIVE-TRUNK-Build/7069/console
Test logs: 
http://ec2-174-129-184-35.compute-1.amazonaws.com/logs/PreCommit-HIVE-TRUNK-Build-7069/

Messages:
{noformat}
Executing org.apache.hive.ptest.execution.TestCheckPhase
Executing org.apache.hive.ptest.execution.PrepPhase
Executing org.apache.hive.ptest.execution.ExecutionPhase
Executing org.apache.hive.ptest.execution.ReportingPhase
Tests exited with: TestsFailedException: 3 tests failed
{noformat}

This message is automatically generated.

ATTACHMENT ID: 12789187 - PreCommit-HIVE-TRUNK-Build

> CBO: Assertion error  in Case expression
> 
>
> Key: HIVE-13094
> URL: https://issues.apache.org/jira/browse/HIVE-13094
> Project: Hive
>  Issue Type: Bug
>  Components: CBO
>Affects Versions: 2.0.0, 2.1.0
>Reporter: Gopal V
>Assignee: Jesus Camacho Rodriguez
> Attachments: HIVE-13094.01.patch, HIVE-13094.patch
>
>
> Triggered by a trap case in the case evaluation
> {code}
> CASE WHEN (-2) >= 0  THEN SUBSTRING(str0, 1,CAST((-2) AS INT)) ELSE NULL
> {code}
> {code}
> Exception in thread "b367ad08-d900-4672-8e75-a4e90a52141b 
> b367ad08-d900-4672-8e75-a4e90a52141b main" java.lang.AssertionError: Internal 
> error: Cannot add expression of different type to set:
> set type is RecordType(VARCHAR(2147483647) CHARACTER SET "ISO-8859-1" COLLATE 
> "ISO-8859-1$en_US$primary" $f0, VARCHAR(2147483647) CHARACTER SET 
> "ISO-8859-1" COLLATE "ISO-8859-1$en_US$primary" $f1, VARCL
> expression type is RecordType(VARCHAR(2147483647) CHARACTER SET "ISO-8859-1" 
> COLLATE "ISO-8859-1$en_US$primary" $f0, VARCHAR(2147483647) CHARACTER SET 
> "ISO-8859-1" COLLATE "ISO-8859-1$en_US$primary" $fL
> set is 
> rel#12408:HiveProject.HIVE.[](input=HepRelVertex#12407,$f0=$0,$f1=$6,$f2=CASE(>=(-(2),
>  0), substring($6, 1, -(2)), null))
> expression is HiveProject#12414
> at org.apache.calcite.util.Util.newInternal(Util.java:774)
> at 
> org.apache.calcite.plan.RelOptUtil.verifyTypeEquivalence(RelOptUtil.java:317)
> at 
> org.apache.calcite.plan.hep.HepRuleCall.transformTo(HepRuleCall.java:57)
> at 
> org.apache.calcite.plan.RelOptRuleCall.transformTo(RelOptRuleCall.java:224)
> at 
> org.apache.hadoop.hive.ql.optimizer.calcite.rules.HiveReduceExpressionsRule$ProjectReduceExpressionsRule.onMatch(HiveReduceExpressionsRule.java:208)
> at 
> org.apache.calcite.plan.AbstractRelOptPlanner.fireRule(AbstractRelOptPlanner.java:318)
> at 
> org.apache.calcite.plan.hep.HepPlanner.applyRule(HepPlanner.java:514)
> at 
> org.apache.calcite.plan.hep.HepPlanner.applyRules(HepPlanner.java:392)
> at 
> org.apache.calcite.plan.hep.HepPlanner.executeInstruction(HepPlanner.java:285)
> at 
> org.apache.calcite.plan.hep.HepInstruction$RuleCollection.execute(HepInstruction.java:72)
> at 
> org.apache.calcite.plan.hep.HepPlanner.executeProgram(HepPlanner.java:207)
> at 
> org.apache.calcite.plan.hep.HepPlanner.findBestExp(HepPlanner.java:194)
> at 
> org.apache.hadoop.hive.ql.parse.CalcitePlanner$CalcitePlannerAction.hepPlan(CalcitePlanner.java:1265)
> at 
> org.apache.hadoop.hive.ql.parse.CalcitePlanner$CalcitePlannerAction.applyPreJoinOrderingTransforms(CalcitePlanner.java:1125)
> at 
> org.apache.hadoop.hive.ql.parse.CalcitePlanner$CalcitePlannerAction.apply(CalcitePlanner.java:938)
> at 
> org.apache.hadoop.hive.ql.parse.CalcitePlanner$CalcitePlannerAction.apply(CalcitePlanner.java:878)
> at org.apache.calcite.tools.Frameworks$1.apply(Frameworks.java:113)
> at 
> org.apache.calcite.prepare.CalcitePrepareImpl.perform(CalcitePrepareImpl.java:969)
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (HIVE-13094) CBO: Assertion error in Case expression

2016-02-23 Thread Pengcheng Xiong (JIRA)

[ 
https://issues.apache.org/jira/browse/HIVE-13094?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15158974#comment-15158974
 ] 

Pengcheng Xiong commented on HIVE-13094:


+1, pending QA. Thanks.

> CBO: Assertion error  in Case expression
> 
>
> Key: HIVE-13094
> URL: https://issues.apache.org/jira/browse/HIVE-13094
> Project: Hive
>  Issue Type: Bug
>  Components: CBO
>Affects Versions: 2.0.0, 2.1.0
>Reporter: Gopal V
>Assignee: Jesus Camacho Rodriguez
> Attachments: HIVE-13094.01.patch, HIVE-13094.patch
>
>
> Triggered by a trap case in the case evaluation
> {code}
> CASE WHEN (-2) >= 0  THEN SUBSTRING(str0, 1,CAST((-2) AS INT)) ELSE NULL
> {code}
> {code}
> Exception in thread "b367ad08-d900-4672-8e75-a4e90a52141b 
> b367ad08-d900-4672-8e75-a4e90a52141b main" java.lang.AssertionError: Internal 
> error: Cannot add expression of different type to set:
> set type is RecordType(VARCHAR(2147483647) CHARACTER SET "ISO-8859-1" COLLATE 
> "ISO-8859-1$en_US$primary" $f0, VARCHAR(2147483647) CHARACTER SET 
> "ISO-8859-1" COLLATE "ISO-8859-1$en_US$primary" $f1, VARCL
> expression type is RecordType(VARCHAR(2147483647) CHARACTER SET "ISO-8859-1" 
> COLLATE "ISO-8859-1$en_US$primary" $f0, VARCHAR(2147483647) CHARACTER SET 
> "ISO-8859-1" COLLATE "ISO-8859-1$en_US$primary" $fL
> set is 
> rel#12408:HiveProject.HIVE.[](input=HepRelVertex#12407,$f0=$0,$f1=$6,$f2=CASE(>=(-(2),
>  0), substring($6, 1, -(2)), null))
> expression is HiveProject#12414
> at org.apache.calcite.util.Util.newInternal(Util.java:774)
> at 
> org.apache.calcite.plan.RelOptUtil.verifyTypeEquivalence(RelOptUtil.java:317)
> at 
> org.apache.calcite.plan.hep.HepRuleCall.transformTo(HepRuleCall.java:57)
> at 
> org.apache.calcite.plan.RelOptRuleCall.transformTo(RelOptRuleCall.java:224)
> at 
> org.apache.hadoop.hive.ql.optimizer.calcite.rules.HiveReduceExpressionsRule$ProjectReduceExpressionsRule.onMatch(HiveReduceExpressionsRule.java:208)
> at 
> org.apache.calcite.plan.AbstractRelOptPlanner.fireRule(AbstractRelOptPlanner.java:318)
> at 
> org.apache.calcite.plan.hep.HepPlanner.applyRule(HepPlanner.java:514)
> at 
> org.apache.calcite.plan.hep.HepPlanner.applyRules(HepPlanner.java:392)
> at 
> org.apache.calcite.plan.hep.HepPlanner.executeInstruction(HepPlanner.java:285)
> at 
> org.apache.calcite.plan.hep.HepInstruction$RuleCollection.execute(HepInstruction.java:72)
> at 
> org.apache.calcite.plan.hep.HepPlanner.executeProgram(HepPlanner.java:207)
> at 
> org.apache.calcite.plan.hep.HepPlanner.findBestExp(HepPlanner.java:194)
> at 
> org.apache.hadoop.hive.ql.parse.CalcitePlanner$CalcitePlannerAction.hepPlan(CalcitePlanner.java:1265)
> at 
> org.apache.hadoop.hive.ql.parse.CalcitePlanner$CalcitePlannerAction.applyPreJoinOrderingTransforms(CalcitePlanner.java:1125)
> at 
> org.apache.hadoop.hive.ql.parse.CalcitePlanner$CalcitePlannerAction.apply(CalcitePlanner.java:938)
> at 
> org.apache.hadoop.hive.ql.parse.CalcitePlanner$CalcitePlannerAction.apply(CalcitePlanner.java:878)
> at org.apache.calcite.tools.Frameworks$1.apply(Frameworks.java:113)
> at 
> org.apache.calcite.prepare.CalcitePrepareImpl.perform(CalcitePrepareImpl.java:969)
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (HIVE-13094) CBO: Assertion error in Case expression

2016-02-23 Thread Jesus Camacho Rodriguez (JIRA)

[ 
https://issues.apache.org/jira/browse/HIVE-13094?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15158822#comment-15158822
 ] 

Jesus Camacho Rodriguez commented on HIVE-13094:


[~pxiong], could you take a look?

When we fold the CASE expression _expr1_, if we are left only with a single 
expression _expr2_, we need to add a cast on top of it; otherwise, if the type 
of _expr1_ is different than the one of _expr2_, Calcite will throw an error.

This fix will need to be ported to Calcite.

> CBO: Assertion error  in Case expression
> 
>
> Key: HIVE-13094
> URL: https://issues.apache.org/jira/browse/HIVE-13094
> Project: Hive
>  Issue Type: Bug
>  Components: CBO
>Affects Versions: 2.0.0, 2.1.0
>Reporter: Gopal V
>Assignee: Jesus Camacho Rodriguez
> Attachments: HIVE-13094.01.patch, HIVE-13094.patch
>
>
> Triggered by a trap case in the case evaluation
> {code}
> CASE WHEN (-2) >= 0  THEN SUBSTRING(str0, 1,CAST((-2) AS INT)) ELSE NULL
> {code}
> {code}
> Exception in thread "b367ad08-d900-4672-8e75-a4e90a52141b 
> b367ad08-d900-4672-8e75-a4e90a52141b main" java.lang.AssertionError: Internal 
> error: Cannot add expression of different type to set:
> set type is RecordType(VARCHAR(2147483647) CHARACTER SET "ISO-8859-1" COLLATE 
> "ISO-8859-1$en_US$primary" $f0, VARCHAR(2147483647) CHARACTER SET 
> "ISO-8859-1" COLLATE "ISO-8859-1$en_US$primary" $f1, VARCL
> expression type is RecordType(VARCHAR(2147483647) CHARACTER SET "ISO-8859-1" 
> COLLATE "ISO-8859-1$en_US$primary" $f0, VARCHAR(2147483647) CHARACTER SET 
> "ISO-8859-1" COLLATE "ISO-8859-1$en_US$primary" $fL
> set is 
> rel#12408:HiveProject.HIVE.[](input=HepRelVertex#12407,$f0=$0,$f1=$6,$f2=CASE(>=(-(2),
>  0), substring($6, 1, -(2)), null))
> expression is HiveProject#12414
> at org.apache.calcite.util.Util.newInternal(Util.java:774)
> at 
> org.apache.calcite.plan.RelOptUtil.verifyTypeEquivalence(RelOptUtil.java:317)
> at 
> org.apache.calcite.plan.hep.HepRuleCall.transformTo(HepRuleCall.java:57)
> at 
> org.apache.calcite.plan.RelOptRuleCall.transformTo(RelOptRuleCall.java:224)
> at 
> org.apache.hadoop.hive.ql.optimizer.calcite.rules.HiveReduceExpressionsRule$ProjectReduceExpressionsRule.onMatch(HiveReduceExpressionsRule.java:208)
> at 
> org.apache.calcite.plan.AbstractRelOptPlanner.fireRule(AbstractRelOptPlanner.java:318)
> at 
> org.apache.calcite.plan.hep.HepPlanner.applyRule(HepPlanner.java:514)
> at 
> org.apache.calcite.plan.hep.HepPlanner.applyRules(HepPlanner.java:392)
> at 
> org.apache.calcite.plan.hep.HepPlanner.executeInstruction(HepPlanner.java:285)
> at 
> org.apache.calcite.plan.hep.HepInstruction$RuleCollection.execute(HepInstruction.java:72)
> at 
> org.apache.calcite.plan.hep.HepPlanner.executeProgram(HepPlanner.java:207)
> at 
> org.apache.calcite.plan.hep.HepPlanner.findBestExp(HepPlanner.java:194)
> at 
> org.apache.hadoop.hive.ql.parse.CalcitePlanner$CalcitePlannerAction.hepPlan(CalcitePlanner.java:1265)
> at 
> org.apache.hadoop.hive.ql.parse.CalcitePlanner$CalcitePlannerAction.applyPreJoinOrderingTransforms(CalcitePlanner.java:1125)
> at 
> org.apache.hadoop.hive.ql.parse.CalcitePlanner$CalcitePlannerAction.apply(CalcitePlanner.java:938)
> at 
> org.apache.hadoop.hive.ql.parse.CalcitePlanner$CalcitePlannerAction.apply(CalcitePlanner.java:878)
> at org.apache.calcite.tools.Frameworks$1.apply(Frameworks.java:113)
> at 
> org.apache.calcite.prepare.CalcitePrepareImpl.perform(CalcitePrepareImpl.java:969)
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (HIVE-13094) CBO: Assertion error in Case expression

2016-02-22 Thread Hive QA (JIRA)

[ 
https://issues.apache.org/jira/browse/HIVE-13094?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15157903#comment-15157903
 ] 

Hive QA commented on HIVE-13094:




Here are the results of testing the latest attachment:
https://issues.apache.org/jira/secure/attachment/12789019/HIVE-13094.patch

{color:green}SUCCESS:{color} +1 due to 1 test(s) being added or modified.

{color:red}ERROR:{color} -1 due to 8 failed/errored test(s), 9785 tests executed
*Failed tests:*
{noformat}
TestMiniTezCliDriver-vectorization_10.q-schema_evol_orc_acidvec_mapwork_part.q-vector_non_string_partition.q-and-12-more
 - did not produce a TEST-*.xml file
TestSparkCliDriver-timestamp_lazy.q-bucketsortoptimize_insert_4.q-date_udf.q-and-12-more
 - did not produce a TEST-*.xml file
org.apache.hadoop.hive.cli.TestCliDriver.testCliDriver_partition_coltype_literals
org.apache.hadoop.hive.cli.TestCliDriver.testCliDriver_vectorization_short_regress
org.apache.hadoop.hive.cli.TestMiniTezCliDriver.testCliDriver_vectorization_short_regress
org.apache.hadoop.hive.cli.TestNegativeCliDriver.testNegativeCliDriver_authorization_uri_import
org.apache.hadoop.hive.cli.TestSparkCliDriver.testCliDriver_vectorization_short_regress
org.apache.hive.jdbc.TestSSL.testSSLVersion
{noformat}

Test results: 
http://ec2-174-129-184-35.compute-1.amazonaws.com/jenkins/job/PreCommit-HIVE-TRUNK-Build/7060/testReport
Console output: 
http://ec2-174-129-184-35.compute-1.amazonaws.com/jenkins/job/PreCommit-HIVE-TRUNK-Build/7060/console
Test logs: 
http://ec2-174-129-184-35.compute-1.amazonaws.com/logs/PreCommit-HIVE-TRUNK-Build-7060/

Messages:
{noformat}
Executing org.apache.hive.ptest.execution.TestCheckPhase
Executing org.apache.hive.ptest.execution.PrepPhase
Executing org.apache.hive.ptest.execution.ExecutionPhase
Executing org.apache.hive.ptest.execution.ReportingPhase
Tests exited with: TestsFailedException: 8 tests failed
{noformat}

This message is automatically generated.

ATTACHMENT ID: 12789019 - PreCommit-HIVE-TRUNK-Build

> CBO: Assertion error  in Case expression
> 
>
> Key: HIVE-13094
> URL: https://issues.apache.org/jira/browse/HIVE-13094
> Project: Hive
>  Issue Type: Bug
>  Components: CBO
>Affects Versions: 2.0.0, 2.1.0
>Reporter: Gopal V
>Assignee: Jesus Camacho Rodriguez
> Attachments: HIVE-13094.patch
>
>
> Triggered by a trap case in the case evaluation
> {code}
> CASE WHEN (-2) >= 0  THEN SUBSTRING(str0, 1,CAST((-2) AS INT)) ELSE NULL
> {code}
> {code}
> Exception in thread "b367ad08-d900-4672-8e75-a4e90a52141b 
> b367ad08-d900-4672-8e75-a4e90a52141b main" java.lang.AssertionError: Internal 
> error: Cannot add expression of different type to set:
> set type is RecordType(VARCHAR(2147483647) CHARACTER SET "ISO-8859-1" COLLATE 
> "ISO-8859-1$en_US$primary" $f0, VARCHAR(2147483647) CHARACTER SET 
> "ISO-8859-1" COLLATE "ISO-8859-1$en_US$primary" $f1, VARCL
> expression type is RecordType(VARCHAR(2147483647) CHARACTER SET "ISO-8859-1" 
> COLLATE "ISO-8859-1$en_US$primary" $f0, VARCHAR(2147483647) CHARACTER SET 
> "ISO-8859-1" COLLATE "ISO-8859-1$en_US$primary" $fL
> set is 
> rel#12408:HiveProject.HIVE.[](input=HepRelVertex#12407,$f0=$0,$f1=$6,$f2=CASE(>=(-(2),
>  0), substring($6, 1, -(2)), null))
> expression is HiveProject#12414
> at org.apache.calcite.util.Util.newInternal(Util.java:774)
> at 
> org.apache.calcite.plan.RelOptUtil.verifyTypeEquivalence(RelOptUtil.java:317)
> at 
> org.apache.calcite.plan.hep.HepRuleCall.transformTo(HepRuleCall.java:57)
> at 
> org.apache.calcite.plan.RelOptRuleCall.transformTo(RelOptRuleCall.java:224)
> at 
> org.apache.hadoop.hive.ql.optimizer.calcite.rules.HiveReduceExpressionsRule$ProjectReduceExpressionsRule.onMatch(HiveReduceExpressionsRule.java:208)
> at 
> org.apache.calcite.plan.AbstractRelOptPlanner.fireRule(AbstractRelOptPlanner.java:318)
> at 
> org.apache.calcite.plan.hep.HepPlanner.applyRule(HepPlanner.java:514)
> at 
> org.apache.calcite.plan.hep.HepPlanner.applyRules(HepPlanner.java:392)
> at 
> org.apache.calcite.plan.hep.HepPlanner.executeInstruction(HepPlanner.java:285)
> at 
> org.apache.calcite.plan.hep.HepInstruction$RuleCollection.execute(HepInstruction.java:72)
> at 
> org.apache.calcite.plan.hep.HepPlanner.executeProgram(HepPlanner.java:207)
> at 
> org.apache.calcite.plan.hep.HepPlanner.findBestExp(HepPlanner.java:194)
> at 
> org.apache.hadoop.hive.ql.parse.CalcitePlanner$CalcitePlannerAction.hepPlan(CalcitePlanner.java:1265)
> at 
> org.apache.hadoop.hive.ql.parse.CalcitePlanner$CalcitePlannerAction.applyPreJoinOrderingTransforms(CalcitePlanner.java:1125)
> at 
> org.apache.hadoop.hive.ql.parse.CalcitePlanner$CalcitePlannerAction.apply(CalcitePlanner.java:938)
> at