[ 
https://issues.apache.org/jira/browse/DRILL-4730?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15866109#comment-15866109
 ] 

ASF GitHub Bot commented on DRILL-4730:
---------------------------------------

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?



> Update JDBC DatabaseMetaData implementation to use new Metadata APIs
> --------------------------------------------------------------------
>
>                 Key: DRILL-4730
>                 URL: https://issues.apache.org/jira/browse/DRILL-4730
>             Project: Apache Drill
>          Issue Type: Sub-task
>          Components: Client - JDBC
>            Reporter: Venki Korukanti
>            Assignee: Laurent Goujon
>
> DRILL-4728 is going to add support for new metadata APIs. Replace the 
> INFORMATION_SCHEMA queries used to get the metadata with the new APIs 
> provided in Java client.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Reply via email to