Akshat-Jain commented on code in PR #16358:
URL: https://github.com/apache/druid/pull/16358#discussion_r1592016891


##########
sql/src/main/java/org/apache/druid/sql/calcite/planner/PlannerContext.java:
##########
@@ -343,6 +349,28 @@ public String getSchemaResourceType(String schema, String 
resourceName)
     return plannerToolbox.rootSchema().getResourceType(schema, resourceName);
   }
 
+  /**
+   * Add a lookup name to load in the lookup loading spec.
+   */
+  public void addLookupToLoad(String lookupName)
+  {
+    if (lookupLoadingSpec.getLookupsToLoad() == null) {
+      lookupLoadingSpec = 
LookupLoadingSpec.loadOnly(Collections.singleton(lookupName));
+    } else {
+      Set<String> existingLookupsToLoad = new 
HashSet<>(lookupLoadingSpec.getLookupsToLoad());
+      existingLookupsToLoad.add(lookupName);
+      lookupLoadingSpec = LookupLoadingSpec.loadOnly(existingLookupsToLoad);

Review Comment:
   Have made some change, please have a look at the latest code. Thanks!



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