Github user schlosna commented on a diff in the pull request:

    https://github.com/apache/spark/pull/15835#discussion_r87597457
  
    --- Diff: 
sql/core/src/main/scala/org/apache/spark/sql/execution/DataSourceScanExec.scala 
---
    @@ -478,23 +491,33 @@ case class FileSourceScanExec(
         logInfo(s"Planning scan with bin packing, max size: $maxSplitBytes 
bytes, " +
           s"open cost is considered as scanning $openCostInBytes bytes.")
     
    -    val splitFiles = selectedPartitions.flatMap { partition =>
    -      partition.files.flatMap { file =>
    -        val blockLocations = getBlockLocations(file)
    -        if (fsRelation.fileFormat.isSplitable(
    -            fsRelation.sparkSession, fsRelation.options, file.getPath)) {
    -          (0L until file.getLen by maxSplitBytes).map { offset =>
    -            val remaining = file.getLen - offset
    +    val partitionFiles = selectedPartitions.flatMap { partition =>
    +      partition.files.map((_, partition.values))
    +    }
    +    val splitFiles = partitionFiles.flatMap { case (file, values) =>
    +      val blockLocations = getBlockLocations(file)
    +      val filePath = file.getPath.toUri.toString
    +      val format = relation.fileFormat
    --- End diff --
    
    nit: `val format` seems unused, should this be removed or changed to `val 
format = fsRelation.fileFormat` and use `format` below?


---
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 [email protected] or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to