drill-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sudheeshkatkam <...@git.apache.org>
Subject [GitHub] drill pull request #613: DRILL-4730: Update JDBC DatabaseMetaData implementa...
Date Tue, 14 Feb 2017 16:53:48 GMT
Github user sudheeshkatkam commented on a diff in the pull request:

    https://github.com/apache/drill/pull/613#discussion_r86275226
  
    --- Diff: exec/jdbc/src/main/java/org/apache/drill/jdbc/impl/DrillMetaImpl.java ---
    @@ -61,77 +91,271 @@ private static Signature newSignature(String sql) {
             sql,
             Collections.<AvaticaParameter> emptyList(),
             Collections.<String, Object>emptyMap(),
    -        CursorFactory.OBJECT);
    +        null // CursorFactory set to null, as SQL requests use DrillCursor
    +        );
       }
     
    -  private MetaResultSet s(String s) {
    -    try {
    -      logger.debug("Running {}", s);
    -
    -      AvaticaStatement statement = connection.createStatement();
    -      return MetaResultSet.create(connection.id, statement.getId(), true,
    -          newSignature(s), null);
    -    } catch (Exception e) {
    -      // Wrap in RuntimeException because Avatica's abstract method declarations
    -      // didn't allow for SQLException!
    -      throw new DrillRuntimeException("Failure while attempting to get DatabaseMetadata.",
e);
    +
    +  /** Information about type mapping. */
    +  private static class TypeInfo {
    +    private static Map<Class<?>, TypeInfo> MAPPING = ImmutableMap.<Class<?>,
TypeInfo> builder()
    +        .put(boolean.class, of(Types.BOOLEAN, "BOOLEAN"))
    --- End diff --
    
    Given this, how about `int.class` and others?



---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

Mime
View raw message