drill-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Rahul Challapalli (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (DRILL-1213) Casting to decimal on text files is not working
Date Mon, 28 Jul 2014 21:53:39 GMT

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

Rahul Challapalli updated DRILL-1213:
-------------------------------------

    Attachment: PhysicalPlan_NoView
                PhysicalPlan_View

Looks like when we have a view, we might be doing a second cast for decimal types to (10,
0) which could be causing problems

> 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: PhysicalPlan_NoView, PhysicalPlan_View, 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)

Mime
View raw message