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


##########
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);
+    }
+  }
+
+  /**
+   * Returns the lookup loading spec for a given task.

Review Comment:
   It's not limited to MSQ tasks though? Right now we consume it only in MSQ, 
but there's no restriction to not use this for other tasks in future.



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