[
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)