You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@spark.apache.org by gu...@apache.org on 2022/01/05 11:09:27 UTC

[spark] branch master updated: [SPARK-37800][SQL][FOLLOW-UP] Remove duplicated LogicalPlan inheritance

This is an automated email from the ASF dual-hosted git repository.

gurwls223 pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/spark.git


The following commit(s) were added to refs/heads/master by this push:
     new b902ecc  [SPARK-37800][SQL][FOLLOW-UP] Remove duplicated LogicalPlan inheritance
b902ecc is described below

commit b902ecc21c29e62e729830c22d5e81ed17ab994f
Author: Hyukjin Kwon <gu...@apache.org>
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 <gu...@apache.org>
    Signed-off-by: Hyukjin Kwon <gu...@apache.org>
---
 .../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: commits-unsubscribe@spark.apache.org
For additional commands, e-mail: commits-help@spark.apache.org