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

Hudson commented on TAJO-978:
-----------------------------

SUCCESS: Integrated in Tajo-master-build #321 (See 
[https://builds.apache.org/job/Tajo-master-build/321/])
TAJO-978: RoundFloat8 should return Float8Datum type. (Hyoungjun Kim via 
hyunsik) (hyunsik: rev 650157c5907c43a2f9228cd9a3ff59619e24efb6)
* tajo-core/src/test/resources/queries/TestSelectQuery/testCaseWhenRound.sql
* tajo-core/src/test/java/org/apache/tajo/engine/query/TestSelectQuery.java
* tajo-core/src/main/java/org/apache/tajo/engine/function/math/RoundFloat8.java
* tajo-core/src/test/resources/results/TestSelectQuery/testCaseWhenRound.result
* tajo-core/src/test/java/org/apache/tajo/engine/function/TestMathFunctions.java
* CHANGES


> 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
>             Fix For: 0.9.0
>
>
> 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