bersprockets commented on a change in pull request #26016: [SPARK-24914][SQL]
New statistic to improve data size estimate for columnar storage formats
URL: https://github.com/apache/spark/pull/26016#discussion_r332283138
##########
File path:
sql/core/src/main/scala/org/apache/spark/sql/execution/command/CommandUtils.scala
##########
@@ -45,42 +48,87 @@ object CommandUtils extends Logging {
val catalog = sparkSession.sessionState.catalog
if (sparkSession.sessionState.conf.autoSizeUpdateEnabled) {
val newTable = catalog.getTableMetadata(table.identifier)
- val newSize = CommandUtils.calculateTotalSize(sparkSession, newTable)
- val newStats = CatalogStatistics(sizeInBytes = newSize)
+ val oldDeserFactor = newTable.stats.flatMap(_.deserFactor)
+ val newSizeWithDeserFactor =
CommandUtils.calculateTotalSize(sparkSession, newTable)
Review comment:
So if the user leaves spark.sql.statistics.deserFactor.calc.enabled set to
true all the time, will Spark recalculate the deserFactor each time the table's
data is updated (e.g., InsertIntoHiveTable)?
----------------------------------------------------------------
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]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]