[ https://issues.apache.org/jira/browse/BEAM-5644?focusedWorklogId=152437&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-152437 ]
ASF GitHub Bot logged work on BEAM-5644: ---------------------------------------- Author: ASF GitHub Bot Created on: 08/Oct/18 22:10 Start Date: 08/Oct/18 22:10 Worklog Time Spent: 10m Work Description: amaliujia commented on a change in pull request #6598: [BEAM-5644] make planner impl configurable URL: https://github.com/apache/beam/pull/6598#discussion_r223510923 ########## File path: sdks/java/extensions/sql/src/main/java/org/apache/beam/sdk/extensions/sql/impl/BeamSqlEnv.java ########## @@ -134,9 +141,21 @@ public void executeDdl(String sqlStatement) throws ParseException { public String explain(String sqlString) throws ParseException { try { - return RelOptUtil.toString(planner.convertToBeamRel(sqlString)); + return RelOptUtil.toString(sqlEngine.convertToBeamRel(sqlString)); } catch (ValidationException | RelConversionException | SqlParseException e) { throw new ParseException("Unable to parse statement", e); } } + + public void setOptions(BeamSqlPipelineOptions options) { + this.options = options; + } + + private BeamSqlPipelineOptions getBeamSqlPipelineOptions() { + if (options == null) { + options = PipelineOptionsFactory.create().as(BeamSqlPipelineOptions.class); Review comment: Because the pipeline options from schema is [empty](https://github.com/apache/beam/blob/master/sdks/java/extensions/sql/src/main/java/org/apache/beam/sdk/extensions/sql/impl/JdbcDriver.java#L181). It is not initialized by "[PipelineOptions.java](https://github.com/apache/beam/blob/master/sdks/java/core/src/main/java/org/apache/beam/sdk/options/PipelineOptions.java)". ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org Issue Time Tracking ------------------- Worklog Id: (was: 152437) Time Spent: 3h 50m (was: 3h 40m) > make Planner configurable > -------------------------- > > Key: BEAM-5644 > URL: https://issues.apache.org/jira/browse/BEAM-5644 > Project: Beam > Issue Type: New Feature > Components: dsl-sql > Reporter: Rui Wang > Assignee: Rui Wang > Priority: Major > Time Spent: 3h 50m > Remaining Estimate: 0h > > We can make planner configurable here: > [BeamQueryPlanner.java#L145|https://github.com/apache/beam/blob/master/sdks/java/extensions/sql/src/main/java/org/apache/beam/sdk/extensions/sql/impl/BeamQueryPlanner.java#L145] > > By doing so, we can have different planner implementation to support > different SQL dialect. -- This message was sent by Atlassian JIRA (v7.6.3#76005)