HeartSaVioR commented on code in PR #47524:
URL: https://github.com/apache/spark/pull/47524#discussion_r1711123196


##########
sql/core/src/test/scala/org/apache/spark/sql/streaming/TransformWithValueStateTTLSuite.scala:
##########
@@ -265,50 +265,129 @@ class TransformWithValueStateTTLSuite extends 
TransformWithStateTTLTest {
         val fm = CheckpointFileManager.create(stateSchemaPath, hadoopConf)
 
         val keySchema = new StructType().add("value", StringType)
+        val expirationSchema = new StructType().add("expirationMs", LongType)
+        val compositeKeySchema = new StructType()
+          .add("key", new StructType().add("value", StringType))
+          .add("userKey", new StructType()
+            .add("id", IntegerType, false)
+            .add("name", StringType))
+
+        // Define all 9 expected schemas

Review Comment:
   Why not just define them as intuitive order (e.g. state schema and TTL 
schema closer) and assign CF ID later after sorting? It's probably easy to miss 
that the state names have to be sorted when we issue IDs for them.



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