Github user jinfengni commented on a diff in the pull request:

    https://github.com/apache/drill/pull/520#discussion_r69997455
  
    --- Diff: 
exec/jdbc/src/main/java/org/apache/drill/jdbc/impl/DrillDatabaseMetaDataImpl.java
 ---
    @@ -219,11 +226,26 @@ public boolean storesMixedCaseQuotedIdentifiers() 
throws SQLException {
         return super.storesMixedCaseQuotedIdentifiers();
       }
     
    -  // TODO(DRILL-3510):  Update when Drill accepts standard SQL's double 
quote.
       @Override
       public String getIdentifierQuoteString() throws SQLException {
         throwIfClosed();
    -    return "`";
    +    boolean systemOption = false;
    +    boolean sessionOption = false;
    +    String sql = "select type, bool_val from sys.options where name = 
'parser.ansi_quotes'";
    +    ResultSet rs = executeSql(sql);
    +    while (rs.next()) {
    +      if (rs.getString(1).equals("SYSTEM")) {
    +        systemOption = rs.getBoolean(2);
    +      }
    +      if (rs.getString(1).equals("SESSION")) {
    +        sessionOption = rs.getBoolean(2);
    +      }
    +    }
    +    if (systemOption || sessionOption) {
    --- End diff --
    
    If session option is turned off, but system options is turned on for 
ansi_quote, do we still return DOULBE_QUOTE?



---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

Reply via email to