Hive
  1. Hive
  2. HIVE-700

Fix test error by adding "DROP FUNCTION"

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 0.4.0
    • Component/s: None
    • Labels:
      None
    • Hadoop Flags:
      Reviewed
    • Release Note:
      Hide
      HIVE-700. Fix test error by adding \"DROP FUNCTION\". (Min Zhou and Namit Jain via zshao)
      Show
      HIVE-700 . Fix test error by adding \"DROP FUNCTION\". (Min Zhou and Namit Jain via zshao)

      Description

      Since we added "Show Functions" in HIVE-580, test results will depend on what temporary functions are added to the system.

      We should add the capability of "DROP FUNCTION", and do that at the end of those "create function" tests to make sure the "show functions" results are deterministic.

      1. HIVE-700.1.patch
        11 kB
        Min Zhou
      2. hive.700.2.patch
        16 kB
        Namit Jain

        Issue Links

          Activity

          Hide
          Min Zhou added a comment -

          usage:
          drop function function_name

          Show
          Min Zhou added a comment - usage: drop function function_name
          Hide
          Namit Jain added a comment -

          I dont think we should allow DROP FUNCTION - we should only support
          DROP TEMPORARY FUNCTION - this cannot drop the functions that were not added temporarily.
          If not already there, FunctionRegistry needs to be enhanced to store the fact whether a function is temporary or not.

          Also,

          1. Can you add a negative test which tries to drop a permanent function and fails.
          2. Can you change the existing tests with a 'create temporary function' to have a 'drop temporary function' at the end ?

          Show
          Namit Jain added a comment - I dont think we should allow DROP FUNCTION - we should only support DROP TEMPORARY FUNCTION - this cannot drop the functions that were not added temporarily. If not already there, FunctionRegistry needs to be enhanced to store the fact whether a function is temporary or not. Also, 1. Can you add a negative test which tries to drop a permanent function and fails. 2. Can you change the existing tests with a 'create temporary function' to have a 'drop temporary function' at the end ?
          Hide
          Namit Jain added a comment -

          Since this is blocking many merges, I will commit it and file some follow-up jiras

          Show
          Namit Jain added a comment - Since this is blocking many merges, I will commit it and file some follow-up jiras
          Hide
          Namit Jain added a comment -

          The patch fixed 2.

          For 1. a new JIRA https://issues.apache.org/jira/browse/HIVE-700 has been filed

          Show
          Namit Jain added a comment - The patch fixed 2. For 1. a new JIRA https://issues.apache.org/jira/browse/HIVE-700 has been filed
          Hide
          Raghotham Murthy added a comment -

          The Jira for 1. is HIVE-702. The patch looks good. Will commit if tests pass.

          Show
          Raghotham Murthy added a comment - The Jira for 1. is HIVE-702 . The patch looks good. Will commit if tests pass.
          Hide
          Zheng Shao added a comment -

          Committed. Thanks Min and Namit.
          Raghu, I took the liberty to commit it first since it's blocking other issues.

          Show
          Zheng Shao added a comment - Committed. Thanks Min and Namit. Raghu, I took the liberty to commit it first since it's blocking other issues.
          Hide
          Min Zhou added a comment -

          Sorry for my late. we have a training today, I will update a new patch for hive-700 related jiras.

          Show
          Min Zhou added a comment - Sorry for my late. we have a training today, I will update a new patch for hive-700 related jiras.

            People

            • Assignee:
              Min Zhou
              Reporter:
              Zheng Shao
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development