micheal-o commented on code in PR #53874:
URL: https://github.com/apache/spark/pull/53874#discussion_r2729354376


##########
sql/core/src/test/scala/org/apache/spark/sql/execution/streaming/state/OfflineStateRepartitionIntegrationSuite.scala:
##########
@@ -479,4 +525,47 @@ class OfflineStateRepartitionIntegrationSuite
       }
     )
   }
+
+  Seq(1, 2, 3).foreach { version =>

Review Comment:
   Lets probably make join test case a separate suite e.g. 
`OfflineStateRepartitionJoinIntegrationSuite`



##########
sql/core/src/test/scala/org/apache/spark/sql/execution/streaming/state/OfflineStateRepartitionIntegrationSuite.scala:
##########
@@ -479,4 +525,47 @@ class OfflineStateRepartitionIntegrationSuite
       }
     )
   }
+
+  Seq(1, 2, 3).foreach { version =>
+    testWithAllRepartitionOperations(s"stream-stream join ver $version") { 
newPartitions =>
+      withSQLConf(SQLConf.STREAMING_JOIN_STATE_FORMAT_VERSION.key -> 
version.toString) {
+        val allStoreNames = StreamStreamJoinTestUtils.allStoreNames
+        val storeToOptions = if (version <= 2) {
+          allStoreNames.map { storeName =>
+            storeName -> Map(StateStore.DEFAULT_COL_FAMILY_NAME -> 
Map.empty[String, String])
+          }.toMap
+        } else {
+          Map(StateStoreId.DEFAULT_STORE_NAME -> allStoreNames.map { 
colFamilyName =>
+            colFamilyName -> Map(StateSourceOptions.STORE_NAME -> 
colFamilyName)
+          }.toMap)
+        }
+
+        testRepartitionWorkflow[(Int, Long)](
+          newPartitions = newPartitions,
+          setupInitialState = (inputData, checkpointDir, _) => {
+            val query = getStreamStreamJoinQuery(inputData)
+            testStream(query)(
+              StartStream(checkpointLocation = checkpointDir),
+              // Batch 1: Creates state in all 4 column families
+              AddData(inputData, (1, 1L), (2, 2L), (3, 3L), (4, 4L), (5, 5L)),
+              CheckNewAnswer((2, 2, 2, 2), (4, 4, 4, 4)),
+              // Batch 2: Adds more state to all column families
+              AddData(inputData, (6, 6L), (7, 7L), (8, 8L), (9, 9L), (10, 
10L)),
+              CheckNewAnswer((6, 6, 6, 6), (8, 8, 8, 8), (10, 10, 10, 10)),
+              StopStream
+            )
+          },
+          verifyResumedQuery = (inputData, checkpointDir, _) => {
+            val query = getStreamStreamJoinQuery(inputData)
+            testStream(query)(
+              StartStream(checkpointLocation = checkpointDir),
+              AddData(inputData, (6, 10L)),

Review Comment:
   nit: can add 1 or 2 more data here. Just to make sure other existing rows 
match too



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