Hive
  1. Hive
  2. HIVE-1877

Add java_method() as a synonym for the reflect() UDF

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 0.7.0
    • Fix Version/s: 0.9.0
    • Component/s: UDF
    • Labels:
      None
    • Hadoop Flags:
      Reviewed
    • Release Note:
      java_method() is a synonym for reflect()

      Description

      HIVE-471 added the reflect() UDF which allows people to invoke static Java methods from within HQL
      queries. In my opinion the name is confusing since it describes how the UDF works instead of what
      it does. I propose changing the name of (or providing a synonym for) the UDF to something like
      'invoke_method' or 'java_method', or something similar. I'm open to suggestions.

      1. HIVE-1877.1.patch.txt
        11 kB
        Carl Steinbach
      2. HIVE-1877.2.patch.txt
        12 kB
        Carl Steinbach
      3. HIVE-1877.3.patch.txt
        10 kB
        Zhenxiao Luo

        Issue Links

          Activity

          Hide
          Edward Capriolo added a comment -

          It is probably easier work wise for us to simply register the UDF with two names. This results in less work. I agree that the name could be better in that regard, but we do not have many UDF's. So you could not convince me because it is a but trivial, but if you are going to do the work I would not block it.

          Show
          Edward Capriolo added a comment - It is probably easier work wise for us to simply register the UDF with two names. This results in less work. I agree that the name could be better in that regard, but we do not have many UDF's. So you could not convince me because it is a but trivial, but if you are going to do the work I would not block it.
          Hide
          Carl Steinbach added a comment -
          Show
          Carl Steinbach added a comment - Review request: https://reviews.apache.org/r/197/
          Hide
          Amareshwari Sriramadasu added a comment -

          +1 Patch looks good

          Show
          Amareshwari Sriramadasu added a comment - +1 Patch looks good
          Hide
          Amareshwari Sriramadasu added a comment -

          Patch does not apply cleanly. Can you regenerate? I will run tests and commit, once new patch is uploaded.

          Show
          Amareshwari Sriramadasu added a comment - Patch does not apply cleanly. Can you regenerate? I will run tests and commit, once new patch is uploaded.
          Hide
          Zhenxiao Luo added a comment -

          Code Review Request for HIVE-1877

          Show
          Zhenxiao Luo added a comment - Code Review Request for HIVE-1877
          Hide
          Carl Steinbach added a comment -

          +1. Will commit if tests pass.

          Show
          Carl Steinbach added a comment - +1. Will commit if tests pass.
          Hide
          Carl Steinbach added a comment -

          Committed to trunk. Thanks Zhenxiao!

          Show
          Carl Steinbach added a comment - Committed to trunk. Thanks Zhenxiao!
          Hide
          Hudson added a comment -

          Integrated in Hive-trunk-h0.23.0 #48 (See https://builds.apache.org/job/Hive-trunk-h0.23.0/48/)
          HIVE-1877. Add java_method() as a synonym for the reflect() UDF (Zhenxiao Luo via cws)

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

          • /hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/exec/FunctionRegistry.java
          • /hive/trunk/ql/src/test/queries/clientpositive/udf_java_method.q
          • /hive/trunk/ql/src/test/results/clientpositive/show_functions.q.out
          • /hive/trunk/ql/src/test/results/clientpositive/udf_java_method.q.out
          • /hive/trunk/ql/src/test/results/clientpositive/udf_reflect.q.out
          Show
          Hudson added a comment - Integrated in Hive-trunk-h0.23.0 #48 (See https://builds.apache.org/job/Hive-trunk-h0.23.0/48/ ) HIVE-1877 . Add java_method() as a synonym for the reflect() UDF (Zhenxiao Luo via cws) cws : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1224646 Files : /hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/exec/FunctionRegistry.java /hive/trunk/ql/src/test/queries/clientpositive/udf_java_method.q /hive/trunk/ql/src/test/results/clientpositive/show_functions.q.out /hive/trunk/ql/src/test/results/clientpositive/udf_java_method.q.out /hive/trunk/ql/src/test/results/clientpositive/udf_reflect.q.out
          Hide
          Hudson added a comment -

          Integrated in Hive-trunk-h0.21 #1170 (See https://builds.apache.org/job/Hive-trunk-h0.21/1170/)
          HIVE-1877. Add java_method() as a synonym for the reflect() UDF (Zhenxiao Luo via cws)

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

          • /hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/exec/FunctionRegistry.java
          • /hive/trunk/ql/src/test/queries/clientpositive/udf_java_method.q
          • /hive/trunk/ql/src/test/results/clientpositive/show_functions.q.out
          • /hive/trunk/ql/src/test/results/clientpositive/udf_java_method.q.out
          • /hive/trunk/ql/src/test/results/clientpositive/udf_reflect.q.out
          Show
          Hudson added a comment - Integrated in Hive-trunk-h0.21 #1170 (See https://builds.apache.org/job/Hive-trunk-h0.21/1170/ ) HIVE-1877 . Add java_method() as a synonym for the reflect() UDF (Zhenxiao Luo via cws) cws : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1224646 Files : /hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/exec/FunctionRegistry.java /hive/trunk/ql/src/test/queries/clientpositive/udf_java_method.q /hive/trunk/ql/src/test/results/clientpositive/show_functions.q.out /hive/trunk/ql/src/test/results/clientpositive/udf_java_method.q.out /hive/trunk/ql/src/test/results/clientpositive/udf_reflect.q.out
          Hide
          Ashutosh Chauhan added a comment -

          This issue is closed now. It was released with the fix in 0.9.0. If there is a problem, please open a new jira and link this one with that.

          Show
          Ashutosh Chauhan added a comment - This issue is closed now. It was released with the fix in 0.9.0. If there is a problem, please open a new jira and link this one with that.

            People

            • Assignee:
              Zhenxiao Luo
              Reporter:
              Carl Steinbach
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development