[GitHub] spark pull request #22908: [MONOR][SQL] Replace all TreeNode's node name in ...

2018-11-01 Thread srowen
Github user srowen commented on a diff in the pull request:

https://github.com/apache/spark/pull/22908#discussion_r230060094
  
--- Diff: 
sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/v2/DataSourceV2Relation.scala
 ---
@@ -56,7 +56,7 @@ case class DataSourceV2Relation(
 
   override def pushedFilters: Seq[Expression] = Seq.empty
 
-  override def simpleString: String = "RelationV2 " + metadataString
+  override def simpleString: String = s"$nodeName " + metadataString
--- End diff --

This uses interpolation and concatenation - just interpolate


---

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



[GitHub] spark pull request #22908: [MONOR][SQL] Replace all TreeNode's node name in ...

2018-10-31 Thread wangyum
Github user wangyum commented on a diff in the pull request:

https://github.com/apache/spark/pull/22908#discussion_r229761443
  
--- Diff: 
sql/core/src/main/scala/org/apache/spark/sql/execution/aggregate/HashAggregateExec.scala
 ---
@@ -932,12 +932,12 @@ case class HashAggregateExec(
 val functionString = 
Utils.truncatedString(allAggregateExpressions, "[", ", ", "]")
 val outputString = Utils.truncatedString(output, "[", ", ", "]")
 if (verbose) {
-  s"HashAggregate(keys=$keyString, functions=$functionString, 
output=$outputString)"
+  s"$nodeName(keys=$keyString, functions=$functionString, 
output=$outputString)"
--- End diff --

We don't need care about `Exec` suffix since it has been replaced:

https://github.com/apache/spark/blob/299d297e250ca3d46616a97e4256aa9ad6a135e5/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/trees/TreeNode.scala#L420-L424


---

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



[GitHub] spark pull request #22908: [MONOR][SQL] Replace all TreeNode's node name in ...

2018-10-31 Thread wangyum
GitHub user wangyum opened a pull request:

https://github.com/apache/spark/pull/22908

[MONOR][SQL] Replace all TreeNode's node name in the simpleString as their 
nodeName

## What changes were proposed in this pull request?

This pr replace all `TreeNode`'s node name in the `simpleString()` as their 
`nodeName`.

## How was this patch tested?

N/A

You can merge this pull request into a Git repository by running:

$ git pull https://github.com/wangyum/spark nodeName

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/spark/pull/22908.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #22908


commit dbf6de445f0459ac211070d0b66f4b6c31e3e94a
Author: Yuming Wang 
Date:   2018-10-31T13:42:54Z

nodeName




---

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