anishshri-db commented on code in PR #45503:
URL: https://github.com/apache/spark/pull/45503#discussion_r1531410814
##########
sql/core/src/main/scala/org/apache/spark/sql/execution/streaming/state/RocksDBStateEncoder.scala:
##########
@@ -110,8 +119,11 @@ class PrefixKeyScanStateEncoder(
import RocksDBStateEncoder._
- require(keySchema.length > numColsPrefixKey, "The number of columns in the
key must be " +
- "greater than the number of columns for prefix key!")
+ // Note that numColsPrefixKey have to be less than the number of columns in
the key schema
+ // Range scan encoder allows for equality, but prefix key scan encoder does
not
+ if (numColsPrefixKey == 0 || numColsPrefixKey >= keySchema.length) {
+ throw
StateStoreErrors.incorrectNumOrderingColsNotSupported(numColsPrefixKey.toString)
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: [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]