drill-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jacques Nadeau (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (DRILL-1836) Default length for Varchar in cast expressions should be changed
Date Sun, 04 Jan 2015 23:57:45 GMT

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

Jacques Nadeau updated DRILL-1836:
----------------------------------
    Fix Version/s: 1.0.0

> Default length for Varchar in cast expressions should be changed
> ----------------------------------------------------------------
>
>                 Key: DRILL-1836
>                 URL: https://issues.apache.org/jira/browse/DRILL-1836
>             Project: Apache Drill
>          Issue Type: Improvement
>          Components: Execution - Data Types
>            Reporter: Abhishek Girish
>            Assignee: Aman Sinha
>             Fix For: 1.0.0
>
>
> Current behavior:
> Specify length:
> > select cast(t1.colfam1.col1 as varchar(10)) from table1 t1;
> +------------+
> |   EXPR$0   |
> +------------+
> | val1       |
> | val21      |
> | val26      |
> +------------+
> Default length for varchar in a cast expression:
> > select cast(t1.colfam1.col1 as varchar) from table1 t1;
> +------------+
> |   EXPR$0   |
> +------------+
> | v          |
> | v          |
> | v          |
> +------------+
> When the length attribute is not specified with varchar, in a cast expression, Drill
treats the default length to be 1. 
> Postgres and SQL Server sets the default length to be 30 in such a scenario. The behavior
for Drill must be modified to something similar. 



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

Mime
View raw message