You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@drill.apache.org by "Mehant Baid (JIRA)" <ji...@apache.org> on 2014/04/29 02:52:15 UTC
[jira] [Commented] (DRILL-583) Decimal in CAST function
[ https://issues.apache.org/jira/browse/DRILL-583?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13983818#comment-13983818 ]
Mehant Baid commented on DRILL-583:
-----------------------------------
The actual value vector type to be used is internal to Drill. From SQL you can specify a precision and scale and based on that Drill will pick the appropriate decimal type. So your query would look like
select cast('1' as decimal(28, 2)) from dfs.`/input.json`;
> Decimal in CAST function
> ------------------------
>
> Key: DRILL-583
> URL: https://issues.apache.org/jira/browse/DRILL-583
> Project: Apache Drill
> Issue Type: Bug
> Reporter: James Duong
> Priority: Minor
>
> Running the query
> {code}
> SELECT cast(1 AS decimal) FROM INFORMATION_SCHEMA.`TABLES` LIMIT 1
> {code}
> seems to return a FLOAT8 instead of a decimal.
> We need to be able to specify the exact decimal type (eg DECIMAL28SPARSE), as well as the precision/scale for it in the cast operator too.
--
This message was sent by Atlassian JIRA
(v6.2#6252)