[
https://issues.apache.org/jira/browse/CALCITE-2623?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16723844#comment-16723844
]
KrishnaKant Agrawal commented on CALCITE-2623:
----------------------------------------------
{quote}BigQuery has a MOD operator. Why are you adding "%"?
{quote}
I have added it to HiveSqlDialect (Hive does not support MOD), not
BigQuerySqlDialect.
{quote}In standard SQL, UNION accepts either ALL or DISTINCT. DISTINCT is the
default, so people tend to write "UNION" rather than "UNION DISTINCT", even if
they mean the same thing. I'm not sure why you add it BigQuery. Does BigQuery
not support UNION without DISTINCT?
{quote}
Yes, you are right. In BigQuery, with SET OPERATIONS, DISTINCT or ALL keyword
has to be explicitly mentioned for the query to run.
{quote}Let's not switch on operator name. Switch on operator.getKind() if
possible. Better, if you need to use an operator with a non-standard syntax for
a particular dialect, introduce it during RelToSql conversion, and let it
unparse itself. That's usually better than modifying the dialect.
{quote}
For this to be possible, *I need to add SqlKind.POSITION in SqlKind Enum*. As
many functions come under OTHER_FUNCTION, there may be more additions to that
Enum.
{quote}Why did you break the line in "testSelectQueryWithLimitClause"?
{quote}
Will correct it. My Intelij Code Formatter Issues.
{quote}Rather than "sql(query).dialect(HiveSqlDialect.DEFAULT)" use
"sql(query).withHive()". Similarly withBigQuery.
{quote}
Got it, I will correct this.
> Updating unparseCall() in SqlDialect(s) for dialect specifc SqlNode unparsing
> -----------------------------------------------------------------------------
>
> Key: CALCITE-2623
> URL: https://issues.apache.org/jira/browse/CALCITE-2623
> Project: Calcite
> Issue Type: Improvement
> Components: core
> Reporter: KrishnaKant Agrawal
> Assignee: Julian Hyde
> Priority: Minor
>
> Owing to the syntactical differences between Calcite SQL and certain other
> Dialects, emulation for SqlNode unparsing needs to be added based on the
> Dialect in RelToSqlConcverter.
> Saw some code in PostgreSqlDialect which is already doing this.
> Changes in other Dialects can follow suit.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)