hive-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Navis (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HIVE-8613) percentile_approx raise a comparator error
Date Mon, 22 Dec 2014 07:36:14 GMT

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

Navis commented on HIVE-8613:
-----------------------------

[~szehon] In test mode, CBO is enabled changing constant(second argument) to column type and
throws exception creating evaluator for the function. It seemed to be an another issue but
before digging deeper, I though checking group-by is missed by mistake. Before making questions
to CBO guys, I wanted to confirm tests passed. 

> percentile_approx raise a comparator error
> ------------------------------------------
>
>                 Key: HIVE-8613
>                 URL: https://issues.apache.org/jira/browse/HIVE-8613
>             Project: Hive
>          Issue Type: Bug
>    Affects Versions: 0.12.0
>            Reporter: Nicolas Lalevée
>            Assignee: Navis
>         Attachments: HIVE-8613.1.patch.txt, HIVE-8613.2.patch.txt
>
>
> I have implemented an UADF which wrap around percentile_approx, and I have been hit by
the following stack trace:
> {noformat}
> Caused by: java.lang.IllegalArgumentException: Comparison method violates its general
contract!
> 	at java.util.ComparableTimSort.mergeLo(ComparableTimSort.java:714)
> 	at java.util.ComparableTimSort.mergeAt(ComparableTimSort.java:451)
> 	at java.util.ComparableTimSort.mergeCollapse(ComparableTimSort.java:376)
> 	at java.util.ComparableTimSort.sort(ComparableTimSort.java:182)
> 	at java.util.ComparableTimSort.sort(ComparableTimSort.java:146)
> 	at java.util.Arrays.sort(Arrays.java:472)
> 	at java.util.Collections.sort(Collections.java:155)
> 	at org.apache.hadoop.hive.ql.udf.generic.NumericHistogram.merge(NumericHistogram.java:161)
> {noformat}
> In my use case, with my special UADF, there were Double.NaN
> Implementing a proper double comparaison with Double.compare in com.goojet.mapred.hive.udf.NumericHistogram.Coord.compareTo(Object)
fixes it.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message