Return-Path: X-Original-To: apmail-hive-dev-archive@www.apache.org Delivered-To: apmail-hive-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id DF262107BC for ; Tue, 2 Dec 2014 22:37:15 +0000 (UTC) Received: (qmail 56696 invoked by uid 500); 2 Dec 2014 22:37:14 -0000 Delivered-To: apmail-hive-dev-archive@hive.apache.org Received: (qmail 56601 invoked by uid 500); 2 Dec 2014 22:37:14 -0000 Mailing-List: contact dev-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 dev@hive.apache.org Received: (qmail 56489 invoked by uid 500); 2 Dec 2014 22:37:14 -0000 Delivered-To: apmail-hadoop-hive-dev@hadoop.apache.org Received: (qmail 56475 invoked by uid 99); 2 Dec 2014 22:37:14 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 02 Dec 2014 22:37:14 +0000 Date: Tue, 2 Dec 2014 22:37:14 +0000 (UTC) From: =?utf-8?Q?Sergio_Pe=C3=B1a_=28JIRA=29?= To: hive-dev@hadoop.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Updated] (HIVE-8870) errors when selecting a struct field within an array from ORC based tables MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/HIVE-8870?page=3Dcom.atlassian= .jira.plugin.system.issuetabpanels:all-tabpanel ] Sergio Pe=C3=B1a updated HIVE-8870: ------------------------------ Status: Patch Available (was: Open) > errors when selecting a struct field within an array from ORC based table= s > -------------------------------------------------------------------------= - > > Key: HIVE-8870 > URL: https://issues.apache.org/jira/browse/HIVE-8870 > Project: Hive > Issue Type: Bug > Components: File Formats, Query Processor > Affects Versions: 0.13.0, 0.14.0 > Environment: HDP 2.1 / HDP 2.2 (YARN, but no Tez) > Reporter: Michael Haeusler > Assignee: Sergio Pe=C3=B1a > Attachments: HIVE-8870.3.patch > > > When using ORC as storage for a table, we get errors on selecting a struc= t field within an array. These errors do not appear with default format. > {code:sql} > CREATE TABLE `foobar_orc`( > `uid` bigint, > `elements` array>>) > STORED AS ORC; > {code} > When selecting from this _empty_ table, we get a direct NPE within the Hi= ve CLI: > {code:sql} > SELECT > elements.elementId > FROM > foobar_orc; > -- FAILED: RuntimeException java.lang.NullPointerException > {code} > A more real-world query produces a RuntimeException / NullPointerExceptio= n in the mapper: > {code:sql} > SELECT > uid, > element.elementId > FROM > foobar_orc > LATERAL VIEW > EXPLODE(elements) e AS element; > Error: java.lang.RuntimeException: Error in configuring object > =09at org.apache.hadoop.util.ReflectionUtils.setJobConf(ReflectionUtils.j= ava:109) > [...] > Caused by: java.lang.NullPointerException > =09at org.apache.hadoop.hive.ql.exec.ExprNodeFieldEvaluator.initialize(Ex= prNodeFieldEvaluator.java:61) > [...] > FAILED: Execution Error, return code 2 from org.apache.hadoop.hive.ql.exe= c.mr.MapRedTask > {code} > Both queries run fine on a non-orc table: > {code:sql} > CREATE TABLE `foobar`( > `uid` bigint, > `elements` array>>); =20 > SELECT > elements.elementId > FROM > foobar; > -- OK > -- Time taken: 0.225 seconds > SELECT > uid, > element.elementId > FROM > foobar > LATERAL VIEW > EXPLODE(elements) e AS element; > -- Total MapReduce CPU Time Spent: 1 seconds 920 msec > -- OK > -- Time taken: 25.905 seconds > {code} -- This message was sent by Atlassian JIRA (v6.3.4#6332)