hive-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Nicolas Lalevée (JIRA) <>
Subject [jira] [Created] (HIVE-8613) percentile_approx raise a comparator error
Date Mon, 27 Oct 2014 17:33:34 GMT
Nicolas Lalevée created HIVE-8613:

             Summary: percentile_approx raise a comparator error
                 Key: HIVE-8613
             Project: Hive
          Issue Type: Bug
    Affects Versions: 0.12.0
            Reporter: Nicolas Lalevée

I have implemented an UADF which wrap around percentile_approx, and I have been hit by the
following stack trace:
Caused by: java.lang.IllegalArgumentException: Comparison method violates its general contract!
	at java.util.ComparableTimSort.mergeLo(
	at java.util.ComparableTimSort.mergeAt(
	at java.util.ComparableTimSort.mergeCollapse(
	at java.util.ComparableTimSort.sort(
	at java.util.ComparableTimSort.sort(
	at java.util.Arrays.sort(
	at java.util.Collections.sort(
	at org.apache.hadoop.hive.ql.udf.generic.NumericHistogram.merge(

In my use case, with my special UADF, there were Double.NaN

Implementing a proper double comparaison with in com.goojet.mapred.hive.udf.NumericHistogram.Coord.compareTo(Object)
fixes it.

This message was sent by Atlassian JIRA

View raw message