[ 
https://issues.apache.org/jira/browse/CALCITE-3050?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16834983#comment-16834983
 ] 

Julian Hyde commented on CALCITE-3050:
--------------------------------------

Well, I agree with you. They are the same basic information with two distinct 
purposes. I do have a use case where I want a single "dialect" and I want to 
use it to configure how SQL is parsed and also how SQL is generated.

If you have ideas for how to integrate the two APIs, let me know. I'd like to 
avoid breaking stuff, and also avoid introducing unnecessary coupling between 
components.

> Integrate SqlDialect and SqlParser.Config
> -----------------------------------------
>
>                 Key: CALCITE-3050
>                 URL: https://issues.apache.org/jira/browse/CALCITE-3050
>             Project: Calcite
>          Issue Type: Bug
>            Reporter: Julian Hyde
>            Assignee: Danny Chan
>            Priority: Major
>
> {{SqlDialect}} is used by the JDBC adapter to generate SQL in the target 
> dialect of a data source. {{SqlParser.Config}} is used to set what the parser 
> should allow for SQL statements sent to Calcite. But they both are a 
> representation of "dialect". And they come together when we want to use a 
> Babel parser to understand SQL statements that are meant for a data source.
> So it makes sense to integrate them, somehow. We could add a method 
> {code}void SqlParser.ConfigBuilder.setFrom(SqlDialect dialect){code} or do it 
> from the other end, {code}SqlDialect.configureParser(SqlParser.ConfigBuilder 
> configBuilder){code}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to