gortiz commented on code in PR #12591: URL: https://github.com/apache/pinot/pull/12591#discussion_r1526589257
########## pinot-query-planner/src/main/java/org/apache/calcite/jdbc/CalciteSchemaBuilder.java: ########## @@ -61,4 +61,15 @@ public static CalciteSchema asRootSchema(Schema root) { } return rootSchema; } + + public static CalciteSchema asSubSchema(Schema root, String name) { + CalciteSchema subSchema = CalciteSchema.createRootSchema(false, false, name, root); + SchemaPlus schemaPlus = subSchema.plus(); + for (Map.Entry<String, List<Function>> e : FunctionRegistry.getRegisteredCalciteFunctionMap().entrySet()) { Review Comment: Do we actually need to add all functions to the subschema? I would expect that functions of the parent schema could be used and that would mean we only need to declare functions once in the root -- 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