wangshuo128 commented on a change in pull request #23584:
[SPARK-21213][SQL][FOLLOWUP] Improve partition statistics in
AnalyzePartitionCommand
URL: https://github.com/apache/spark/pull/23584#discussion_r249277729
##########
File path:
sql/core/src/main/scala/org/apache/spark/sql/execution/command/AnalyzePartitionCommand.scala
##########
@@ -110,7 +110,7 @@ case class AnalyzePartitionCommand(
val newTotalSize = CommandUtils.calculateLocationSize(
sessionState, tableMeta.identifier, p.storage.locationUri)
val newRowCount = rowCounts.get(p.spec)
- val newStats = CommandUtils.compareAndGetNewStats(tableMeta.stats,
newTotalSize, newRowCount)
+ val newStats = CommandUtils.compareAndGetNewStats(p.stats, newTotalSize,
newRowCount)
Review comment:
Different. Stats in `tabeMeta` are table level stats, stats in `Partition`
are partition level stats.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]