You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2020/12/22 13:34:38 UTC
[GitHub] [spark] LuciferYang edited a comment on pull request #30484: [SPARK-33532][SQL] Remove unreachable branch in SpecificParquetRecordReaderBase.initialize method
LuciferYang edited a comment on pull request #30484:
URL: https://github.com/apache/spark/pull/30484#issuecomment-749542175
The branch to be deleted in current pr is from SPARK-11787,.
In SPARK-11787`SqlNewHadoopPartition` create `UnsafeRowParquetRecordReader` when `spark.parquet.enableUnsafeRowRecordReader` is true and data format is `org.apache.parquet.hadoop.ParquetInputFormat`
The key point is the `ParquetInputSplit` pass to `UnsafeRowParquetRecordReader.init` method, if `rowGroupOffsets` in `ParquetInputSplit` is not null will enter the code branch which I want to delete in this pr.
`ParquetInputSplit` produce by `SqlNewHadoopRDD#getPartitions` use `ParquetInputFormat.getSplits` method.
https://github.com/apache/parquet-mr/blob/32c46643845ea8a705c35d4ec8fc654cc8ff816d/parquet-hadoop/src/main/java/org/apache/parquet/hadoop/ParquetInputFormat.java#L287-L306
The `else branch` will create a `ParquetInputSplit` and `rowGroupOffsets` not null, further calls are as follows:
```
ParquetInputFormat#getSplits(JobContext)
-> ParquetInputFormat#getSplits(Configuration,List<Footer>)
-> ClientSideMetadataSplitStrategy#getSplits
-> ClientSideMetadataSplitStrategy#generateSplits
-> ClientSideMetadataSplitStrategy.SplitInfo#getParquetInputSplit
```
https://github.com/apache/parquet-mr/blob/32c46643845ea8a705c35d4ec8fc654cc8ff816d/parquet-hadoop/src/main/java/org/apache/parquet/hadoop/ParquetInputFormat.java#L635-L649
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org