From issues-return-159437-archive-asf-public=cust-asf.ponee.io@hive.apache.org Wed Jun 5 22:42:02 2019 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [207.244.88.153]) by mx-eu-01.ponee.io (Postfix) with SMTP id E48B218065D for ; Thu, 6 Jun 2019 00:42:01 +0200 (CEST) Received: (qmail 74207 invoked by uid 500); 5 Jun 2019 22:42:01 -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 74181 invoked by uid 99); 5 Jun 2019 22:42:01 -0000 Received: from mailrelay1-us-west.apache.org (HELO mailrelay1-us-west.apache.org) (209.188.14.139) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 05 Jun 2019 22:42:01 +0000 Received: from jira-lw-us.apache.org (unknown [207.244.88.139]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id 92824E2831 for ; Wed, 5 Jun 2019 22:42:00 +0000 (UTC) Received: from jira-lw-us.apache.org (localhost [127.0.0.1]) by jira-lw-us.apache.org (ASF Mail Server at jira-lw-us.apache.org) with ESMTP id 532A22459A for ; Wed, 5 Jun 2019 22:42:00 +0000 (UTC) Date: Wed, 5 Jun 2019 22:42:00 +0000 (UTC) From: "Vineet Garg (JIRA)" To: issues@hive.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Updated] (HIVE-21742) Vectorization: CASE result type casting 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-21742?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Vineet Garg updated HIVE-21742: ------------------------------- Attachment: HIVE-21742.5.patch > Vectorization: CASE result type casting > --------------------------------------- > > Key: HIVE-21742 > URL: https://issues.apache.org/jira/browse/HIVE-21742 > Project: Hive > Issue Type: Bug > Components: Logical Optimizer, Vectorization > Affects Versions: 3.1.1 > Reporter: Gopal V > Assignee: Vineet Garg > Priority: Major > Labels: pull-request-available > Attachments: HIVE-21742.1.patch, HIVE-21742.2.patch, HIVE-21742.3.patch, HIVE-21742.4.patch, HIVE-21742.5.patch, HIVE-21799.4.patch > > Time Spent: 3h 20m > Remaining Estimate: 0h > > {code} > create temporary table foo(q548284 int); > insert into foo values(1),(2),(3),(4),(5),(6); > select q548284, CASE WHEN ((q548284 = 1)) THEN (0.2) WHEN ((q548284 = 2)) THEN (0.4) WHEN ((q548284 = 3)) THEN (0.6) WHEN ((q548284 = 4)) THEN (0.8) WHEN ((q548284 = 5)) THEN (1) ELSE (null) END from foo order by q548284 limit 1; > {code} > Fails with > {code} > Caused by: java.lang.ClassCastException: org.apache.hadoop.hive.ql.exec.vector.LongColumnVector cannot be cast to org.apache.hadoop.hive.ql.exec.vector.DecimalColumnVector > at org.apache.hadoop.hive.ql.exec.vector.DecimalColumnVector.setElement(DecimalColumnVector.java:130) > at org.apache.hadoop.hive.ql.exec.vector.expressions.IfExprColumnNull.evaluate(IfExprColumnNull.java:101) > {code} > This gets fixed if the case return of (1) is turned into a (1.0). -- This message was sent by Atlassian JIRA (v7.6.3#76005)