drill-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sudip Mukherjee (JIRA)" <j...@apache.org>
Subject [jira] [Created] (DRILL-4294) InfoSchema is not returning column metadata if the query contains escape character
Date Thu, 21 Jan 2016 10:45:39 GMT
Sudip Mukherjee created DRILL-4294:
--------------------------------------

             Summary: InfoSchema is not returning column metadata if the query contains escape
character
                 Key: DRILL-4294
                 URL: https://issues.apache.org/jira/browse/DRILL-4294
             Project: Apache Drill
          Issue Type: Bug
    Affects Versions: Future, 1.4.0
            Reporter: Sudip Mukherjee


Below Query returns noting where escape character is "\\":

SELECT TABLE_CATALOG, TABLE_SCHEMA, TABLE_NAME, COLUMN_NAME, CASE DATA_TYPE WHEN 'ANY', 'MAP'
THEN 'CHARACTER VARYING' ELSE DATA_TYPE END as DATA_TYPE, CASE DATA_TYPE WHEN 'ANY', 'MAP'
THEN 'CHARACTER VARYING' ELSE DATA_TYPE END as DATA_TYPE_NAME, CASE DATA_TYPE            
WHEN 'BINARY' THEN CHARACTER_MAXIMUM_LENGTH             WHEN 'CHARACTER VARYING' THEN CHARACTER_MAXIMUM_LENGTH
            WHEN 'CHARACTER' THEN CHARACTER_MAXIMUM_LENGTH             WHEN 'DATE' THEN DATETIME_PRECISION
            WHEN 'INTERVAL' THEN INTERVAL_PRECISION             WHEN 'VARCHAR' THEN CHARACTER_MAXIMUM_LENGTH
            WHEN 'VARBINARY' THEN CHARACTER_MAXIMUM_LENGTH             ELSE NUMERIC_PRECISION
        END as COLUMN_SIZE,         NUMERIC_SCALE as DECIMAL_DIGITS,         CASE DATA_TYPE
            WHEN 'CHARACTER VARYING' THEN CHARACTER_MAXIMUM_LENGTH             WHEN 'CHARACTER'
THEN CHARACTER_MAXIMUM_LENGTH             WHEN 'VARCHAR' THEN CHARACTER_MAXIMUM_LENGTH   
         ELSE 9         END as BUFFER_LENGTH,         NUMERIC_PRECISION_RADIX,         IS_NULLABLE
as NULLABLE,         12 as REMARKS,         13 as COLUMN_DEF,         14 as SQL_DATA_TYPE,
        15 as SQL_DATETIME_SUB,         CHARACTER_MAXIMUM_LENGTH as CHAR_OCTET_LENGTH,   
     ORDINAL_POSITION,         IS_NULLABLE,         18 as USER_DATA_TYPE FROM INFORMATION_SCHEMA.COLUMNS
WHERE TABLE_CATALOG LIKE 'DRILL' ESCAPE '\' AND TABLE_SCHEMA LIKE 'dfs.tmp' ESCAPE '\' AND
TABLE_NAME LIKE 'app\_client\_view' ESCAPE '\' ORDER BY TABLE_CATALOG, TABLE_SCHEMA, TABLE_NAME,
ORDINAL_POSITION, COLUMN_NAME



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message