[ 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-unsubscr...@spark.apache.org For additional commands, e-mail: issues-h...@spark.apache.org