aliehsaeedii commented on code in PR #14596:
URL: https://github.com/apache/kafka/pull/14596#discussion_r1380260267
##########
streams/src/main/java/org/apache/kafka/streams/state/internals/StoreQueryUtils.java:
##########
@@ -335,6 +342,42 @@ private static <R> QueryResult<R>
runWindowRangeQuery(final Query<R> query,
}
}
+ @SuppressWarnings("unchecked")
+ private static <R> QueryResult<R> runVersionedKeyQuery(final Query<R>
query,
+ final PositionBound
positionBound,
+ final QueryConfig
config,
+ final StateStore
store) {
+ if (store instanceof VersionedKeyValueStore) {
Review Comment:
> Do we need this check? Seems our code ensures that we call this method
only is this condition is true. -- If we call it incorrectly a hard crash would
be preferred to clearly surface the bug, and not masked it, and thus make it
harder to debug.
I think yes. When we are calling
`StateQueryRequest.inStore("my_store_name").withQuery(myVersionedKeyQuery)`,
how does it know that the `my_store_name` is of which type? Ok, if we remove
this condition, then there will be a hard crash but there is no suitable error
message to instruct the user on how to debug it or where he should start
debugging and looking into it.
--
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]