This is an automated email from the ASF dual-hosted git repository.
gurwls223 pushed a commit to branch branch-3.2
in repository https://gitbox.apache.org/repos/asf/spark.git
The following commit(s) were added to refs/heads/branch-3.2 by this push:
new 2470640 [SPARK-37800][SQL][FOLLOW-UP] Remove duplicated LogicalPlan
inheritance
2470640 is described below
commit 2470640a606afd433622be585c060cb49076b53c
Author: Hyukjin Kwon <[email protected]>
AuthorDate: Wed Jan 5 20:08:33 2022 +0900
[SPARK-37800][SQL][FOLLOW-UP] Remove duplicated LogicalPlan inheritance
### What changes were proposed in this pull request?
This PR is a followup of https://github.com/apache/spark/pull/35084 that
removes duplicated `LogicalPlan` inheritance because `LeafNode` always inherits
`LogicalPlan`.
### Why are the changes needed?
To make the codes easier to read and less error-prone. e.g., if we switch
`LeafNode` to an abstract class like `LogicalPlan` the complication fails.
To clarify, this is the only `LeafNode` instance in the current codebase
that duplicately inherits `LogicalPlan`.
### Does this PR introduce _any_ user-facing change?
No, virtually no-op for now.
### How was this patch tested?
Existing test cases should cover.
Closes #35105 from HyukjinKwon/SPARK-37800.
Authored-by: Hyukjin Kwon <[email protected]>
Signed-off-by: Hyukjin Kwon <[email protected]>
(cherry picked from commit b902ecc21c29e62e729830c22d5e81ed17ab994f)
Signed-off-by: Hyukjin Kwon <[email protected]>
---
.../test/scala/org/apache/spark/sql/catalyst/trees/TreeNodeSuite.scala | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git
a/sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/trees/TreeNodeSuite.scala
b/sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/trees/TreeNodeSuite.scala
index 481153e..b52ecb5 100644
---
a/sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/trees/TreeNodeSuite.scala
+++
b/sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/trees/TreeNodeSuite.scala
@@ -812,7 +812,7 @@ class TreeNodeSuite extends SparkFunSuite with SQLHelper {
}
test("SPARK-37800: TreeNode.argString incorrectly formats arguments of type
Set[_]") {
- case class Node(set: Set[String], nested: Seq[Set[Int]]) extends
LogicalPlan with LeafNode {
+ case class Node(set: Set[String], nested: Seq[Set[Int]]) extends LeafNode {
val output: Seq[Attribute] = Nil
}
val node = Node(Set("second", "first"), Seq(Set(3, 1), Set(2, 1)))
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]