cloud-fan commented on a change in pull request #30443:
URL: https://github.com/apache/spark/pull/30443#discussion_r546741522



##########
File path: 
sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/optimizer/EliminateSortsSuite.scala
##########
@@ -48,8 +49,18 @@ class EliminateSortsSuite extends AnalysisTest {
       Batch("Limit PushDown", FixedPoint(10), LimitPushDown) :: Nil
   }
 
-  val testRelation = LocalRelation('a.int, 'b.int, 'c.int)
-  val testRelationB = LocalRelation('d.int)
+  val testRelation = LocalRelation.fromExternalRows(
+    Seq(Symbol("a").int, Symbol("b").int, Symbol("c").int),
+    Seq(
+      Row(1, 2, 3), Row(1, 2, 3), Row(1, 2, 3), Row(1, 2, 3), Row(1, 2, 3), 
Row(1, 2, 3),

Review comment:
       ditto, `1.to(10).map(_ => Row(1, 2, 3)`

##########
File path: 
sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/optimizer/EliminateSortsSuite.scala
##########
@@ -48,8 +49,18 @@ class EliminateSortsSuite extends AnalysisTest {
       Batch("Limit PushDown", FixedPoint(10), LimitPushDown) :: Nil
   }
 
-  val testRelation = LocalRelation('a.int, 'b.int, 'c.int)
-  val testRelationB = LocalRelation('d.int)
+  val testRelation = LocalRelation.fromExternalRows(
+    Seq(Symbol("a").int, Symbol("b").int, Symbol("c").int),
+    Seq(
+      Row(1, 2, 3), Row(1, 2, 3), Row(1, 2, 3), Row(1, 2, 3), Row(1, 2, 3), 
Row(1, 2, 3),
+      Row(1, 2, 3), Row(1, 2, 3), Row(1, 2, 3), Row(1, 2, 3), Row(1, 2, 3), 
Row(1, 2, 3))
+  )
+  val testRelationB = LocalRelation.fromExternalRows(
+    Seq(Symbol("d").int),
+    Seq(
+      Row(1), Row(1), Row(1), Row(1), Row(1), Row(1),

Review comment:
       ditto

##########
File path: 
sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/optimizer/LimitPushdownSuite.scala
##########
@@ -38,8 +39,12 @@ class LimitPushdownSuite extends PlanTest {
         BooleanSimplification) :: Nil
   }
 
-  private val testRelation = LocalRelation('a.int, 'b.int, 'c.int)
-  private val testRelation2 = LocalRelation('d.int, 'e.int, 'f.int)
+  private val testRelation = LocalRelation.fromExternalRows(
+    Seq(Symbol("a").int, Symbol("b").int, Symbol("c").int),
+    Seq(Row(1, 2, 3), Row(1, 2, 3), Row(1, 2, 3), Row(1, 2, 3), Row(1, 2, 3), 
Row(1, 2, 3)))

Review comment:
       ditto

##########
File path: 
sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/optimizer/LimitPushdownSuite.scala
##########
@@ -38,8 +39,12 @@ class LimitPushdownSuite extends PlanTest {
         BooleanSimplification) :: Nil
   }
 
-  private val testRelation = LocalRelation('a.int, 'b.int, 'c.int)
-  private val testRelation2 = LocalRelation('d.int, 'e.int, 'f.int)
+  private val testRelation = LocalRelation.fromExternalRows(
+    Seq(Symbol("a").int, Symbol("b").int, Symbol("c").int),
+    Seq(Row(1, 2, 3), Row(1, 2, 3), Row(1, 2, 3), Row(1, 2, 3), Row(1, 2, 3), 
Row(1, 2, 3)))
+  private val testRelation2 = LocalRelation.fromExternalRows(
+    Seq(Symbol("d").int, Symbol("e").int, Symbol("f").int),
+    Seq(Row(1, 2, 3), Row(1, 2, 3), Row(1, 2, 3), Row(1, 2, 3), Row(1, 2, 3), 
Row(1, 2, 3)))

Review comment:
       ditto




----------------------------------------------------------------
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.

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