clintropolis commented on code in PR #15675:
URL: https://github.com/apache/druid/pull/15675#discussion_r1450971840
##########
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:
well, i guess if we wanted to support other things maybe in the future we
should add back an iterator later that spits out something other than map entry
(result row or something perhaps?) to use for the direct queries
--
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]