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 ec7dde792a85 [SPARK-42610][CONNECT][FOLLOWUP] Add some test cases for 
`SQLImplicits.newSequenceEncoder`
ec7dde792a85 is described below

commit ec7dde792a8535673a6a3ddca3491e7c9ad1a017
Author: Wei Guo <[email protected]>
AuthorDate: Thu Jun 27 11:01:10 2024 +0900

    [SPARK-42610][CONNECT][FOLLOWUP] Add some test cases for 
`SQLImplicits.newSequenceEncoder`
    
    ### What changes were proposed in this pull request?
    
    This PR aims to add some test cases for `SQLImplicits.newSequenceEncoder` 
that specify the encoder explicitly just like  those deprecated encoders.
    
    ### Why are the changes needed?
    
    Test the scenario that the new `newSequenceEncoder` is specified explicitly.
    
    ### Does this PR introduce _any_ user-facing change?
    
    No.
    
    ### How was this patch tested?
    
    Pass GA.
    
    ### Was this patch authored or co-authored using generative AI tooling?
    
    No.
    
    Closes #47071 from wayneguow/newSequenceEncoder.
    
    Authored-by: Wei Guo <[email protected]>
    Signed-off-by: Hyukjin Kwon <[email protected]>
---
 .../test/scala/org/apache/spark/sql/SQLImplicitsTestSuite.scala  | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git 
a/connector/connect/client/jvm/src/test/scala/org/apache/spark/sql/SQLImplicitsTestSuite.scala
 
b/connector/connect/client/jvm/src/test/scala/org/apache/spark/sql/SQLImplicitsTestSuite.scala
index 3e4704b6ab8e..57342e12fcb5 100644
--- 
a/connector/connect/client/jvm/src/test/scala/org/apache/spark/sql/SQLImplicitsTestSuite.scala
+++ 
b/connector/connect/client/jvm/src/test/scala/org/apache/spark/sql/SQLImplicitsTestSuite.scala
@@ -85,6 +85,7 @@ class SQLImplicitsTestSuite extends ConnectFunSuite with 
BeforeAndAfterAll {
     testImplicit(booleans)
     testImplicit(booleans.toSeq)
     testImplicit(booleans.toSeq)(newBooleanSeqEncoder)
+    testImplicit(booleans.toSeq)(newSequenceEncoder)
     testImplicit(booleans.toImmutableArraySeq)
 
     val bytes = Array(76.toByte, 59.toByte, 121.toByte)
@@ -93,6 +94,7 @@ class SQLImplicitsTestSuite extends ConnectFunSuite with 
BeforeAndAfterAll {
     testImplicit(bytes)
     testImplicit(bytes.toSeq)
     testImplicit(bytes.toSeq)(newByteSeqEncoder)
+    testImplicit(bytes.toSeq)(newSequenceEncoder)
     testImplicit(bytes.toImmutableArraySeq)
 
     val shorts = Array(21.toShort, (-213).toShort, 14876.toShort)
@@ -101,6 +103,7 @@ class SQLImplicitsTestSuite extends ConnectFunSuite with 
BeforeAndAfterAll {
     testImplicit(shorts)
     testImplicit(shorts.toSeq)
     testImplicit(shorts.toSeq)(newShortSeqEncoder)
+    testImplicit(shorts.toSeq)(newSequenceEncoder)
     testImplicit(shorts.toImmutableArraySeq)
 
     val ints = Array(4, 6, 5)
@@ -109,6 +112,7 @@ class SQLImplicitsTestSuite extends ConnectFunSuite with 
BeforeAndAfterAll {
     testImplicit(ints)
     testImplicit(ints.toSeq)
     testImplicit(ints.toSeq)(newIntSeqEncoder)
+    testImplicit(ints.toSeq)(newSequenceEncoder)
     testImplicit(ints.toImmutableArraySeq)
 
     val longs = Array(System.nanoTime(), System.currentTimeMillis())
@@ -117,6 +121,7 @@ class SQLImplicitsTestSuite extends ConnectFunSuite with 
BeforeAndAfterAll {
     testImplicit(longs)
     testImplicit(longs.toSeq)
     testImplicit(longs.toSeq)(newLongSeqEncoder)
+    testImplicit(longs.toSeq)(newSequenceEncoder)
     testImplicit(longs.toImmutableArraySeq)
 
     val floats = Array(3f, 10.9f)
@@ -125,6 +130,7 @@ class SQLImplicitsTestSuite extends ConnectFunSuite with 
BeforeAndAfterAll {
     testImplicit(floats)
     testImplicit(floats.toSeq)
     testImplicit(floats.toSeq)(newFloatSeqEncoder)
+    testImplicit(floats.toSeq)(newSequenceEncoder)
     testImplicit(floats.toImmutableArraySeq)
 
     val doubles = Array(23.78d, -329.6d)
@@ -133,6 +139,7 @@ class SQLImplicitsTestSuite extends ConnectFunSuite with 
BeforeAndAfterAll {
     testImplicit(doubles)
     testImplicit(doubles.toSeq)
     testImplicit(doubles.toSeq)(newDoubleSeqEncoder)
+    testImplicit(doubles.toSeq)(newSequenceEncoder)
     testImplicit(doubles.toImmutableArraySeq)
 
     val strings = Array("foo", "baz", "bar")
@@ -140,6 +147,7 @@ class SQLImplicitsTestSuite extends ConnectFunSuite with 
BeforeAndAfterAll {
     testImplicit(strings)
     testImplicit(strings.toSeq)
     testImplicit(strings.toSeq)(newStringSeqEncoder)
+    testImplicit(strings.toSeq)(newSequenceEncoder)
     testImplicit(strings.toImmutableArraySeq)
 
     val myTypes = Array(MyType(12L, Math.E, Math.PI), MyType(0, 0, 0))
@@ -147,6 +155,7 @@ class SQLImplicitsTestSuite extends ConnectFunSuite with 
BeforeAndAfterAll {
     testImplicit(myTypes)
     testImplicit(myTypes.toSeq)
     testImplicit(myTypes.toSeq)(newProductSeqEncoder[MyType])
+    testImplicit(myTypes.toSeq)(newSequenceEncoder)
     testImplicit(myTypes.toImmutableArraySeq)
 
     // Others.


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

Reply via email to