ulysses-you commented on a change in pull request #33651:
URL: https://github.com/apache/spark/pull/33651#discussion_r683912356



##########
File path: 
sql/core/src/main/scala/org/apache/spark/sql/execution/adaptive/LogicalQueryStage.scala
##########
@@ -54,4 +54,6 @@ case class LogicalQueryStage(
     }
     physicalStats.getOrElse(logicalPlan.stats)
   }
+
+  override def maxRows: Option[Long] = 
stats.rowCount.map(_.min(Long.MaxValue).toLong)

Review comment:
       If there is other physical nodes above `QueryStageExec` the stats is not 
accurate. Seems the only node can exist here is aggregate, so the maxRows is 
still accurate.




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

Reply via email to