Details
-
Improvement
-
Status: Open
-
Minor
-
Resolution: Unresolved
-
1.10.0
-
None
-
None
-
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 falseStatement 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
Description
While Drill states it internally uses VARCHAR type, unclear if Drill had considered/attempted to ensure it would project a CHAR with blank padding.