hive-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Zheng Shao (JIRA)" <>
Subject [jira] Created: (HIVE-888) Hive arg_max and arg_min
Date Mon, 19 Oct 2009 17:47:59 GMT
Hive arg_max and arg_min

                 Key: HIVE-888
             Project: Hadoop Hive
          Issue Type: New Feature
            Reporter: Zheng Shao

We want a way to let Hive return the row with the maximum value of one field.

There are 2 approaches:

A1. Support arg_min and arg_max:
  SELECT userid, ARG_MAX(action_time, action_type), ARG_MAX(action_time, action_target) FROM

A2. Support struct<...> and let max, min take a struct and compare field by field.
  SELECT userid, MAX(struct(action_time:action_time, action_type:action_type, action_target:action_target))
FROM userlog;

I think A2 should be easier to understand.

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

View raw message