Details

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

      Description

      This is a poor man's answer to the standard analytic function row_number(); it assigns a sequence of numbers to rows, starting from 1.

      I'm calling it row_sequence() to distinguish it from the real analytic function, so that once we add support for those, there won't be any conflict with the existing UDF.

      The problem with this UDF approach is that there are no guarantees about ordering in SQL processing internals, so use with caution.

      1. HIVE-1304.3.patch
        12 kB
        John Sichi
      2. HIVE-1304.2.patch
        9 kB
        John Sichi
      3. ASF.LICENSE.NOT.GRANTED--HIVE-1304.1.patch
        9 kB
        John Sichi

        Issue Links

          Activity

          Hide
          Namit Jain added a comment -

          Committed. Thanks John

          Show
          Namit Jain added a comment - Committed. Thanks John
          Hide
          Namit Jain added a comment -

          +1

          will commit if the tests pass

          Show
          Namit Jain added a comment - +1 will commit if the tests pass
          Hide
          John Sichi added a comment -

          New patch with test moved to contrib, and DESCRIBE and EXPLAIN thrown in for good measure.

          Show
          John Sichi added a comment - New patch with test moved to contrib, and DESCRIBE and EXPLAIN thrown in for good measure.
          Hide
          John Sichi added a comment -

          Oops, need to move test to contrib too.

          Show
          John Sichi added a comment - Oops, need to move test to contrib too.
          Hide
          John Sichi added a comment -

          New patch addresses Namit's comments.

          Show
          John Sichi added a comment - New patch addresses Namit's comments.
          Hide
          Namit Jain added a comment -

          Can you explicitly set the number of reducers to 1, so ensure same results ? It doesn't matter today, but should be a issue with miniMr etc.
          Also, do you want to keep it in contrib - since this is not guaranteed - multiple mappers may give same results etc.

          Show
          Namit Jain added a comment - Can you explicitly set the number of reducers to 1, so ensure same results ? It doesn't matter today, but should be a issue with miniMr etc. Also, do you want to keep it in contrib - since this is not guaranteed - multiple mappers may give same results etc.
          Hide
          Edward Capriolo added a comment -

          Can we work on... https://issues.apache.org/jira/browse/HIVE-1265..first.

          As of now commits on UDF's is a major pain. Two or three times already I had had to regenerate UDFs because someone else touched the FunctionRegistry. I have had two or three waves of UDF's I want to commit ReflectionUDF, MathUDF, EncryptionUDF but something else sneaks in and I have to regenerate. It is a major pain.

          Show
          Edward Capriolo added a comment - Can we work on... https://issues.apache.org/jira/browse/HIVE-1265..first . As of now commits on UDF's is a major pain. Two or three times already I had had to regenerate UDFs because someone else touched the FunctionRegistry. I have had two or three waves of UDF's I want to commit ReflectionUDF, MathUDF, EncryptionUDF but something else sneaks in and I have to regenerate. It is a major pain.

            People

            • Assignee:
              John Sichi
              Reporter:
              John Sichi
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development