[ https://issues.apache.org/jira/browse/SPARK-6016?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Yin Huai updated SPARK-6016: ---------------------------- Description: saveAsTable is fine and seems we have successfully deleted the old data and written the new data. However, when reading the newly created table, an error will be thrown. {code} Error in SQL statement: java.lang.RuntimeException: java.lang.RuntimeException: could not merge metadata: key org.apache.spark.sql.parquet.row.metadata has conflicting values: at parquet.hadoop.api.InitContext.getMergedKeyValueMetaData(InitContext.java:67) at parquet.hadoop.api.ReadSupport.init(ReadSupport.java:84) at org.apache.spark.sql.parquet.FilteringParquetRowInputFormat.getSplits(ParquetTableOperations.scala:469) at parquet.hadoop.ParquetInputFormat.getSplits(ParquetInputFormat.java:245) at org.apache.spark.sql.parquet.ParquetRelation2$$anon$1.getPartitions(newParquet.scala:461) ... {code} If I set spark.sql.parquet.cacheMetadata to false, it's fine to query the data. Note: the newly created table needs to have more than one file to trigger the bug (if there is only a single file, we will not need to merge metadata). was: saveAsTable is fine and seems we have successfully deleted the old data and written the new data. However, when reading the newly created table, an error will be thrown. {code} Error in SQL statement: java.lang.RuntimeException: java.lang.RuntimeException: could not merge metadata: key org.apache.spark.sql.parquet.row.metadata has conflicting values: at parquet.hadoop.api.InitContext.getMergedKeyValueMetaData(InitContext.java:67) at parquet.hadoop.api.ReadSupport.init(ReadSupport.java:84) at org.apache.spark.sql.parquet.FilteringParquetRowInputFormat.getSplits(ParquetTableOperations.scala:469) at parquet.hadoop.ParquetInputFormat.getSplits(ParquetInputFormat.java:245) at org.apache.spark.sql.parquet.ParquetRelation2$$anon$1.getPartitions(newParquet.scala:461) ... {code} If I set spark.sql.parquet.cacheMetadata to false, it's fine to query the data. > Cannot read the parquet table after overwriting the existing table when > spark.sql.parquet.cacheMetadata=true > ------------------------------------------------------------------------------------------------------------ > > Key: SPARK-6016 > URL: https://issues.apache.org/jira/browse/SPARK-6016 > Project: Spark > Issue Type: Bug > Components: SQL > Reporter: Yin Huai > Priority: Blocker > > saveAsTable is fine and seems we have successfully deleted the old data and > written the new data. However, when reading the newly created table, an error > will be thrown. > {code} > Error in SQL statement: java.lang.RuntimeException: > java.lang.RuntimeException: could not merge metadata: key > org.apache.spark.sql.parquet.row.metadata has conflicting values: > at > parquet.hadoop.api.InitContext.getMergedKeyValueMetaData(InitContext.java:67) > at parquet.hadoop.api.ReadSupport.init(ReadSupport.java:84) > at > org.apache.spark.sql.parquet.FilteringParquetRowInputFormat.getSplits(ParquetTableOperations.scala:469) > at > parquet.hadoop.ParquetInputFormat.getSplits(ParquetInputFormat.java:245) > at > org.apache.spark.sql.parquet.ParquetRelation2$$anon$1.getPartitions(newParquet.scala:461) > ... > {code} > If I set spark.sql.parquet.cacheMetadata to false, it's fine to query the > data. > Note: the newly created table needs to have more than one file to trigger the > bug (if there is only a single file, we will not need to merge metadata). -- 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