You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@spark.apache.org by ma...@apache.org on 2014/09/03 05:49:44 UTC

git commit: [SQL] Renamed ColumnStat to ColumnMetrics to avoid confusion between ColumnStats

Repository: spark
Updated Branches:
  refs/heads/master 0cd91f666 -> 19d3e1e8e


[SQL] Renamed ColumnStat to ColumnMetrics to avoid confusion between ColumnStats

Class names of these two are just too similar.

Author: Cheng Lian <li...@gmail.com>

Closes #2189 from liancheng/column-metrics and squashes the following commits:

8bb3b21 [Cheng Lian] Renamed ColumnStat to ColumnMetrics to avoid confusion between ColumnStats


Project: http://git-wip-us.apache.org/repos/asf/spark/repo
Commit: http://git-wip-us.apache.org/repos/asf/spark/commit/19d3e1e8
Tree: http://git-wip-us.apache.org/repos/asf/spark/tree/19d3e1e8
Diff: http://git-wip-us.apache.org/repos/asf/spark/diff/19d3e1e8

Branch: refs/heads/master
Commit: 19d3e1e8e9c25c0936c0ad6efbc2092b473723aa
Parents: 0cd91f6
Author: Cheng Lian <li...@gmail.com>
Authored: Tue Sep 2 20:49:36 2014 -0700
Committer: Michael Armbrust <mi...@databricks.com>
Committed: Tue Sep 2 20:49:36 2014 -0700

----------------------------------------------------------------------
 .../org/apache/spark/sql/execution/debug/package.scala    | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/spark/blob/19d3e1e8/sql/core/src/main/scala/org/apache/spark/sql/execution/debug/package.scala
----------------------------------------------------------------------
diff --git a/sql/core/src/main/scala/org/apache/spark/sql/execution/debug/package.scala b/sql/core/src/main/scala/org/apache/spark/sql/execution/debug/package.scala
index 8ff757b..a9535a7 100644
--- a/sql/core/src/main/scala/org/apache/spark/sql/execution/debug/package.scala
+++ b/sql/core/src/main/scala/org/apache/spark/sql/execution/debug/package.scala
@@ -74,22 +74,22 @@ package object debug {
     }
 
     /**
-     * A collection of stats for each column of output.
+     * A collection of metrics for each column of output.
      * @param elementTypes the actual runtime types for the output.  Useful when there are bugs
      *        causing the wrong data to be projected.
      */
-    case class ColumnStat(
+    case class ColumnMetrics(
         elementTypes: Accumulator[HashSet[String]] = sparkContext.accumulator(HashSet.empty))
     val tupleCount = sparkContext.accumulator[Int](0)
 
     val numColumns = child.output.size
-    val columnStats = Array.fill(child.output.size)(new ColumnStat())
+    val columnStats = Array.fill(child.output.size)(new ColumnMetrics())
 
     def dumpStats(): Unit = {
       println(s"== ${child.simpleString} ==")
       println(s"Tuples output: ${tupleCount.value}")
-      child.output.zip(columnStats).foreach { case(attr, stat) =>
-        val actualDataTypes =stat.elementTypes.value.mkString("{", ",", "}")
+      child.output.zip(columnStats).foreach { case(attr, metric) =>
+        val actualDataTypes = metric.elementTypes.value.mkString("{", ",", "}")
         println(s" ${attr.name} ${attr.dataType}: $actualDataTypes")
       }
     }


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@spark.apache.org
For additional commands, e-mail: commits-help@spark.apache.org