vladimirg-db commented on code in PR #49628:
URL: https://github.com/apache/spark/pull/49628#discussion_r1927410668


##########
connector/connect/client/jvm/src/test/scala/org/apache/spark/sql/ClientE2ETestSuite.scala:
##########
@@ -1629,6 +1631,16 @@ class ClientE2ETestSuite
       .create()
     assert(sparkWithLowerMaxMessageSize.range(maxBatchSize).collect().length 
== maxBatchSize)
   }
+
+  test("Multiple parametrization nodes in the parsed logical plan") {
+    val result = spark.sql("select * from range(10)")
+    var df = spark.sql("SELECT ?", Array(0))
+    for (i <- 1 to 9) {
+      val temp = spark.sql("SELECT ?", Array(i))
+      df = df.union(temp)
+    }
+    checkAnswer(df, result.collect().toImmutableArraySeq)

Review Comment:
   Wouldn't it be more straightforward to just say `Array(Row(0, 1, 2, 3, 4, 5, 
6, 7, 8, 9))`?



##########
connector/connect/client/jvm/src/test/scala/org/apache/spark/sql/ClientE2ETestSuite.scala:
##########
@@ -1629,6 +1631,16 @@ class ClientE2ETestSuite
       .create()
     assert(sparkWithLowerMaxMessageSize.range(maxBatchSize).collect().length 
== maxBatchSize)
   }
+
+  test("Multiple parametrization nodes in the parsed logical plan") {

Review Comment:
   Let's also add a test for named parameters, and a test for a mix of 
named/positional.



##########
connector/connect/client/jvm/src/test/scala/org/apache/spark/sql/ClientE2ETestSuite.scala:
##########
@@ -1629,6 +1631,16 @@ class ClientE2ETestSuite
       .create()
     assert(sparkWithLowerMaxMessageSize.range(maxBatchSize).collect().length 
== maxBatchSize)
   }
+
+  test("Multiple parametrization nodes in the parsed logical plan") {

Review Comment:
   ```suggestion
     test("Multiple parameterized nodes in the parsed logical plan") {
   ```



##########
connector/connect/client/jvm/src/test/scala/org/apache/spark/sql/ClientE2ETestSuite.scala:
##########
@@ -1629,6 +1631,16 @@ class ClientE2ETestSuite
       .create()
     assert(sparkWithLowerMaxMessageSize.range(maxBatchSize).collect().length 
== maxBatchSize)
   }
+
+  test("Multiple parametrization nodes in the parsed logical plan") {
+    val result = spark.sql("select * from range(10)")
+    var df = spark.sql("SELECT ?", Array(0))
+    for (i <- 1 to 9) {

Review Comment:
   ```suggestion
       for (i <- 1 until 10) {
   ```



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