atoomula commented on a change in pull request #1384:
URL: https://github.com/apache/samza/pull/1384#discussion_r456932653
##########
File path:
samza-sql/src/main/java/org/apache/samza/sql/dsl/SamzaSqlDslConverter.java
##########
@@ -52,9 +52,9 @@
public Collection<RelRoot> convertDsl(String dsl) {
// TODO: Introduce an API to parse a dsl string and return one or more sql
statements
List<String> sqlStmts = fetchSqlFromConfig(config);
- QueryPlanner planner = getQueryPlanner(getSqlConfig(sqlStmts, config));
List<RelRoot> relRoots = new LinkedList<>();
for (String sql: sqlStmts) {
+ QueryPlanner planner =
getQueryPlanner(getSqlConfig(Collections.singletonList(sql), config));
Review comment:
Good question. Calcite Planner as it stands today does not seem to be
supported for reuse. Although the intent is there as they have exposed reset
API. But it does not work. But it is such low cost to create new planner for
each sql.
##########
File path:
samza-sql/src/main/java/org/apache/samza/sql/planner/QueryPlanner.java
##########
@@ -129,6 +142,13 @@ public RelRoot plan(String query) {
sqlOperatorTables.add(new SamzaSqlOperatorTable());
sqlOperatorTables.add(new SamzaSqlUdfOperatorTable(samzaSqlFunctions));
+ // TODO: Introduce a pluggable rule factory.
Review comment:
Sure
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]