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

ASF GitHub Bot commented on TAJO-978:
-------------------------------------

GitHub user babokim opened a pull request:

    https://github.com/apache/tajo/pull/96

    TAJO-978: RoundFloat8 should return Float8Datum type.

    

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/babokim/tajo TAJO-978

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/tajo/pull/96.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #96
    
----
commit 4b1e03cbbe02698e84270d0f27f3fb9921c3079e
Author: 김형준 <[email protected]>
Date:   2014-07-25T12:37:35Z

    TAJO-978: RoundFloat8 should return Float8Datum type.

----


> RoundFloat8 should return Float8Datum type.
> -------------------------------------------
>
>                 Key: TAJO-978
>                 URL: https://issues.apache.org/jira/browse/TAJO-978
>             Project: Tajo
>          Issue Type: Bug
>            Reporter: Hyoungjun Kim
>            Assignee: Hyoungjun Kim
>            Priority: Minor
>
> Currently RoundFloat8 function returns TextDatum. So the following query 
> occurs InvalidOperationException.
> {code:sql}
>  select * from (
>     select n_nationkey as key, 
>               case when n_nationkey < 6 
>                   then round((n_nationkey * 100 / 2.123)::float4 / 
> (n_regionkey + 1)::float4, 2) 
>                   else 100.0 
>               end as val 
>       from nation) a 
> order by a.key
> {code}
> {noformat}
> 2014-07-25 16:40:08,418 ERROR: org.apache.tajo.worker.Task (run(432)) - 
> Cannot compare to FLOAT8 type datum
> org.apache.tajo.exception.InvalidOperationException: Cannot compare to FLOAT8 
> type datum
>       at org.apache.tajo.datum.TextDatum.compareTo(TextDatum.java:113)
>       at 
> org.apache.tajo.storage.TableStatistics.analyzeField(TableStatistics.java:91)
>       at 
> org.apache.tajo.storage.RawFile$RawFileAppender.addTuple(RawFile.java:600)
>       at 
> org.apache.tajo.engine.planner.physical.RangeShuffleFileWriteExec.next(RangeShuffleFileWriteExec.java:101)
>       at org.apache.tajo.worker.Task.run(Task.java:425)
>       at org.apache.tajo.worker.TaskRunner$1.run(TaskRunner.java:406)
>       at java.lang.Thread.run(Thread.java:744)
> {noformat}



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

Reply via email to