amaliujia commented on code in PR #45233:
URL: https://github.com/apache/spark/pull/45233#discussion_r1503625723


##########
connector/connect/server/src/test/scala/org/apache/spark/sql/connect/service/SparkConnectServiceE2ESuite.scala:
##########
@@ -202,4 +202,17 @@ class SparkConnectServiceE2ESuite extends 
SparkConnectServerTest {
       }
     }
   }
+
+  test("SPARK-47144: Verify collations work with Connect client") {
+    withClient { client =>
+      Seq("UCS_BASIC", "UCS_BASIC_LCASE", "UNICODE", 
"UNICODE_CI").foreach(collationName => {
+        val query1 = client.execute(buildPlan(s"select 'abc' collate 
'$collationName'"))
+        query1.hasNext // guarantees the request was received by server.
+
+        val query2 = client.execute(buildPlan(s"select collation('abc' collate 
'$collationName')"))
+        query2.hasNext // guarantees the request was received by server.
+      })
+      client.releaseSession()

Review Comment:
   Looks like the purpose of your test here is to make sure the request is 
passing through without an error. You do not need this test. 
   
   What you need is to add a test in `PlanGenerationTestSuite` as your purpose 
is to verify the client generated a correct plan. You can check the class doc 
of `PlanGenerationTestSuite` to understand how to add such a test.



-- 
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: reviews-unsubscr...@spark.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org

Reply via email to