Return-Path: X-Original-To: apmail-hive-issues-archive@minotaur.apache.org Delivered-To: apmail-hive-issues-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 7A5B5181D4 for ; Tue, 23 Feb 2016 12:47:17 +0000 (UTC) Received: (qmail 89197 invoked by uid 500); 23 Feb 2016 12:46:18 -0000 Delivered-To: apmail-hive-issues-archive@hive.apache.org Received: (qmail 89154 invoked by uid 500); 23 Feb 2016 12:46:18 -0000 Mailing-List: contact issues-help@hive.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@hive.apache.org Delivered-To: mailing list issues@hive.apache.org Received: (qmail 88848 invoked by uid 99); 23 Feb 2016 12:46:18 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 23 Feb 2016 12:46:18 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id 745E02C1F60 for ; Tue, 23 Feb 2016 12:46:18 +0000 (UTC) Date: Tue, 23 Feb 2016 12:46:18 +0000 (UTC) From: "Jesus Camacho Rodriguez (JIRA)" To: issues@hive.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Updated] (HIVE-13094) CBO: Assertion error in Case expression MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/HIVE-13094?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Jesus Camacho Rodriguez updated HIVE-13094: ------------------------------------------- Status: Open (was: Patch Available) > 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 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)