xiangfu0 commented on code in PR #11330:
URL: https://github.com/apache/pinot/pull/11330#discussion_r1292603843


##########
pinot-common/src/main/java/org/apache/pinot/common/utils/request/RequestUtils.java:
##########
@@ -290,4 +302,52 @@ public static Map<String, String> 
getOptionsFromJson(JsonNode request, String op
   public static Map<String, String> getOptionsFromString(String optionStr) {
     return 
Splitter.on(';').omitEmptyStrings().trimResults().withKeyValueSeparator('=').split(optionStr);
   }
+
+  public static Set<String> getTableNames(SqlNode sqlNode) {

Review Comment:
   Yes, this logic is used in `pinot-java-client`, which depends on 
`pinot-common` not `pinot-query-planner`.
   
   So the table name extraction logic there only works for v1 query and some 
simple v2 queries.
   
   There are 3 possible options to solve this:
   1. Let `pinot-java-client` depends `pinot-query-planner`;
   2. Move some query compilation logics from `pinot-query-planner` to 
`pinot-common`, for `SqlNode` -> `RelNode`, but it requires the full 
initialization of Calcite PlannerContext with FrameworkConfig, 
Prepare.CatalogReader, RelDataTypeFactory, HepProgram.
   3. Create a separated getTableName logic to `pinot-common`



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