You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@drill.apache.org by "Rahul Challapalli (JIRA)" <ji...@apache.org> on 2014/07/28 23:17:39 UTC

[jira] [Commented] (DRILL-1213) Casting to decimal on text files is not working

    [ https://issues.apache.org/jira/browse/DRILL-1213?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14076889#comment-14076889 ] 

Rahul Challapalli commented on DRILL-1213:
------------------------------------------

Looks like having a view on top is creating problems. The below query is working fine

select cast(columns[0] as decimal(10,5)) a from `temp.tbl`;

> Casting to decimal on text files is not working
> -----------------------------------------------
>
>                 Key: DRILL-1213
>                 URL: https://issues.apache.org/jira/browse/DRILL-1213
>             Project: Apache Drill
>          Issue Type: Bug
>          Components: Functions - Drill, Storage - Text & CSV
>            Reporter: Rahul Challapalli
>         Attachments: test.tbl
>
>
> git.commit.id.abbrev=caa8b78
> USING DECIMAL :
> create view cast_dec as select cast(columns[0] as decimal(10,5)) from `temp.tbl`;
> select * from cast_dec;
> +------------+
> |   EXPR$0   |
> +------------+
> | 0          |
> | 0          |
> +------------+
> USING DOUBLE :
> create view cast_dbl as select cast(columns[0] as double) from `temp.tbl`;
> select * from cast_dbl;
> +------------+
> |   EXPR$0   |
> +------------+
> | 0.01       |
> | 0.05       |
> +------------+
> I attached the text file used. 



--
This message was sent by Atlassian JIRA
(v6.2#6252)