[
https://issues.apache.org/jira/browse/CALCITE-3050?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16838970#comment-16838970
]
Julian Hyde commented on CALCITE-3050:
--------------------------------------
>From the [email
>thread|https://lists.apache.org/thread.html/50b0dca9c223f631767b420490fa155d44f1c37c5f9a8c5e4486a5dc@%3Cdev.calcite.apache.org%3E],
> here's [~danny0405]'s summary of the key methods of the 3 classes (with a few
>typos corrected):
{quote}
SqlDialect config items
* nullCollation: null values collation
* dataTypeSystem: type system to implement specific data types
* identifierQuoteString: starting quoting character
* identifierEndQuoteString: end quoting character
* DatabaseProduct: The name really confuse me. Isn't it just a SqlDialect?
* identifierEscapedQuote: escape quote for identifierQuoteString
SqlParser.Config config items
* identifierMaxLength: max length of an identifier
* quotedCasing: casing of quoted identifier
* unquotedCasing: casing of unquoted identifier
* quoting: quoting character
* caseSensitive: if to parse the SQL case sensitively
* parserFactory: a parser factory to produce the parser
* SqlConformance: The name really confuse me. Isn't it just a SqlDialect?
SqlConformance config items
* isLiberal: Whether this dialect supports features from a wide variety of
dialects
* isGroupByAlias: group by column alias
* isGroupByOrdinal: group by column ordinal
* isHavingAlias: is having by column alias
* isSortByOrdinal: sort by column ordinal
* isSortByAlias: sort by column alias
* isSortByAliasObscures: Whether "empno" is invalid in "select empno as x from
emp order by empno"
* isFromRequired: Whether FROM clause is required in a SELECT statement
* isBangEqualAllowed: Whether the bang-equal token != is allowed as an
alternative to <> in the parser
* isPercentRemainderAllowed: Whether the "%" operator is allowed by the parser
as an alternative to the mod function
* isMinusAllowed: Whether MINUS is allowed as an alternative to EXCEPT in the
parser
* isApplyAllowed()
* ...omitted
{quote}
> 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)