maryannxue commented on a change in pull request #33541:
URL: https://github.com/apache/spark/pull/33541#discussion_r678575690
##########
File path:
sql/core/src/main/scala/org/apache/spark/sql/execution/adaptive/AQEShuffleReadExec.scala
##########
@@ -112,6 +128,14 @@ case class AQEShuffleReadExec private(
partitionSpecs.exists(_.isInstanceOf[PartialMapperPartitionSpec]) ||
partitionSpecs.exists(_.isInstanceOf[CoalescedMapperPartitionSpec])
+ def isCoalescedRead: Boolean = {
+ // We need to make sure there is no repeated partition spec, which is the
repeated side of the
+ // skew join shuffle reader and is not a coalesced reader.
+ partitionSpecs.forall(_.isInstanceOf[CoalescedPartitionSpec]) &&
partitionSpecs.collect {
+ case CoalescedPartitionSpec(start, end, _) => start -> end
+ }.distinct.length == partitionSpecs.length
Review comment:
not sure, but would for loop would be more efficient here? just check
"last end" == "current start".
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]