shounakmk219 commented on code in PR #12591:
URL: https://github.com/apache/pinot/pull/12591#discussion_r1529779916


##########
pinot-query-planner/src/main/java/org/apache/pinot/query/QueryEnvironment.java:
##########
@@ -344,6 +331,46 @@ private DispatchableSubPlan toDispatchableSubPlan(RelRoot 
relRoot, PlannerContex
   // utils
   // --------------------------------------------------------------------------
 
+  private Prepare.CatalogReader getCatalog(@Nullable String schemaPath) {
+    Properties catalogReaderConfigProperties = new Properties();
+    
catalogReaderConfigProperties.setProperty(CalciteConnectionProperty.CASE_SENSITIVE.camelName(),
 "true");
+    CalciteSchema subSchema = schemaPath == null ? _rootSchema : 
_rootSchema.getSubSchema(schemaPath, false);
+    if (subSchema != null) {
+      return new PinotCalciteCatalogReader(subSchema, subSchema.path(null), 
_typeFactory,
+          new CalciteConnectionConfigImpl(catalogReaderConfigProperties));
+    } else {
+      throw new IllegalArgumentException("Cannot find schema with path: " + 
schemaPath);
+    }

Review Comment:
   Made the suggested changes



-- 
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: commits-unsubscr...@pinot.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@pinot.apache.org
For additional commands, e-mail: commits-h...@pinot.apache.org

Reply via email to