[
https://issues.apache.org/jira/browse/DRILL-3510?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15855376#comment-15855376
]
ASF GitHub Bot commented on DRILL-3510:
---------------------------------------
Github user laurentgo commented on a diff in the pull request:
https://github.com/apache/drill/pull/520#discussion_r99747009
--- Diff:
exec/java-exec/src/main/java/org/apache/drill/exec/client/DrillClient.java ---
@@ -695,6 +698,33 @@ public void runQuery(QueryType type,
List<PlanFragment> planFragments, UserResul
}
/**
+ * Get server properties that represent the list of server session
options.
+ *
+ * @return server properties for the server session options.
+ */
+ public ServerProperties getOptions() throws RpcException {
--- End diff --
I don't think this is the right interface to expose to the user as this is
too generic and introduce too much indirect coupling (clients starting
dependending on specific options). To be clear, I'm the one to blame here. When
we discussed adding metadata methods to the JDBC/ODBC client, one of the things
discussed was a server info metadata, to return things like quoting or some
other properties (equivalent to JDBC DatabaseMetadata object, or the C++
connector Metadata class:
https://github.com/apache/drill/blob/master/contrib/native/client/src/include/drill/drillClient.hpp#L712),
but I didn't free some time to add the missing RPC call.
This is probably what we should use here, and hopefully I can probably add
it before end of week.
> Add ANSI_QUOTES option so that Drill's SQL Parser will recognize ANSI_SQL
> identifiers
> --------------------------------------------------------------------------------------
>
> Key: DRILL-3510
> URL: https://issues.apache.org/jira/browse/DRILL-3510
> Project: Apache Drill
> Issue Type: Improvement
> Components: SQL Parser
> Reporter: Jinfeng Ni
> Assignee: Vitalii Diravka
> Labels: doc-impacting
> Fix For: 1.10.0
>
> Attachments: DRILL-3510.patch, DRILL-3510.patch
>
>
> Currently Drill's SQL parser uses backtick as identifier quotes, the same as
> what MySQL does. However, this is different from ANSI SQL specification,
> where double quote is used as identifier quotes.
> MySQL has an option "ANSI_QUOTES", which could be switched on/off by user.
> Drill should follow the same way, so that Drill users do not have to rewrite
> their existing queries, if their queries use double quotes.
> {code}
> SET sql_mode='ANSI_QUOTES';
> {code}
>
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)