hive-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject [jira] [Commented] (HIVE-436) MIN and MAX should be generic
Date Wed, 13 Feb 2013 14:52:12 GMT


PRETTY SITHARA commented on HIVE-436:

MIN and MAX functions should be generic means it should support int, bigint, double, and even
string types.Did you mean the same????
But I found that maxima and minina works fine for the above mentioned data types....

> MIN and MAX should be generic
> -----------------------------
>                 Key: HIVE-436
>                 URL:
>             Project: Hive
>          Issue Type: Improvement
>          Components: UDF
>            Reporter: Adam Kramer
> MIN and MAX functions currently return the DOUBLE type...but really, these should be
generic UDFs. It makes sense to talk about minima and maxima for int, bigint, double, and
even string types.
> In some cases like SUM, it's possible that the result would overflow making DOUBLE more
useful as it can drop digits and swap to scientific notation, but MIN and MAX by definition
cannot have this problem because the answers are always represented in the column they are
run across.
> Easy workaround: CAST all of my MINs and MAXes from DOUBLE to INT, but these should work
with STRING too.

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see:

View raw message