LantaoJin commented on a change in pull request #24527: [SPARK-27635][SQL]
Prevent from splitting too many partitions smaller than row group size in
Parquet file format
URL: https://github.com/apache/spark/pull/24527#discussion_r281057888
##########
File path:
sql/core/src/main/scala/org/apache/spark/sql/execution/DataSourceScanExec.scala
##########
@@ -420,8 +420,12 @@ case class FileSourceScanExec(
selectedPartitions: Seq[PartitionDirectory],
fsRelation: HadoopFsRelation): RDD[InternalRow] = {
val openCostInBytes =
fsRelation.sparkSession.sessionState.conf.filesOpenCostInBytes
- val maxSplitBytes =
- FilePartition.maxSplitBytes(fsRelation.sparkSession, selectedPartitions)
+ val maxSplitBytes = relation.fileFormat match {
+ case _ : ParquetSource =>
+ fsRelation.sparkSession.sessionState.conf.filesMaxPartitionBytes //
parquet.block.size
Review comment:
Actually, `ParquetSource` here is alias of `ParquetFileFormat`
```scala
import org.apache.spark.sql.execution.datasources.parquet.{ParquetFileFormat
=> ParquetSource}
```
----------------------------------------------------------------
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:
[email protected]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]