Copilot commented on code in PR #58630:
URL: https://github.com/apache/spark/pull/58630#discussion_r3959845562


##########
sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/parser/PlanParserSuite.scala:
##########
@@ -1056,7 +1056,11 @@ class PlanParserSuite extends AnalysisTest {
           $"u.a",
           None,
           Inner).select(star()))
+    }
+  }
 
+  test("asof join - left asof with on condition") {
+    withSQLConf(SQLConf.SQL_ASOF_JOIN_ENABLED.key -> "true") {

Review Comment:
   The `withSQLConf(SQLConf.SQL_ASOF_JOIN_ENABLED.key -> \"true\")` wrapper is 
duplicated across each newly split test. Consider factoring this into a small 
local helper (e.g., `def withAsofJoinEnabled(f: => Unit)`) or a shared fixture 
to reduce repetition and make future additions less error-prone while keeping 
tests independent.



##########
sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/parser/PlanParserSuite.scala:
##########
@@ -1079,7 +1087,11 @@ class PlanParserSuite extends AnalysisTest {
           None,
           Inner,
           usingColumns = Some(Seq("b"))).select(star()))
+    }
+  }
 
+  test("asof join - using multiple join columns") {
+    withSQLConf(SQLConf.SQL_ASOF_JOIN_ENABLED.key -> "true") {

Review Comment:
   The `withSQLConf(SQLConf.SQL_ASOF_JOIN_ENABLED.key -> \"true\")` wrapper is 
duplicated across each newly split test. Consider factoring this into a small 
local helper (e.g., `def withAsofJoinEnabled(f: => Unit)`) or a shared fixture 
to reduce repetition and make future additions less error-prone while keeping 
tests independent.



##########
sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/parser/PlanParserSuite.scala:
##########
@@ -1067,7 +1071,11 @@ class PlanParserSuite extends AnalysisTest {
           $"u.a",
           Some($"t.b" === $"u.b"),
           LeftOuter).select(star()))
+    }
+  }
 
+  test("asof join - using single join column") {
+    withSQLConf(SQLConf.SQL_ASOF_JOIN_ENABLED.key -> "true") {

Review Comment:
   The `withSQLConf(SQLConf.SQL_ASOF_JOIN_ENABLED.key -> \"true\")` wrapper is 
duplicated across each newly split test. Consider factoring this into a small 
local helper (e.g., `def withAsofJoinEnabled(f: => Unit)`) or a shared fixture 
to reduce repetition and make future additions less error-prone while keeping 
tests independent.



##########
sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/parser/PlanParserSuite.scala:
##########
@@ -1091,7 +1103,11 @@ class PlanParserSuite extends AnalysisTest {
           None,
           Inner,
           usingColumns = Some(Seq("a", "b"))).select(star()))
+    }
+  }
 
+  test("asof join - less than or equal match operator") {
+    withSQLConf(SQLConf.SQL_ASOF_JOIN_ENABLED.key -> "true") {

Review Comment:
   The `withSQLConf(SQLConf.SQL_ASOF_JOIN_ENABLED.key -> \"true\")` wrapper is 
duplicated across each newly split test. Consider factoring this into a small 
local helper (e.g., `def withAsofJoinEnabled(f: => Unit)`) or a shared fixture 
to reduce repetition and make future additions less error-prone while keeping 
tests independent.



##########
sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/parser/PlanParserSuite.scala:
##########
@@ -1113,7 +1133,11 @@ class PlanParserSuite extends AnalysisTest {
           $"u.a",
           None,
           Inner).select(star()))
+    }
+  }
 
+  test("asof join - less than match operator") {
+    withSQLConf(SQLConf.SQL_ASOF_JOIN_ENABLED.key -> "true") {

Review Comment:
   The `withSQLConf(SQLConf.SQL_ASOF_JOIN_ENABLED.key -> \"true\")` wrapper is 
duplicated across each newly split test. Consider factoring this into a small 
local helper (e.g., `def withAsofJoinEnabled(f: => Unit)`) or a shared fixture 
to reduce repetition and make future additions less error-prone while keeping 
tests independent.



##########
sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/parser/PlanParserSuite.scala:
##########
@@ -1102,7 +1118,11 @@ class PlanParserSuite extends AnalysisTest {
           $"t.a",
           None,
           Inner).select(star()))
+    }
+  }
 
+  test("asof join - greater than match operator") {
+    withSQLConf(SQLConf.SQL_ASOF_JOIN_ENABLED.key -> "true") {

Review Comment:
   The `withSQLConf(SQLConf.SQL_ASOF_JOIN_ENABLED.key -> \"true\")` wrapper is 
duplicated across each newly split test. Consider factoring this into a small 
local helper (e.g., `def withAsofJoinEnabled(f: => Unit)`) or a shared fixture 
to reduce repetition and make future additions less error-prone while keeping 
tests independent.



##########
sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/parser/PlanParserSuite.scala:
##########
@@ -1124,7 +1148,11 @@ class PlanParserSuite extends AnalysisTest {
           $"u.a",
           None,
           Inner).select(star()))
+    }
+  }
 
+  test("asof join - explicit inner join type") {
+    withSQLConf(SQLConf.SQL_ASOF_JOIN_ENABLED.key -> "true") {

Review Comment:
   The `withSQLConf(SQLConf.SQL_ASOF_JOIN_ENABLED.key -> \"true\")` wrapper is 
duplicated across each newly split test. Consider factoring this into a small 
local helper (e.g., `def withAsofJoinEnabled(f: => Unit)`) or a shared fixture 
to reduce repetition and make future additions less error-prone while keeping 
tests independent.



##########
sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/parser/PlanParserSuite.scala:
##########
@@ -1135,7 +1163,11 @@ class PlanParserSuite extends AnalysisTest {
           $"u.a",
           None,
           Inner).select(star()))
+    }
+  }
 
+  test("asof join - explicit left outer join type") {
+    withSQLConf(SQLConf.SQL_ASOF_JOIN_ENABLED.key -> "true") {

Review Comment:
   The `withSQLConf(SQLConf.SQL_ASOF_JOIN_ENABLED.key -> \"true\")` wrapper is 
duplicated across each newly split test. Consider factoring this into a small 
local helper (e.g., `def withAsofJoinEnabled(f: => Unit)`) or a shared fixture 
to reduce repetition and make future additions less error-prone while keeping 
tests independent.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to