gianm commented on code in PR #15675:
URL: https://github.com/apache/druid/pull/15675#discussion_r1450972482
##########
processing/src/main/java/org/apache/druid/query/lookup/LookupSegment.java:
##########
@@ -51,11 +51,11 @@ public LookupSegment(final String lookupName, final
LookupExtractorFactory looku
Sequences.simple(() -> {
final LookupExtractor extractor = lookupExtractorFactory.get();
- if (!extractor.canIterate()) {
- throw new ISE("Cannot iterate lookup[%s]", lookupExtractorFactory);
+ if (!extractor.supportsAsMap()) {
+ throw new ISE("Cannot retrieve map view from lookup[%s]",
lookupExtractorFactory);
}
- return extractor.iterable().iterator();
+ return extractor.asMap().entrySet().iterator();
Review Comment:
In theory, I suppose, but there aren't any examples in the code base where
it would be useful. I thought about keeping the flexibility in case some
extensions found it useful, but decided against it, because I'm not aware of
any and I didn't want to keep complexity for unclear benefit.
--
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]