drill-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "N Campbell (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (DRILL-5639) CAST( as CHAR(N) or VARCHAR(N)) ResultsetMetadata always returned as VARCHAR(65535)
Date Fri, 30 Jun 2017 15:41:00 GMT

     [ https://issues.apache.org/jira/browse/DRILL-5639?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

N Campbell updated DRILL-5639:
------------------------------
    Description: 

While Drill states it internally uses VARCHAR type, unclear if Drill had considered/attempted
to ensure it would project a CHAR(n) with blank padding. 

https://drill.apache.org/docs/supported-data-types/


> CAST( as CHAR(N) or VARCHAR(N)) ResultsetMetadata always returned as VARCHAR(65535)
> -----------------------------------------------------------------------------------
>
>                 Key: DRILL-5639
>                 URL: https://issues.apache.org/jira/browse/DRILL-5639
>             Project: Apache Drill
>          Issue Type: Improvement
>          Components: Client - JDBC
>    Affects Versions: 1.10.0
>         Environment: Statement is explicitly CASTING to a CHAR type with precision but
result described as VARCHAR with maximum precision.
> select cast(C1 as CHAR(10)) from (values('ABC')) T (C1)
> select cast(C1 as VARCHAR(10)) from (values('ABC')) T (C1)
> ResultsetMetadata
> ColumnIndex	getColumnName	getColumnTypeName	getPrecision	getScale	isNullable	getTableName
getSchemaName	getCatalogName	getColumnClassName	getColumnDisplaySize	getColumnLabel	getColumnType
isAutoIncrement	isCaseSensitive	isCurrency	isDefinitelyWritable	isReadOnly	isSearchable	isSigned
isWritable
> 1	EXPR$0	CHARACTER VARYING	65536	0	1			DRILL	java.lang.String	65536	EXPR$0	12	false	false
false	false	true	true	false	false
>            Reporter: N Campbell
>
> While Drill states it internally uses VARCHAR type, unclear if Drill had considered/attempted
to ensure it would project a CHAR(n) with blank padding. 
> https://drill.apache.org/docs/supported-data-types/



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Mime
View raw message