Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Incomplete
-
1.4.0
-
None
Description
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
Attachments
Issue Links
- relates to
-
SPARK-6489 Optimize lateral view with explode to not read unnecessary columns
- Resolved