aboutsummaryrefslogtreecommitdiff
path: root/sql/catalyst
diff options
context:
space:
mode:
authorReynold Xin <rxin@databricks.com>2016-04-22 17:43:56 -0700
committerReynold Xin <rxin@databricks.com>2016-04-22 17:43:56 -0700
commitd7d0cad0ad7667c0e09ae01601ee0e4d0b09963c (patch)
tree10ab6d65e25c6451a1cdde83321c989a6e901856 /sql/catalyst
parentc431a76d0628985bb445189b9a2913dd41b86f7b (diff)
downloadspark-d7d0cad0ad7667c0e09ae01601ee0e4d0b09963c.tar.gz
spark-d7d0cad0ad7667c0e09ae01601ee0e4d0b09963c.tar.bz2
spark-d7d0cad0ad7667c0e09ae01601ee0e4d0b09963c.zip
[SPARK-14855][SQL] Add "Exec" suffix to physical operators
## What changes were proposed in this pull request? This patch adds "Exec" suffix to all physical operators. Before this patch, Spark's physical operators and logical operators are named the same (e.g. Project could be logical.Project or execution.Project), which caused small issues in code review and bigger issues in code refactoring. ## How was this patch tested? N/A Author: Reynold Xin <rxin@databricks.com> Closes #12617 from rxin/exec-node.
Diffstat (limited to 'sql/catalyst')
-rw-r--r--sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/trees/TreeNode.scala9
1 files changed, 6 insertions, 3 deletions
diff --git a/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/trees/TreeNode.scala b/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/trees/TreeNode.scala
index 232ca43588..3d0e016a09 100644
--- a/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/trees/TreeNode.scala
+++ b/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/trees/TreeNode.scala
@@ -408,8 +408,11 @@ abstract class TreeNode[BaseType <: TreeNode[BaseType]] extends Product {
}
}
- /** Returns the name of this type of TreeNode. Defaults to the class name. */
- def nodeName: String = getClass.getSimpleName
+ /**
+ * Returns the name of this type of TreeNode. Defaults to the class name.
+ * Note that we remove the "Exec" suffix for physical operators here.
+ */
+ def nodeName: String = getClass.getSimpleName.replaceAll("Exec$", "")
/**
* The arguments that should be included in the arg string. Defaults to the `productIterator`.
@@ -426,7 +429,7 @@ abstract class TreeNode[BaseType <: TreeNode[BaseType]] extends Product {
case other => other :: Nil
}.mkString(", ")
- /** String representation of this node without any children */
+ /** String representation of this node without any children. */
def simpleString: String = s"$nodeName $argString".trim
override def toString: String = treeString