Return-Path: X-Original-To: apmail-drill-issues-archive@minotaur.apache.org Delivered-To: apmail-drill-issues-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id CB11417D1D for ; Tue, 7 Apr 2015 23:45:26 +0000 (UTC) Received: (qmail 98845 invoked by uid 500); 7 Apr 2015 23:45:14 -0000 Delivered-To: apmail-drill-issues-archive@drill.apache.org Received: (qmail 98815 invoked by uid 500); 7 Apr 2015 23:45:14 -0000 Mailing-List: contact issues-help@drill.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@drill.apache.org Delivered-To: mailing list issues@drill.apache.org Received: (qmail 98805 invoked by uid 99); 7 Apr 2015 23:45:14 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 07 Apr 2015 23:45:14 +0000 Date: Tue, 7 Apr 2015 23:45:14 +0000 (UTC) From: "Parth Chandra (JIRA)" To: issues@drill.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Updated] (DRILL-2420) Identify, fix DatabaseMetaData.getColumns() bugs [umbrella/tracking bug] MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/DRILL-2420?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Parth Chandra updated DRILL-2420: --------------------------------- Fix Version/s: (was: 0.9.0) 1.1.0 > Identify, fix DatabaseMetaData.getColumns() bugs [umbrella/tracking bug] > ------------------------------------------------------------------------ > > Key: DRILL-2420 > URL: https://issues.apache.org/jira/browse/DRILL-2420 > Project: Apache Drill > Issue Type: Bug > Components: Client - JDBC, Metadata > Reporter: Daniel Barclay (Drill) > Assignee: Daniel Barclay (Drill) > Fix For: 1.1.0 > > > Drill's implementation of {{DatabaseMetaData.getColumns(...)}} (currently at {{org.apache.drill.jdbc.MetaImpl.getColumns()}}) doesn't match the JDBC specification (the Javadoc documentation for {{DatabaseMetaData.getColumns(...)}} (as of Java 7)). In the returned {{ResultSet}}: > 1. Column {{DATA_TYPE}} is of type {{VARCHAR}} (containing the type name) rather than being of type {{INTEGER}} (containing values per {{java.sql.Types.*}}). > 2. Column {{TYPE_NAME}} is missing. > 3. Column {{COLUMN_SIZE}} is missing. > 4. (Columns after {{DATA_TYPE}} are at incorrect indexes.) > 5. Column {{DECIMAL_DIGITS}} is misnamed {{DECIMAL_PRECISION}}. > 6. Column {{REMARKS}} is an empty string, but probably should be {{NULL}}. > 7. Column {{COLUMN_DEF}} is an empty string, but probably should be {{NULL}}. > 8. Column {{CHAR_OCTET_LENGTH}} is always {{4}}, but should be "the maximum number of bytes in the _column_" for character types . > 8.5 Column {{IS_NULLABLE}} seems to always return 'NO'. > 9. Column {{ORDINAL_POSITION}} is always {{1}}, but should be the index of the specific column. > 10. Column {{IS_NULLABLE}} is {{'YES'}}, which doesn't seem to correspond to the value for {{NULLABLE}} ({{DatabaseMetaData.columnNullableUnknown}}). > 11. Column {{SCOPE_CATALOG}} is an empty string, but should be {{NULL}}. > 12. Column {{SCOPE_SCHEMA}} is an empty string, but should be {{NULL}}. > 13. Column {{SCOPE_TABLE}} is an empty string, but should be {{NULL}}. > 14. Column {{SOURCE_DATA_TYPE}} is an empty string, but should be {{NULL}}. > Additional bugs or suspect behavior: > - {{DECIMAL_DIGITS}}/{{DECIMAL_PRECISION}} is {{-1}} when it should be {{NULL}} (when not applicable). > - {{NUM_PREC_RADIX}} is {{-1}} when it probably should be {{NULL}} (when not applicable). > (Other columns to check: > Re {{BUFFER_LENGTH}}, {{SQL_DATA_TYPE}}, and {{SQL_DATETIME_SUB}}: When JDBC says a column is not used, are there any requirements on the values (e.g., being {{NULL}})? > Re {{IS_AUTOINCREMENT}}: Do we know that a column is not auto-incremented? If so, the value could be {{'NO'}} rather than an empty string. > Re {{IS_GENERATEDCOLUMN}}: Do we know that a column is not generated? If so, the value could be {{'NO'}} rather than an empty string. > Re {{NULLABLE}} (: Do know whether a column is nullable or not? If so, we could return the specific answer rather that just saying that it's unknown. > ) -- This message was sent by Atlassian JIRA (v6.3.4#6332)