clintropolis commented on code in PR #15675:
URL: https://github.com/apache/druid/pull/15675#discussion_r1450961493
##########
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:
hmm, does this punish hypothetical things that are not stored in a map?
(should we leave the iterable() method?)
--
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]