anishshri-db commented on code in PR #49747: URL: https://github.com/apache/spark/pull/49747#discussion_r1938179923
########## sql/core/src/test/scala/org/apache/spark/sql/execution/streaming/state/RocksDBStateStoreSuite.scala: ########## @@ -343,6 +343,63 @@ class RocksDBStateStoreSuite extends StateStoreSuiteBase[RocksDBStateStoreProvid } } + Seq(true, false).foreach { colFamiliesEnabled => + test(s"rocksdb range scan - variable size non-ordering columns with non-zero start ordinal " + + s"with colFamiliesEnabled=$colFamiliesEnabled") { + + tryWithProviderResource(newStoreProvider(keySchema, + RangeKeyScanStateEncoderSpec( + keySchema, Seq(1)), colFamiliesEnabled)) { provider => + val store = provider.getStore(0) + + // use non-default col family if column families are enabled + val cfName = if (colFamiliesEnabled) "testColFamily" else "default" + if (colFamiliesEnabled) { + store.createColFamilyIfAbsent(cfName, + keySchema, valueSchema, + RangeKeyScanStateEncoderSpec(keySchema, Seq(1))) + } + + val timerTimestamps = Seq(931L, 8000L, 452300L, 4200L, -1L, 90L, 1L, 2L, 8L, Review Comment: Done ########## sql/core/src/test/scala/org/apache/spark/sql/execution/streaming/state/RocksDBStateStoreSuite.scala: ########## @@ -343,6 +343,63 @@ class RocksDBStateStoreSuite extends StateStoreSuiteBase[RocksDBStateStoreProvid } } + Seq(true, false).foreach { colFamiliesEnabled => + test(s"rocksdb range scan - variable size non-ordering columns with non-zero start ordinal " + + s"with colFamiliesEnabled=$colFamiliesEnabled") { + + tryWithProviderResource(newStoreProvider(keySchema, + RangeKeyScanStateEncoderSpec( + keySchema, Seq(1)), colFamiliesEnabled)) { provider => + val store = provider.getStore(0) + + // use non-default col family if column families are enabled + val cfName = if (colFamiliesEnabled) "testColFamily" else "default" + if (colFamiliesEnabled) { + store.createColFamilyIfAbsent(cfName, + keySchema, valueSchema, + RangeKeyScanStateEncoderSpec(keySchema, Seq(1))) + } + + val timerTimestamps = Seq(931L, 8000L, 452300L, 4200L, -1L, 90L, 1L, 2L, 8L, + -230L, -14569L, -92L, -7434253L, 35L, 6L, 9L, -323L, 5L) + timerTimestamps.foreach { ts => + val keyRow = dataToKeyRow(Random.alphanumeric.filter(_.isLetter) Review Comment: Done -- 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