HeartSaVioR commented on code in PR #54278:
URL: https://github.com/apache/spark/pull/54278#discussion_r2817233461
##########
sql/core/src/main/scala/org/apache/spark/sql/execution/streaming/state/StateStore.scala:
##########
@@ -171,10 +171,31 @@ trait ReadStateStore {
prefixKey: UnsafeRow,
colFamilyName: String = StateStore.DEFAULT_COL_FAMILY_NAME):
StateStoreIterator[UnsafeRowPair]
+ /**
+ * Return an iterator containing all the (key, value) pairs which are
matched with
+ * the given prefix key.
+ *
+ * It is expected to throw exception if Spark calls this method without
proper key encoding spec.
+ * It is also expected to throw exception if Spark calls this method without
setting
+ * multipleValuesPerKey as true for the column family.
Review Comment:
Each implementation should do it -
RocksDBStateStoreProvider.prefixScanWithMultiValues checks it.
```
verify(
kvEncoder._2.supportsMultipleValuesPerKey,
"Multi-value iterator operation requires an encoder" +
" which supports multiple values for a single key")
```
--
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]