Github user ericl commented on a diff in the pull request:

    https://github.com/apache/spark/pull/15515#discussion_r84978505
  
    --- Diff: 
sql/core/src/main/scala/org/apache/spark/sql/execution/command/AnalyzeColumnCommand.scala
 ---
    @@ -50,7 +50,8 @@ case class AnalyzeColumnCommand(
               AnalyzeTableCommand.calculateTotalSize(sessionState, 
catalogRel.catalogTable))
     
           case logicalRel: LogicalRelation if 
logicalRel.catalogTable.isDefined =>
    -        updateStats(logicalRel.catalogTable.get, 
logicalRel.relation.sizeInBytes)
    +        updateStats(logicalRel.catalogTable.get,
    +          AnalyzeTableCommand.calculateTotalSize(sessionState, 
logicalRel.catalogTable.get))
    --- End diff --
    
    This is needed since the logical relation `sizeInBytes` is no longer the 
latest size. Previously ListingFileCatalog would compute the size, but 
TableFileCatalog just reads whatever size was present in the table metadata 
last.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to