Github user davies commented on a diff in the pull request: https://github.com/apache/spark/pull/13442#discussion_r65937515 --- Diff: sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/FileSourceStrategy.scala --- @@ -143,8 +143,18 @@ private[sql] object FileSourceStrategy extends Strategy with Logging { val defaultParallelism = files.sparkSession.sparkContext.defaultParallelism val totalBytes = selectedPartitions.flatMap(_.files.map(_.getLen + openCostInBytes)).sum val bytesPerCore = totalBytes / defaultParallelism - val maxSplitBytes = Math.min(defaultMaxSplitBytes, - Math.max(openCostInBytes, bytesPerCore)) + val maxSplitBytes = { + // Since `LineRecordReader` in hadoop cannot split files compressed by some codecs + // (e.g., gzip), check if all the input files are splittable here. + if (files.fileFormat.canSplitFiles( --- End diff -- I think we should check the file whether it's splittable or not one by one, do not split it if it's not.
--- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. --- --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org