hadoop-hive-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Namit Jain (JIRA)" <j...@apache.org>
Subject [jira] Commented: (HIVE-656) Add a PMOD (POSITIVE_MOD) function
Date Wed, 29 Jul 2009 00:53:14 GMT

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

Namit Jain commented on HIVE-656:

There is a problem with the current tests - drop function is not called at the end of some
tests - so, the output depends on the order of execution.
You may need to regenerate the patch after https://issues.apache.org/jira/browse/HIVE-700

> Add a PMOD (POSITIVE_MOD) function
> ----------------------------------
>                 Key: HIVE-656
>                 URL: https://issues.apache.org/jira/browse/HIVE-656
>             Project: Hadoop Hive
>          Issue Type: New Feature
>            Reporter: Zheng Shao
>            Assignee: Scott Chen
>         Attachments: hive-656-2009-07-27-1.patch, hive-656-2009-07-27-2.patch, hive-656-2009-07-27.patch
> There are a lot of cases people want to get a positive modulo result.
> For example, people want to bucket the data into 10 buckets. They use the hash code in
Hive (based on Java) which can return a negative number. Then they need this POSITIVE_MOD(a,
b) to return the results.
> Otherwise they can still do it but it will be very verbose:
> {code}
> ((hash(xxx) % 10) + 10) % 10
> {code}

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message