anishshri-db commented on code in PR #48274:
URL: https://github.com/apache/spark/pull/48274#discussion_r1804196376
##########
sql/core/src/test/scala/org/apache/spark/sql/execution/datasources/v2/state/StateDataSourceTransformWithStateSuite.scala:
##########
@@ -498,6 +545,69 @@ class StateDataSourceTransformWithStateSuite extends
StateStoreMetricsTest
}
}
+ testWithChangelogCheckpointingEnabled("state data source cdf integration -
list state and TTL") {
+ withTempDir { tempDir =>
+ withSQLConf(SQLConf.STATE_STORE_PROVIDER_CLASS.key ->
+ classOf[RocksDBStateStoreProvider].getName,
+ SQLConf.SHUFFLE_PARTITIONS.key ->
+ TransformWithStateSuiteUtils.NUM_SHUFFLE_PARTITIONS.toString) {
+ val inputData = MemoryStream[(String, String)]
+ val result = inputData.toDS()
+ .groupByKey(x => x._1)
+ .transformWithState(new SessionGroupsStatefulProcessorWithTTL(),
+ TimeMode.ProcessingTime(),
+ OutputMode.Update())
+
+ testStream(result, OutputMode.Update())(
+ StartStream(checkpointLocation = tempDir.getAbsolutePath),
+ AddData(inputData, ("session1", "group2")),
+ AddData(inputData, ("session1", "group1")),
+ AddData(inputData, ("session2", "group1")),
+ AddData(inputData, ("session3", "group7")),
+ AddData(inputData, ("session1", "group4")),
+ Execute { _ =>
+ // wait for the batch to run since we are using processing time
Review Comment:
Yea will prob update this in a separate PR
--
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]