You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@drill.apache.org by "Mehant Baid (JIRA)" <ji...@apache.org> on 2014/06/04 06:26:01 UTC

[jira] [Commented] (DRILL-742) TO_NUMBER functions fail with "UnsupportedOperationException" error

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

Mehant Baid commented on DRILL-742:
-----------------------------------

We use Java's DecimalFormat to parse the number passed in. Please use the format characters specified in DecimalFormat class.
For instance your first two queries would look like the following
select to_number('987,966', '###,###') from ...
select to_number('987.966', '###.###') from ...


> TO_NUMBER functions fail with "UnsupportedOperationException" error
> -------------------------------------------------------------------
>
>                 Key: DRILL-742
>                 URL: https://issues.apache.org/jira/browse/DRILL-742
>             Project: Apache Drill
>          Issue Type: Bug
>          Components: Functions - Drill
>            Reporter: Krystal
>            Assignee: Krystal
>
> Below are some examples of to_number functions that failed to execute:
> select to_number('987,966', '999999') from voter where voter_id=10;
> select to_number('98.966', '99.999') from voter where voter_id=10;
> select to_number('$2,900.00', 'L9G999D99') from voter where voter_id=10;
> select to_number('00123456789', '00999999999') from voter where voter_id=10;
> select to_number('$2,900.00', 'L9G999D99') from voter where voter_id=10;



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