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 2C1F910456 for ; Wed, 2 Sep 2015 08:11:46 +0000 (UTC) Received: (qmail 49248 invoked by uid 500); 2 Sep 2015 08:11:46 -0000 Delivered-To: apmail-hive-issues-archive@hive.apache.org Received: (qmail 49223 invoked by uid 500); 2 Sep 2015 08:11:46 -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 49210 invoked by uid 99); 2 Sep 2015 08:11:46 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 02 Sep 2015 08:11:46 +0000 Date: Wed, 2 Sep 2015 08:11:46 +0000 (UTC) From: "Lars Francke (JIRA)" To: issues@hive.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Assigned] (HIVE-11708) Logical operators raises ClassCastExceptions with NULL 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-11708?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Lars Francke reassigned HIVE-11708: ----------------------------------- Assignee: Lars Francke > Logical operators raises ClassCastExceptions with NULL > ------------------------------------------------------ > > Key: HIVE-11708 > URL: https://issues.apache.org/jira/browse/HIVE-11708 > Project: Hive > Issue Type: Bug > Affects Versions: 0.13.0, 1.2.1 > Reporter: Satoshi Tagomori > Assignee: Lars Francke > > According to Language Manual UDF, logical operators returns NULL if one of arguments is NULL. > https://cwiki.apache.org/confluence/display/Hive/LanguageManual+UDF#LanguageManualUDF-LogicalOperators > But query below fails with ClassCastException. > {code} > SELECT COUNT(*) AS c > FROM tbl > WHERE 1=1 AND NULL > {code} > Exception (on 0.13): > {noformat} > 15/08/27 08:56:23 ERROR ql.Driver: FAILED: ClassCastException org.apache.hadoop.hive.serde2.objectinspector.primitive.WritableVoidObjectInspector cannot be cast to org.apache.hadoop.hive.serde2.objectinspector.primitive.BooleanObjectInspector > java.lang.ClassCastException: org.apache.hadoop.hive.serde2.objectinspector.primitive.WritableVoidObjectInspector cannot be cast to org.apache.hadoop.hive.serde2.objectinspector.primitive.BooleanObjectInspector > at org.apache.hadoop.hive.ql.udf.generic.GenericUDFOPAnd.initialize(GenericUDFOPAnd.java:52) > at org.apache.hadoop.hive.ql.udf.generic.GenericUDF.initializeAndFoldConstants(GenericUDF.java:116) > at org.apache.hadoop.hive.ql.plan.ExprNodeGenericFuncDesc.newInstance(ExprNodeGenericFuncDesc.java:231) > at org.apache.hadoop.hive.ql.parse.TypeCheckProcFactory$DefaultExprProcessor.getXpathOrFuncExprNodeDesc(TypeCheckProcFactory.java:934) > at org.apache.hadoop.hive.ql.parse.TypeCheckProcFactory$DefaultExprProcessor.process(TypeCheckProcFactory.java:1128) > at org.apache.hadoop.hive.ql.lib.DefaultRuleDispatcher.dispatch(DefaultRuleDispatcher.java:90) > at org.apache.hadoop.hive.ql.lib.DefaultGraphWalker.dispatchAndReturn(DefaultGraphWalker.java:94) > at org.apache.hadoop.hive.ql.lib.DefaultGraphWalker.dispatch(DefaultGraphWalker.java:78) > at org.apache.hadoop.hive.ql.lib.DefaultGraphWalker.walk(DefaultGraphWalker.java:132) > at org.apache.hadoop.hive.ql.lib.DefaultGraphWalker.startWalking(DefaultGraphWalker.java:109) > at org.apache.hadoop.hive.ql.parse.TypeCheckProcFactory.genExprNode(TypeCheckProcFactory.java:184) > at org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.genAllExprNodeDesc(SemanticAnalyzer.java:9716) > at org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.genExprNodeDesc(SemanticAnalyzer.java:9672) > at org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.genSelectPlan(SemanticAnalyzer.java:3208) > at org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.genSelectPlan(SemanticAnalyzer.java:3005) > at org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.genPostGroupByBodyPlan(SemanticAnalyzer.java:8228) > at org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.genBodyPlan(SemanticAnalyzer.java:8183) > at org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.genPlan(SemanticAnalyzer.java:9015) > at org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.analyzeInternal(SemanticAnalyzer.java:9281) > at org.apache.hadoop.hive.ql.parse.BaseSemanticAnalyzer.analyze(BaseSemanticAnalyzer.java:327) > at org.apache.hadoop.hive.ql.Driver.compile(Driver.java:427) > at org.apache.hadoop.hive.ql.Driver.compile(Driver.java:323) > at org.apache.hadoop.hive.ql.Driver.compileInternal(Driver.java:980) > at org.apache.hadoop.hive.ql.Driver.runInternal(Driver.java:1045) > at org.apache.hadoop.hive.ql.Driver.run(Driver.java:916) > at org.apache.hadoop.hive.ql.Driver.run(Driver.java:906) > {noformat} > I confirmed that Hive 1.2.1 of HDP2.3 Sandbox also raises this exception. -- This message was sent by Atlassian JIRA (v6.3.4#6332)