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 2019/03/08 21:23:41 UTC
[GitHub] [spark] dongjoon-hyun commented on a change in pull request #22204:
[SPARK-25196][SQL] Moves some functions from AnalyzeColumnCommand to
command/CommandUtils
dongjoon-hyun commented on a change in pull request #22204: [SPARK-25196][SQL] Moves some functions from AnalyzeColumnCommand to command/CommandUtils
URL: https://github.com/apache/spark/pull/22204#discussion_r263934668
##########
File path: sql/core/src/main/scala/org/apache/spark/sql/execution/command/AnalyzeColumnCommand.scala
##########
@@ -57,14 +52,19 @@ case class AnalyzeColumnCommand(
// Compute stats for the computed list of columns.
val (rowCount, newColStats) =
- computeColumnStats(sparkSession, relation, columnsToAnalyze)
+ CommandUtils.computeColumnStats(sparkSession, relation, columnsToAnalyze)
+
+ val newColCatalogStats = newColStats.map {
+ case (attr, columnStat) =>
+ attr.name -> columnStat.toCatalogColumnStat(attr.name, attr.dataType)
+ }
Review comment:
Hi, @maropu . This is additional logic. Could you explain why we need this when we move the functions simply?
----------------------------------------------------------------
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
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org