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

Seungun Choe updated TAJO-637:
------------------------------

    Attachment: TAJO_637_3.patch

Modify some bug.
  ex) select to_char(123456789.12345, '999999999.99999');
at this code
{code}
if(tmpNum > 0)
        roundNum = (long)(tmpDotUnderNum * Math.pow(10, dotUnderPttnLen) + 
(double)0.5) / Math.pow(10, dotUnderPttnLen);
      else {
        tmpDotUnderNum*=-1;
        roundNum = (long)(tmpDotUnderNum * Math.pow(10, dotUnderPttnLen) - 
(double)0.5) / Math.pow(10, dotUnderPttnLen);
      }
{code}
if colculated result were too long, missed floating under number.
This patch fixed this problem.
But unfurtunally, if floating under number's length is longer than 9, double 
type number expressed exponential type.
So, I think we need elaborated decimal number type.
  

> Enhance to_char() function
> --------------------------
>
>                 Key: TAJO-637
>                 URL: https://issues.apache.org/jira/browse/TAJO-637
>             Project: Tajo
>          Issue Type: Improvement
>    Affects Versions: 0.8.0
>            Reporter: Keuntae Park
>            Assignee: Seungun Choe
>            Priority: Minor
>              Labels: patch
>         Attachments: TAJO-637.patch, TAJO-637_1.patch, TAJO_637_2.patch, 
> TAJO_637_3.patch
>
>
> Currently, Tajo only supports to_char(timestamp, text) function.
> However, PostgreSQL supports to_char() for timestamp, interval, int, double, 
> and numeric types
> Tajo needs to support more data types in to_char() as shown in 
> http://www.postgresql.org/docs/9.3/static/functions-formatting.html



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

Reply via email to