You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@tajo.apache.org by Seungun Choe <wh...@gmail.com> on 2014/04/24 03:35:51 UTC

Review Request 20644: TAJO-740: Implements function 'to_number'

-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/20644/
-----------------------------------------------------------

Review request for Tajo.


Bugs: TAJO-740
    https://issues.apache.org/jira/browse/TAJO-740


Repository: tajo


Description
-------

to_number(text, text) / convert string to numeric / to_number('12,454.8-', '99G999D9S')
to_number(text, text) / convert string to numeric / to_number('1-2,454.8', '99G999D9S')
Results (Both) :  -12454.8


Diffs
-----

  tajo-core/src/main/java/org/apache/tajo/engine/function/dataformat/ToNumberDataFormat.java PRE-CREATION 
  tajo-core/src/test/java/org/apache/tajo/engine/function/TestDataFormatFunctions.java PRE-CREATION 

Diff: https://reviews.apache.org/r/20644/diff/


Testing
-------

mvn clean install is OK.


Thanks,

Seungun Choe


Re: Review Request 20644: TAJO-740: Implements function 'to_number'

Posted by Jinho Kim <jh...@apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/20644/#review42379
-----------------------------------------------------------


Thank you for your contribution!
I think that if you can use the decimalFormat and DecimalFormatSymbols, it more may help you.

http://docs.oracle.com/javase/tutorial/i18n/format/decimalFormat.html

- Jinho Kim


On April 24, 2014, 1:35 a.m., Seungun Choe wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/20644/
> -----------------------------------------------------------
> 
> (Updated April 24, 2014, 1:35 a.m.)
> 
> 
> Review request for Tajo.
> 
> 
> Bugs: TAJO-740
>     https://issues.apache.org/jira/browse/TAJO-740
> 
> 
> Repository: tajo
> 
> 
> Description
> -------
> 
> to_number(text, text) / convert string to numeric / to_number('12,454.8-', '99G999D9S')
> to_number(text, text) / convert string to numeric / to_number('1-2,454.8', '99G999D9S')
> Results (Both) :  -12454.8
> 
> 
> Diffs
> -----
> 
>   tajo-core/src/main/java/org/apache/tajo/engine/function/dataformat/ToNumberDataFormat.java PRE-CREATION 
>   tajo-core/src/test/java/org/apache/tajo/engine/function/TestDataFormatFunctions.java PRE-CREATION 
> 
> Diff: https://reviews.apache.org/r/20644/diff/
> 
> 
> Testing
> -------
> 
> mvn clean install is OK.
> 
> 
> Thanks,
> 
> Seungun Choe
> 
>