Fredy Wijaya created IMPALA-6724:
------------------------------------

             Summary: Incorrect exception handling in creating a function
                 Key: IMPALA-6724
                 URL: https://issues.apache.org/jira/browse/IMPALA-6724
             Project: IMPALA
          Issue Type: Bug
          Components: Frontend
    Affects Versions: Impala 2.11.0
            Reporter: Fredy Wijaya


{noformat}
[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
{noformat}

To match the behavior above, the statement below should be allowed.
{noformat}
[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
{noformat}

The statement below should trigger an AuthorizationException("Can not modify 
system database.")
{noformat}
[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
{noformat}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to