Uploaded image for project: 'IMPALA'
  1. IMPALA
  2. IMPALA-6724

Allow creating/dropping functions with the same name as built-ins

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: Impala 2.8.0, Impala 2.9.0, Impala 2.10.0, Impala 2.11.0
    • Fix Version/s: Impala 3.0
    • Component/s: Frontend
    • Labels:
      None
    • Epic Color:
      ghx-label-5

      Description

      [localhost:21000] > create function foo.sin() returns int location '/test-warehouse/libTestUdfs.so' symbol='NoArgs';
      Query: create function foo.sin() returns int location '/test-warehouse/libTestUdfs.so' symbol='NoArgs'
      Fetched 0 row(s) in 0.02s
      

      To match the behavior above, the statement below should be allowed.

      [localhost:21000] > use foo; Query: use foo [localhost:21000] > create function sin() returns int location '/test-warehouse/libTestUdfs.so' symbol='NoArgs'; Query: create function sin() returns int location '/test-warehouse/libTestUdfs.so' symbol='NoArgs' ERROR: AnalysisException: Function cannot have the same name as a builtin: sin
      

      The statement below should trigger an AuthorizationException("Can not modify system database.")

      [localhost:21000] > create function _impala_builtins.sin() returns int location '/test-warehouse/libTestUdfs.so' symbol='NoArgs';
      Query: create function _impala_builtins.sin() returns int location '/test-warehouse/libTestUdfs.so' symbol='NoArgs'
      ERROR: AnalysisException: Function cannot have the same name as a builtin: sin
      

        Attachments

          Activity

            People

            • Assignee:
              fredyw Fredy Wijaya
              Reporter:
              fredyw Fredy Wijaya
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: