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

    https://github.com/apache/spark/pull/15090#discussion_r79571121
  
    --- Diff: 
sql/core/src/main/scala/org/apache/spark/sql/execution/command/AnalyzeTableCommand.scala
 ---
    @@ -129,3 +89,51 @@ case class AnalyzeTableCommand(tableName: String, 
noscan: Boolean = true) extend
         Seq.empty[Row]
       }
     }
    +
    +object AnalyzeTableCommand extends Logging {
    +
    +  def calculateTotalSize(sparkSession: SparkSession, catalogTable: 
CatalogTable): Long = {
    +    // This method is mainly based on
    +    // 
org.apache.hadoop.hive.ql.stats.StatsUtils.getFileSizeForTable(HiveConf, Table)
    +    // in Hive 0.13 (except that we do not use fs.getContentSummary).
    +    // TODO: Generalize statistics collection.
    +    // TODO: Why fs.getContentSummary returns wrong size on Jenkins?
    +    // Can we use fs.getContentSummary in future?
    +    // Seems fs.getContentSummary returns wrong table size on Jenkins. So 
we use
    +    // countFileSize to count the table size.
    +    val stagingDir =
    +    sparkSession.sessionState.conf.getConfString("hive.exec.stagingdir", 
".hive-staging")
    --- End diff --
    
    FYI - there is an Indentation mistake here.


---
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 infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org

Reply via email to