anishshri-db commented on code in PR #49747:
URL: https://github.com/apache/spark/pull/49747#discussion_r1938179975
##########
sql/core/src/test/scala/org/apache/spark/sql/execution/streaming/state/RocksDBStateStoreSuite.scala:
##########
@@ -1065,97 +1184,114 @@ class RocksDBStateStoreSuite extends
StateStoreSuiteBase[RocksDBStateStoreProvid
assert(exception.getMessage.contains("Found long, expecting union"))
}
- testWithColumnFamiliesAndEncodingTypes(
- "rocksdb range scan multiple non-contiguous ordering columns",
- TestWithBothChangelogCheckpointingEnabledAndDisabled ) {
colFamiliesEnabled =>
- val testSchema: StructType = StructType(
- Seq(
- StructField("ordering1", LongType, false),
- StructField("key2", StringType, false),
- StructField("ordering2", IntegerType, false),
- StructField("string2", StringType, false),
- StructField("ordering3", DoubleType, false)
+ Seq(Seq(0, 1, 2), Seq(0, 2, 1), Seq(2, 1, 0), Seq(2, 0, 1)).foreach {
sortIndexes =>
+ testWithColumnFamiliesAndEncodingTypes(
+ s"rocksdb range scan multiple non-contiguous ordering columns " +
+ s"and sortIndexes=${sortIndexes.mkString(",")}",
+ TestWithBothChangelogCheckpointingEnabledAndDisabled) {
colFamiliesEnabled =>
+ val testSchema: StructType = StructType(
+ Seq(
+ StructField("ordering1", LongType, false),
+ StructField("key2", StringType, false),
+ StructField("ordering2", IntegerType, false),
+ StructField("string2", StringType, false),
+ StructField("ordering3", DoubleType, false)
+ )
)
- )
- val testSchemaProj = UnsafeProjection.create(Array[DataType](
+ val testSchemaProj = UnsafeProjection.create(Array[DataType](
immutable.ArraySeq.unsafeWrapArray(testSchema.fields.map(_.dataType)):
_*))
- val rangeScanOrdinals = Seq(0, 2, 4)
-
- tryWithProviderResource(
- newStoreProvider(
- testSchema,
- RangeKeyScanStateEncoderSpec(testSchema, rangeScanOrdinals),
- colFamiliesEnabled
- )
- ) { provider =>
- val store = provider.getStore(0)
+ // Multiply by 2 to get the actual ordinals in the row
Review Comment:
cool thx
--
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]