advancedxy commented on a change in pull request #32450:
URL: https://github.com/apache/spark/pull/32450#discussion_r627935120



##########
File path: 
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/plans/logical/Statistics.scala
##########
@@ -49,12 +50,15 @@ object Statistics {
  * @param attributeStats Statistics for Attributes.
  * @param isRuntime Whether the statistics is inferred from query stage 
runtime statistics during
  *                  adaptive query execution.
+ * @param mapOutputStatistics the map output statistics from query stage 
runtime statistics during
+ *                            adaptive query execution.
  */
 case class Statistics(
     sizeInBytes: BigInt,
     rowCount: Option[BigInt] = None,
     attributeStats: AttributeMap[ColumnStat] = AttributeMap(Nil),
-    isRuntime: Boolean = false) {
+    isRuntime: Boolean = false,
+    mapOutputStatistics: Option[MapOutputStatistics] = None) {

Review comment:
       FYI, we took anther approach to support SHJ in AQE. We added a rule in 
`AdaptiveSparkPlanExec` to convert SMJ to SHJ according to shuffle stats, which 
requires no changes in `Statistics.scala` as the statistics is ready in 
`ShuffleStageInfo`.
   
   The SMJ could also be converted to SHJ if applicable even if 
`PREFER_SORTMERGE` is set. cc @Liulietong
   
   cc @luuliietong




-- 
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]



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

Reply via email to