jtuglu1 commented on code in PR #18568:
URL: https://github.com/apache/druid/pull/18568#discussion_r2395984909
##########
processing/src/main/java/org/apache/druid/query/scan/ScanQueryQueryToolChest.java:
##########
@@ -191,6 +198,76 @@ public Sequence<Object[]> resultsAsArrays(final ScanQuery
query, final Sequence<
);
}
+ @Override
+ public CacheStrategy<ScanResultValue, ScanResultValue, ScanQuery>
getCacheStrategy(
+ final ScanQuery query,
+ @Nullable final ObjectMapper objectMapper
+ )
+ {
+ return new CacheStrategy<>()
+ {
+ @Override
+ public boolean isCacheable(ScanQuery query, boolean willMergeRunners,
boolean segmentLevel)
+ {
+ // Currently, there is no bijective mapping from ScanResultValue to
Result<BySegmentResultValueClass<ScanResultValue>>.
+ // This means queries will fail if:
+ // - A query is issued with bySegment:true
+ // - Segment-level cache is enabled on the broker (in which case it
sends bySegment queries to data nodes).
+ return !query.context().isBySegment() && (!segmentLevel ||
willMergeRunners);
+ }
+
+ @Override
+ public byte[] computeCacheKey(ScanQuery query)
Review Comment:
See my comment above. Samarth asked the same question.
--
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]