Hive
  1. Hive
  2. HIVE-1734

Implement map_keys() and map_values() UDFs

    Details

    • Type: New Feature New Feature
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 0.6.0
    • Fix Version/s: 0.8.0
    • Component/s: UDF
    • Labels:
      None
    • Hadoop Flags:
      Reviewed

      Description

      Implement the following UDFs:

      <array> map_keys(<map>)

      and

      <array> map_values(<map>)

      map_keys() takes a map as input and returns an array consisting of the key values in the supplied map.
      Similarly, map_values() takes a map as input and returns an array containing the map value fields.

      1. HIVE-1734-mapudf.1.patch.txt
        19 kB
        Carl Steinbach
      2. HIVE-1734-mapudf.2.patch.txt
        16 kB
        Carl Steinbach
      3. MapKeys.java
        3 kB
        Eldon Stegall
      4. MapValues.java
        3 kB
        Eldon Stegall

        Activity

        Hide
        Eldon Stegall added a comment -

        First pass at a patch. Should be easily massagable into your source tree.

        Show
        Eldon Stegall added a comment - First pass at a patch. Should be easily massagable into your source tree.
        Hide
        Eldon Stegall added a comment -

        Hope this works for you.

        Show
        Eldon Stegall added a comment - Hope this works for you.
        Hide
        Namit Jain added a comment -

        Eldon, you need to run all the tests and modify FunctionRegistry to add a corresponding udf.
        You also add to add unit tests for these functions.

        Also, it would be simpler to add a patch containing all the changes instead of different files separately

        Show
        Namit Jain added a comment - Eldon, you need to run all the tests and modify FunctionRegistry to add a corresponding udf. You also add to add unit tests for these functions. Also, it would be simpler to add a patch containing all the changes instead of different files separately
        Hide
        Carl Steinbach added a comment -

        @Eldon: Are you still working on this?

        Show
        Carl Steinbach added a comment - @Eldon: Are you still working on this?
        Hide
        jiraposter@reviews.apache.org added a comment -

        -----------------------------------------------------------
        This is an automatically generated e-mail. To reply, visit:
        https://reviews.apache.org/r/1082/
        -----------------------------------------------------------

        Review request for hive.

        Summary
        -------

        This patch adds map_keys(map) and map_values(map) UDFs.

        This addresses bug HIVE-1734.
        https://issues.apache.org/jira/browse/HIVE-1734

        Diffs


        ql/src/test/results/clientpositive/udf_map_values.q.out PRE-CREATION
        ql/src/test/results/clientpositive/udf_map_keys.q.out PRE-CREATION
        ql/src/test/queries/clientpositive/udf_map_values.q PRE-CREATION
        ql/src/test/results/clientnegative/udf_map_keys_arg_num.q.out PRE-CREATION
        ql/src/test/results/clientnegative/udf_map_keys_arg_type.q.out PRE-CREATION
        ql/src/test/results/clientnegative/udf_map_values_arg_num.q.out PRE-CREATION
        ql/src/test/results/clientnegative/udf_map_values_arg_type.q.out PRE-CREATION
        ql/src/test/results/clientpositive/show_functions.q.out d4f6c98
        ql/src/test/queries/clientnegative/udf_map_values_arg_num.q PRE-CREATION
        ql/src/test/queries/clientnegative/udf_map_values_arg_type.q PRE-CREATION
        ql/src/test/queries/clientpositive/udf_map_keys.q PRE-CREATION
        ql/src/java/org/apache/hadoop/hive/ql/exec/FunctionRegistry.java 16a207e
        ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDFMapKeys.java PRE-CREATION
        ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDFMapValues.java PRE-CREATION
        ql/src/test/queries/clientnegative/udf_map_keys_arg_num.q PRE-CREATION
        ql/src/test/queries/clientnegative/udf_map_keys_arg_type.q PRE-CREATION

        Diff: https://reviews.apache.org/r/1082/diff

        Testing
        -------

        Thanks,

        Carl

        Show
        jiraposter@reviews.apache.org added a comment - ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/1082/ ----------------------------------------------------------- Review request for hive. Summary ------- This patch adds map_keys(map) and map_values(map) UDFs. This addresses bug HIVE-1734 . https://issues.apache.org/jira/browse/HIVE-1734 Diffs ql/src/test/results/clientpositive/udf_map_values.q.out PRE-CREATION ql/src/test/results/clientpositive/udf_map_keys.q.out PRE-CREATION ql/src/test/queries/clientpositive/udf_map_values.q PRE-CREATION ql/src/test/results/clientnegative/udf_map_keys_arg_num.q.out PRE-CREATION ql/src/test/results/clientnegative/udf_map_keys_arg_type.q.out PRE-CREATION ql/src/test/results/clientnegative/udf_map_values_arg_num.q.out PRE-CREATION ql/src/test/results/clientnegative/udf_map_values_arg_type.q.out PRE-CREATION ql/src/test/results/clientpositive/show_functions.q.out d4f6c98 ql/src/test/queries/clientnegative/udf_map_values_arg_num.q PRE-CREATION ql/src/test/queries/clientnegative/udf_map_values_arg_type.q PRE-CREATION ql/src/test/queries/clientpositive/udf_map_keys.q PRE-CREATION ql/src/java/org/apache/hadoop/hive/ql/exec/FunctionRegistry.java 16a207e ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDFMapKeys.java PRE-CREATION ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDFMapValues.java PRE-CREATION ql/src/test/queries/clientnegative/udf_map_keys_arg_num.q PRE-CREATION ql/src/test/queries/clientnegative/udf_map_keys_arg_type.q PRE-CREATION Diff: https://reviews.apache.org/r/1082/diff Testing ------- Thanks, Carl
        Hide
        jiraposter@reviews.apache.org added a comment -

        -----------------------------------------------------------
        This is an automatically generated e-mail. To reply, visit:
        https://reviews.apache.org/r/1082/#review1247
        -----------------------------------------------------------

        ql/src/test/results/clientpositive/udf_map_keys.q.out
        <https://reviews.apache.org/r/1082/#comment2850>

        Shouldn't the output be ["a", "b", "c"] here?

        ql/src/test/results/clientpositive/udf_map_values.q.out
        <https://reviews.apache.org/r/1082/#comment2851>

        Shouldn't the output be [1,2,3] instead of [2,1,3]?

        • Amareshwari

        On 2011-07-12 00:40:11, Carl Steinbach wrote:

        -----------------------------------------------------------

        This is an automatically generated e-mail. To reply, visit:

        https://reviews.apache.org/r/1082/

        -----------------------------------------------------------

        (Updated 2011-07-12 00:40:11)

        Review request for hive.

        Summary

        -------

        This patch adds map_keys(map) and map_values(map) UDFs.

        This addresses bug HIVE-1734.

        https://issues.apache.org/jira/browse/HIVE-1734

        Diffs

        -----

        ql/src/test/results/clientpositive/udf_map_values.q.out PRE-CREATION

        ql/src/test/results/clientpositive/udf_map_keys.q.out PRE-CREATION

        ql/src/test/queries/clientpositive/udf_map_values.q PRE-CREATION

        ql/src/test/results/clientnegative/udf_map_keys_arg_num.q.out PRE-CREATION

        ql/src/test/results/clientnegative/udf_map_keys_arg_type.q.out PRE-CREATION

        ql/src/test/results/clientnegative/udf_map_values_arg_num.q.out PRE-CREATION

        ql/src/test/results/clientnegative/udf_map_values_arg_type.q.out PRE-CREATION

        ql/src/test/results/clientpositive/show_functions.q.out d4f6c98

        ql/src/test/queries/clientnegative/udf_map_values_arg_num.q PRE-CREATION

        ql/src/test/queries/clientnegative/udf_map_values_arg_type.q PRE-CREATION

        ql/src/test/queries/clientpositive/udf_map_keys.q PRE-CREATION

        ql/src/java/org/apache/hadoop/hive/ql/exec/FunctionRegistry.java 16a207e

        ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDFMapKeys.java PRE-CREATION

        ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDFMapValues.java PRE-CREATION

        ql/src/test/queries/clientnegative/udf_map_keys_arg_num.q PRE-CREATION

        ql/src/test/queries/clientnegative/udf_map_keys_arg_type.q PRE-CREATION

        Diff: https://reviews.apache.org/r/1082/diff

        Testing

        -------

        Thanks,

        Carl

        Show
        jiraposter@reviews.apache.org added a comment - ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/1082/#review1247 ----------------------------------------------------------- ql/src/test/results/clientpositive/udf_map_keys.q.out < https://reviews.apache.org/r/1082/#comment2850 > Shouldn't the output be ["a", "b", "c"] here? ql/src/test/results/clientpositive/udf_map_values.q.out < https://reviews.apache.org/r/1082/#comment2851 > Shouldn't the output be [1,2,3] instead of [2,1,3] ? Amareshwari On 2011-07-12 00:40:11, Carl Steinbach wrote: ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/1082/ ----------------------------------------------------------- (Updated 2011-07-12 00:40:11) Review request for hive. Summary ------- This patch adds map_keys(map) and map_values(map) UDFs. This addresses bug HIVE-1734 . https://issues.apache.org/jira/browse/HIVE-1734 Diffs ----- ql/src/test/results/clientpositive/udf_map_values.q.out PRE-CREATION ql/src/test/results/clientpositive/udf_map_keys.q.out PRE-CREATION ql/src/test/queries/clientpositive/udf_map_values.q PRE-CREATION ql/src/test/results/clientnegative/udf_map_keys_arg_num.q.out PRE-CREATION ql/src/test/results/clientnegative/udf_map_keys_arg_type.q.out PRE-CREATION ql/src/test/results/clientnegative/udf_map_values_arg_num.q.out PRE-CREATION ql/src/test/results/clientnegative/udf_map_values_arg_type.q.out PRE-CREATION ql/src/test/results/clientpositive/show_functions.q.out d4f6c98 ql/src/test/queries/clientnegative/udf_map_values_arg_num.q PRE-CREATION ql/src/test/queries/clientnegative/udf_map_values_arg_type.q PRE-CREATION ql/src/test/queries/clientpositive/udf_map_keys.q PRE-CREATION ql/src/java/org/apache/hadoop/hive/ql/exec/FunctionRegistry.java 16a207e ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDFMapKeys.java PRE-CREATION ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDFMapValues.java PRE-CREATION ql/src/test/queries/clientnegative/udf_map_keys_arg_num.q PRE-CREATION ql/src/test/queries/clientnegative/udf_map_keys_arg_type.q PRE-CREATION Diff: https://reviews.apache.org/r/1082/diff Testing ------- Thanks, Carl
        Hide
        Amareshwari Sriramadasu added a comment -

        The ordering of the key/value elements in the output array does not seem correct.

        Show
        Amareshwari Sriramadasu added a comment - The ordering of the key/value elements in the output array does not seem correct.
        Hide
        Carl Steinbach added a comment -

        Please see my comments on reviewboard.

        Show
        Carl Steinbach added a comment - Please see my comments on reviewboard.
        Hide
        jiraposter@reviews.apache.org added a comment -

        On 2011-08-01 10:03:11, Amareshwari Sriramadasu wrote:

        > ql/src/test/results/clientpositive/udf_map_keys.q.out, line 40

        > <https://reviews.apache.org/r/1082/diff/1/?file=22333#file22333line40>

        >

        > Shouldn't the output be ["a", "b", "c"] here?

        The set of key/value pairs in a Map is unordered, and the same property also applies if you look only at the set of keys, or the set of values. Unfortunately, Hive's type system does not have a 'set' type, so we're forced to return the result of map_keys() and map_values() as an array, which implies that the set is ordered when it really isn't. If you want to apply a specific ordering property to the output of map_keys() or map_values(), then you would have to do this with a sort(array) UDF (which is not yet implemented).

        On 2011-08-01 10:03:11, Amareshwari Sriramadasu wrote:

        > ql/src/test/results/clientpositive/udf_map_values.q.out, line 40

        > <https://reviews.apache.org/r/1082/diff/1/?file=22334#file22334line40>

        >

        > Shouldn't the output be [1,2,3] instead of [2,1,3]?

        No. See previous comment.

        • Carl

        -----------------------------------------------------------
        This is an automatically generated e-mail. To reply, visit:
        https://reviews.apache.org/r/1082/#review1247
        -----------------------------------------------------------

        On 2011-07-12 00:40:11, Carl Steinbach wrote:

        -----------------------------------------------------------

        This is an automatically generated e-mail. To reply, visit:

        https://reviews.apache.org/r/1082/

        -----------------------------------------------------------

        (Updated 2011-07-12 00:40:11)

        Review request for hive.

        Summary

        -------

        This patch adds map_keys(map) and map_values(map) UDFs.

        This addresses bug HIVE-1734.

        https://issues.apache.org/jira/browse/HIVE-1734

        Diffs

        -----

        ql/src/test/results/clientpositive/udf_map_values.q.out PRE-CREATION

        ql/src/test/results/clientpositive/udf_map_keys.q.out PRE-CREATION

        ql/src/test/queries/clientpositive/udf_map_values.q PRE-CREATION

        ql/src/test/results/clientnegative/udf_map_keys_arg_num.q.out PRE-CREATION

        ql/src/test/results/clientnegative/udf_map_keys_arg_type.q.out PRE-CREATION

        ql/src/test/results/clientnegative/udf_map_values_arg_num.q.out PRE-CREATION

        ql/src/test/results/clientnegative/udf_map_values_arg_type.q.out PRE-CREATION

        ql/src/test/results/clientpositive/show_functions.q.out d4f6c98

        ql/src/test/queries/clientnegative/udf_map_values_arg_num.q PRE-CREATION

        ql/src/test/queries/clientnegative/udf_map_values_arg_type.q PRE-CREATION

        ql/src/test/queries/clientpositive/udf_map_keys.q PRE-CREATION

        ql/src/java/org/apache/hadoop/hive/ql/exec/FunctionRegistry.java 16a207e

        ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDFMapKeys.java PRE-CREATION

        ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDFMapValues.java PRE-CREATION

        ql/src/test/queries/clientnegative/udf_map_keys_arg_num.q PRE-CREATION

        ql/src/test/queries/clientnegative/udf_map_keys_arg_type.q PRE-CREATION

        Diff: https://reviews.apache.org/r/1082/diff

        Testing

        -------

        Thanks,

        Carl

        Show
        jiraposter@reviews.apache.org added a comment - On 2011-08-01 10:03:11, Amareshwari Sriramadasu wrote: > ql/src/test/results/clientpositive/udf_map_keys.q.out, line 40 > < https://reviews.apache.org/r/1082/diff/1/?file=22333#file22333line40 > > > Shouldn't the output be ["a", "b", "c"] here? The set of key/value pairs in a Map is unordered, and the same property also applies if you look only at the set of keys, or the set of values. Unfortunately, Hive's type system does not have a 'set' type, so we're forced to return the result of map_keys() and map_values() as an array, which implies that the set is ordered when it really isn't. If you want to apply a specific ordering property to the output of map_keys() or map_values(), then you would have to do this with a sort(array) UDF (which is not yet implemented). On 2011-08-01 10:03:11, Amareshwari Sriramadasu wrote: > ql/src/test/results/clientpositive/udf_map_values.q.out, line 40 > < https://reviews.apache.org/r/1082/diff/1/?file=22334#file22334line40 > > > Shouldn't the output be [1,2,3] instead of [2,1,3] ? No. See previous comment. Carl ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/1082/#review1247 ----------------------------------------------------------- On 2011-07-12 00:40:11, Carl Steinbach wrote: ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/1082/ ----------------------------------------------------------- (Updated 2011-07-12 00:40:11) Review request for hive. Summary ------- This patch adds map_keys(map) and map_values(map) UDFs. This addresses bug HIVE-1734 . https://issues.apache.org/jira/browse/HIVE-1734 Diffs ----- ql/src/test/results/clientpositive/udf_map_values.q.out PRE-CREATION ql/src/test/results/clientpositive/udf_map_keys.q.out PRE-CREATION ql/src/test/queries/clientpositive/udf_map_values.q PRE-CREATION ql/src/test/results/clientnegative/udf_map_keys_arg_num.q.out PRE-CREATION ql/src/test/results/clientnegative/udf_map_keys_arg_type.q.out PRE-CREATION ql/src/test/results/clientnegative/udf_map_values_arg_num.q.out PRE-CREATION ql/src/test/results/clientnegative/udf_map_values_arg_type.q.out PRE-CREATION ql/src/test/results/clientpositive/show_functions.q.out d4f6c98 ql/src/test/queries/clientnegative/udf_map_values_arg_num.q PRE-CREATION ql/src/test/queries/clientnegative/udf_map_values_arg_type.q PRE-CREATION ql/src/test/queries/clientpositive/udf_map_keys.q PRE-CREATION ql/src/java/org/apache/hadoop/hive/ql/exec/FunctionRegistry.java 16a207e ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDFMapKeys.java PRE-CREATION ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDFMapValues.java PRE-CREATION ql/src/test/queries/clientnegative/udf_map_keys_arg_num.q PRE-CREATION ql/src/test/queries/clientnegative/udf_map_keys_arg_type.q PRE-CREATION Diff: https://reviews.apache.org/r/1082/diff Testing ------- Thanks, Carl
        Hide
        Amareshwari Sriramadasu added a comment -

        Makes sense. Can you update the documentation saying the array is unordered? Also, patch needs to be re based to trunk.

        Show
        Amareshwari Sriramadasu added a comment - Makes sense. Can you update the documentation saying the array is unordered? Also, patch needs to be re based to trunk.
        Hide
        jiraposter@reviews.apache.org added a comment -

        -----------------------------------------------------------
        This is an automatically generated e-mail. To reply, visit:
        https://reviews.apache.org/r/1082/
        -----------------------------------------------------------

        (Updated 2011-08-05 18:44:36.743395)

        Review request for hive.

        Summary
        -------

        This patch adds map_keys(map) and map_values(map) UDFs.

        This addresses bug HIVE-1734.
        https://issues.apache.org/jira/browse/HIVE-1734

        Diffs (updated)


        ql/src/java/org/apache/hadoop/hive/ql/exec/FunctionRegistry.java 13584c1
        ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDFMapKeys.java PRE-CREATION
        ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDFMapValues.java PRE-CREATION
        ql/src/test/queries/clientnegative/udf_map_keys_arg_num.q PRE-CREATION
        ql/src/test/queries/clientnegative/udf_map_keys_arg_type.q PRE-CREATION
        ql/src/test/queries/clientnegative/udf_map_values_arg_num.q PRE-CREATION
        ql/src/test/queries/clientnegative/udf_map_values_arg_type.q PRE-CREATION
        ql/src/test/queries/clientpositive/udf_map_keys.q PRE-CREATION
        ql/src/test/queries/clientpositive/udf_map_values.q PRE-CREATION
        ql/src/test/results/clientnegative/udf_map_keys_arg_num.q.out PRE-CREATION
        ql/src/test/results/clientnegative/udf_map_keys_arg_type.q.out PRE-CREATION
        ql/src/test/results/clientnegative/udf_map_values_arg_num.q.out PRE-CREATION
        ql/src/test/results/clientnegative/udf_map_values_arg_type.q.out PRE-CREATION
        ql/src/test/results/clientpositive/show_functions.q.out d4f6c98
        ql/src/test/results/clientpositive/udf_map_keys.q.out PRE-CREATION
        ql/src/test/results/clientpositive/udf_map_values.q.out PRE-CREATION

        Diff: https://reviews.apache.org/r/1082/diff

        Testing
        -------

        Thanks,

        Carl

        Show
        jiraposter@reviews.apache.org added a comment - ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/1082/ ----------------------------------------------------------- (Updated 2011-08-05 18:44:36.743395) Review request for hive. Summary ------- This patch adds map_keys(map) and map_values(map) UDFs. This addresses bug HIVE-1734 . https://issues.apache.org/jira/browse/HIVE-1734 Diffs (updated) ql/src/java/org/apache/hadoop/hive/ql/exec/FunctionRegistry.java 13584c1 ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDFMapKeys.java PRE-CREATION ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDFMapValues.java PRE-CREATION ql/src/test/queries/clientnegative/udf_map_keys_arg_num.q PRE-CREATION ql/src/test/queries/clientnegative/udf_map_keys_arg_type.q PRE-CREATION ql/src/test/queries/clientnegative/udf_map_values_arg_num.q PRE-CREATION ql/src/test/queries/clientnegative/udf_map_values_arg_type.q PRE-CREATION ql/src/test/queries/clientpositive/udf_map_keys.q PRE-CREATION ql/src/test/queries/clientpositive/udf_map_values.q PRE-CREATION ql/src/test/results/clientnegative/udf_map_keys_arg_num.q.out PRE-CREATION ql/src/test/results/clientnegative/udf_map_keys_arg_type.q.out PRE-CREATION ql/src/test/results/clientnegative/udf_map_values_arg_num.q.out PRE-CREATION ql/src/test/results/clientnegative/udf_map_values_arg_type.q.out PRE-CREATION ql/src/test/results/clientpositive/show_functions.q.out d4f6c98 ql/src/test/results/clientpositive/udf_map_keys.q.out PRE-CREATION ql/src/test/results/clientpositive/udf_map_values.q.out PRE-CREATION Diff: https://reviews.apache.org/r/1082/diff Testing ------- Thanks, Carl
        Hide
        Carl Steinbach added a comment -

        New patch with updated documentation.

        Show
        Carl Steinbach added a comment - New patch with updated documentation.
        Hide
        jiraposter@reviews.apache.org added a comment -

        -----------------------------------------------------------
        This is an automatically generated e-mail. To reply, visit:
        https://reviews.apache.org/r/1082/#review1316
        -----------------------------------------------------------

        Ship it!

        Will commit once tests pass.

        • Amareshwari

        On 2011-08-05 18:44:36, Carl Steinbach wrote:

        -----------------------------------------------------------

        This is an automatically generated e-mail. To reply, visit:

        https://reviews.apache.org/r/1082/

        -----------------------------------------------------------

        (Updated 2011-08-05 18:44:36)

        Review request for hive.

        Summary

        -------

        This patch adds map_keys(map) and map_values(map) UDFs.

        This addresses bug HIVE-1734.

        https://issues.apache.org/jira/browse/HIVE-1734

        Diffs

        -----

        ql/src/java/org/apache/hadoop/hive/ql/exec/FunctionRegistry.java 13584c1

        ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDFMapKeys.java PRE-CREATION

        ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDFMapValues.java PRE-CREATION

        ql/src/test/queries/clientnegative/udf_map_keys_arg_num.q PRE-CREATION

        ql/src/test/queries/clientnegative/udf_map_keys_arg_type.q PRE-CREATION

        ql/src/test/queries/clientnegative/udf_map_values_arg_num.q PRE-CREATION

        ql/src/test/queries/clientnegative/udf_map_values_arg_type.q PRE-CREATION

        ql/src/test/queries/clientpositive/udf_map_keys.q PRE-CREATION

        ql/src/test/queries/clientpositive/udf_map_values.q PRE-CREATION

        ql/src/test/results/clientnegative/udf_map_keys_arg_num.q.out PRE-CREATION

        ql/src/test/results/clientnegative/udf_map_keys_arg_type.q.out PRE-CREATION

        ql/src/test/results/clientnegative/udf_map_values_arg_num.q.out PRE-CREATION

        ql/src/test/results/clientnegative/udf_map_values_arg_type.q.out PRE-CREATION

        ql/src/test/results/clientpositive/show_functions.q.out d4f6c98

        ql/src/test/results/clientpositive/udf_map_keys.q.out PRE-CREATION

        ql/src/test/results/clientpositive/udf_map_values.q.out PRE-CREATION

        Diff: https://reviews.apache.org/r/1082/diff

        Testing

        -------

        Thanks,

        Carl

        Show
        jiraposter@reviews.apache.org added a comment - ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/1082/#review1316 ----------------------------------------------------------- Ship it! Will commit once tests pass. Amareshwari On 2011-08-05 18:44:36, Carl Steinbach wrote: ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/1082/ ----------------------------------------------------------- (Updated 2011-08-05 18:44:36) Review request for hive. Summary ------- This patch adds map_keys(map) and map_values(map) UDFs. This addresses bug HIVE-1734 . https://issues.apache.org/jira/browse/HIVE-1734 Diffs ----- ql/src/java/org/apache/hadoop/hive/ql/exec/FunctionRegistry.java 13584c1 ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDFMapKeys.java PRE-CREATION ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDFMapValues.java PRE-CREATION ql/src/test/queries/clientnegative/udf_map_keys_arg_num.q PRE-CREATION ql/src/test/queries/clientnegative/udf_map_keys_arg_type.q PRE-CREATION ql/src/test/queries/clientnegative/udf_map_values_arg_num.q PRE-CREATION ql/src/test/queries/clientnegative/udf_map_values_arg_type.q PRE-CREATION ql/src/test/queries/clientpositive/udf_map_keys.q PRE-CREATION ql/src/test/queries/clientpositive/udf_map_values.q PRE-CREATION ql/src/test/results/clientnegative/udf_map_keys_arg_num.q.out PRE-CREATION ql/src/test/results/clientnegative/udf_map_keys_arg_type.q.out PRE-CREATION ql/src/test/results/clientnegative/udf_map_values_arg_num.q.out PRE-CREATION ql/src/test/results/clientnegative/udf_map_values_arg_type.q.out PRE-CREATION ql/src/test/results/clientpositive/show_functions.q.out d4f6c98 ql/src/test/results/clientpositive/udf_map_keys.q.out PRE-CREATION ql/src/test/results/clientpositive/udf_map_values.q.out PRE-CREATION Diff: https://reviews.apache.org/r/1082/diff Testing ------- Thanks, Carl
        Hide
        Amareshwari Sriramadasu added a comment -

        I just committed this. Thanks Carl !

        Show
        Amareshwari Sriramadasu added a comment - I just committed this. Thanks Carl !
        Hide
        Hudson added a comment -

        Integrated in Hive-trunk-h0.21 #879 (See https://builds.apache.org/job/Hive-trunk-h0.21/879/)
        HIVE-1734. Implement map_keys() and map_values() UDFs. (Carl Steinbach via amareshwari)

        amareshwari : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1154816
        Files :

        • /hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDFMapValues.java
        • /hive/trunk/ql/src/test/results/clientpositive/show_functions.q.out
        • /hive/trunk/ql/src/test/queries/clientpositive/udf_map_values.q
        • /hive/trunk/ql/src/test/queries/clientnegative/udf_map_keys_arg_type.q
        • /hive/trunk/ql/src/test/results/clientnegative/udf_map_values_arg_type.q.out
        • /hive/trunk/ql/src/test/results/clientpositive/udf_map_keys.q.out
        • /hive/trunk/ql/src/test/queries/clientnegative/udf_map_values_arg_num.q
        • /hive/trunk/ql/src/test/results/clientnegative/udf_map_keys_arg_num.q.out
        • /hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDFMapKeys.java
        • /hive/trunk/ql/src/test/results/clientpositive/udf_map_values.q.out
        • /hive/trunk/ql/src/test/results/clientnegative/udf_map_keys_arg_type.q.out
        • /hive/trunk/ql/src/test/queries/clientpositive/udf_map_keys.q
        • /hive/trunk/ql/src/test/queries/clientnegative/udf_map_values_arg_type.q
        • /hive/trunk/ql/src/test/results/clientnegative/udf_map_values_arg_num.q.out
        • /hive/trunk/ql/src/test/queries/clientnegative/udf_map_keys_arg_num.q
        • /hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/exec/FunctionRegistry.java
        Show
        Hudson added a comment - Integrated in Hive-trunk-h0.21 #879 (See https://builds.apache.org/job/Hive-trunk-h0.21/879/ ) HIVE-1734 . Implement map_keys() and map_values() UDFs. (Carl Steinbach via amareshwari) amareshwari : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1154816 Files : /hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDFMapValues.java /hive/trunk/ql/src/test/results/clientpositive/show_functions.q.out /hive/trunk/ql/src/test/queries/clientpositive/udf_map_values.q /hive/trunk/ql/src/test/queries/clientnegative/udf_map_keys_arg_type.q /hive/trunk/ql/src/test/results/clientnegative/udf_map_values_arg_type.q.out /hive/trunk/ql/src/test/results/clientpositive/udf_map_keys.q.out /hive/trunk/ql/src/test/queries/clientnegative/udf_map_values_arg_num.q /hive/trunk/ql/src/test/results/clientnegative/udf_map_keys_arg_num.q.out /hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDFMapKeys.java /hive/trunk/ql/src/test/results/clientpositive/udf_map_values.q.out /hive/trunk/ql/src/test/results/clientnegative/udf_map_keys_arg_type.q.out /hive/trunk/ql/src/test/queries/clientpositive/udf_map_keys.q /hive/trunk/ql/src/test/queries/clientnegative/udf_map_values_arg_type.q /hive/trunk/ql/src/test/results/clientnegative/udf_map_values_arg_num.q.out /hive/trunk/ql/src/test/queries/clientnegative/udf_map_keys_arg_num.q /hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/exec/FunctionRegistry.java

          People

          • Assignee:
            Carl Steinbach
            Reporter:
            Carl Steinbach
          • Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development