Return-Path: X-Original-To: apmail-spark-issues-archive@minotaur.apache.org Delivered-To: apmail-spark-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 5E40A182E6 for ; Tue, 23 Jun 2015 18:34:01 +0000 (UTC) Received: (qmail 6968 invoked by uid 500); 23 Jun 2015 18:34:01 -0000 Delivered-To: apmail-spark-issues-archive@spark.apache.org Received: (qmail 6937 invoked by uid 500); 23 Jun 2015 18:34:01 -0000 Mailing-List: contact issues-help@spark.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Delivered-To: mailing list issues@spark.apache.org Received: (qmail 6928 invoked by uid 99); 23 Jun 2015 18:34:01 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 23 Jun 2015 18:34:01 +0000 Date: Tue, 23 Jun 2015 18:34:01 +0000 (UTC) From: "Michael Armbrust (JIRA)" To: issues@spark.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (SPARK-8566) lateral view query blows up unless pushed down to a subquery 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/SPARK-8566?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14598136#comment-14598136 ] Michael Armbrust commented on SPARK-8566: ----------------------------------------- What is the schema of your file? That error sometimes means you have columns with duplicates names. > lateral view query blows up unless pushed down to a subquery > ------------------------------------------------------------ > > Key: SPARK-8566 > URL: https://issues.apache.org/jira/browse/SPARK-8566 > Project: Spark > Issue Type: Bug > Components: Spark Core > Affects Versions: 1.4.0 > Reporter: Eric Friedman > Labels: sparksql > > I have a query which works in Hive but not in SparkSQL against the same Hive metastore unless I introduce a subquery: > select col from table > lateral view explode(map_keys(col_map)) t1 as col > parquet.io.ParquetDecodingException: Can not read value at 0 in block -1 in file hdfs://nameservice1/path/to/parquet.gz > at parquet.hadoop.InternalParquetRecordReader.nextKeyValue(InternalParquetRecordReader.java:213) > at parquet.hadoop.ParquetRecordReader.nextKeyValue(ParquetRecordReader.java:204) > at org.apache.spark.sql.sources.SqlNewHadoopRDD$$anon$1.hasNext(SqlNewHadoopRDD.scala:163) > at org.apache.spark.InterruptibleIterator.hasNext(InterruptibleIterator.scala:39) > but if I rewrite it like so, it works: > select col from (select map_keys(col_map) keys from table) t2 lateral view explode(t2.keys) t1 as col -- This message was sent by Atlassian JIRA (v6.3.4#6332) --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscribe@spark.apache.org For additional commands, e-mail: issues-help@spark.apache.org