cloud-fan commented on a change in pull request #33286:
URL: https://github.com/apache/spark/pull/33286#discussion_r670966052
##########
File path:
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/plans/logical/Statistics.scala
##########
@@ -119,6 +120,18 @@ case class ColumnStat(
maxLen = maxLen,
histogram = histogram,
version = version)
+
+ def updateCountStats(
+ oldNumRows: BigInt,
+ newNumRows: BigInt,
+ updatedColumnStatOpt: Option[ColumnStat] = None): ColumnStat = {
Review comment:
Ah I see the related code
```
else if (colStat.distinctCount.get > 1) {
// Update ndv based on the overall filter selectivity: scale down
ndv if the number of rows
// decreases; otherwise keep it unchanged.
Some(EstimationUtils.updateNdv(oldNumRows = rowsBeforeFilter,
newNumRows = rowsAfterFilter, oldNdv =
oriColStat.distinctCount.get))
```
--
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]