You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2021/01/10 18:22:27 UTC
[GitHub] [spark] sunchao commented on a change in pull request #31114: [SPARK-34062][SQL] Call `updateTableStats()` from `AlterTableAddPartitionCommand`
sunchao commented on a change in pull request #31114:
URL: https://github.com/apache/spark/pull/31114#discussion_r554604130
##########
File path: sql/core/src/main/scala/org/apache/spark/sql/execution/command/ddl.scala
##########
@@ -486,18 +486,8 @@ case class AlterTableAddPartitionCommand(
}
sparkSession.catalog.refreshTable(table.identifier.quotedString)
- if (table.stats.nonEmpty) {
- if (sparkSession.sessionState.conf.autoSizeUpdateEnabled) {
- val addedSize = CommandUtils.calculateMultipleLocationSizes(sparkSession, table.identifier,
Review comment:
I think this avoids the external catalog call if `addedSize` is 0, which `updateTableStats` doesn't do, but I guess in most cases `addedSize` should be > 0.
----------------------------------------------------------------
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:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org