LakshSingla commented on code in PR #16358:
URL: https://github.com/apache/druid/pull/16358#discussion_r1587628096


##########
sql/src/main/java/org/apache/druid/sql/calcite/planner/SqlResourceCollectorShuttle.java:
##########
@@ -87,13 +88,21 @@ public SqlNode visit(SqlIdentifier id)
         if (qualifiedNameParts.size() == 2) {
           final String schema = qualifiedNameParts.get(0);
           final String resourceName = qualifiedNameParts.get(1);
+
+          // Put the lookup names in the query context to facilitate selective 
loading of lookups.
+          if (schema.equals(NamedLookupSchema.NAME)) {
+            
plannerContext.queryContextMap().putIfAbsent(PlannerContext.CTX_LOOKUPS_TO_LOAD,
 new HashSet<>());

Review Comment:
   Is that the desired behavior, i.e. should the user be allowed to modify the 
list? If so we should add some documentation, or else we should add a safeguard 
against the context. 



-- 
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]

Reply via email to