viirya commented on code in PR #39633: URL: https://github.com/apache/spark/pull/39633#discussion_r1097811900
########## sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/v2/BatchScanExec.scala: ########## @@ -132,12 +140,66 @@ case class BatchScanExec( outputPartitioning match { case p: KeyGroupedPartitioning => - val partitionMapping = finalPartitions.map(s => - s.head.asInstanceOf[HasPartitionKey].partitionKey() -> s).toMap - finalPartitions = p.partitionValues.map { partValue => - // Use empty partition for those partition values that are not present - partitionMapping.getOrElse(partValue, Seq.empty) + // This means the input partitions are not grouped by partition values. We'll need to + // check `groupByPartitionValues` and decide whether to group and replicate splits within + // a partition. Review Comment: Does this comment need to be moved below on top of `if (commonPartitionKeys.isDefined ...`? -- 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. To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org