mirror of
https://github.com/apache/impala.git
synced 2026-01-04 09:00:56 -05:00
Change-Id: Ic5f52c127750cc9c847a3e34d3fdcfc78bee5a8a Reviewed-on: http://gerrit.ent.cloudera.com:8080/454 Tested-by: jenkins Reviewed-by: Alex Behm <alex.behm@cloudera.com>
120 lines
2.2 KiB
Plaintext
120 lines
2.2 KiB
Plaintext
====
|
|
---- QUERY
|
|
create database if not exists function_ddl_test
|
|
====
|
|
# Drop the dummy udfs this test uses.
|
|
---- QUERY
|
|
drop function if exists function_ddl_test.fn()
|
|
====
|
|
---- QUERY
|
|
drop function if exists function_ddl_test.fn(int)
|
|
====
|
|
---- QUERY
|
|
drop function if exists function_ddl_test.fn(int, string)
|
|
====
|
|
---- QUERY
|
|
drop function if exists function_ddl_test.fn(string, int)
|
|
====
|
|
---- QUERY
|
|
drop function if exists function_ddl_test.fn2(int)
|
|
====
|
|
---- QUERY
|
|
drop function if exists function_ddl_test.fn2(int, string)
|
|
====
|
|
---- QUERY
|
|
# Verify all the test functions are removed
|
|
show functions in function_ddl_test
|
|
---- RESULTS
|
|
---- TYPES
|
|
STRING
|
|
====
|
|
---- QUERY
|
|
# Add them and test function overloading.
|
|
create function function_ddl_test.fn() RETURNS int LOCATION '/test.so' 'foo.class'
|
|
====
|
|
---- QUERY
|
|
create function function_ddl_test.fn(int) RETURNS double LOCATION '/test.so' 'foo.class'
|
|
====
|
|
---- QUERY
|
|
create function function_ddl_test.fn(int, string)
|
|
RETURNS int LOCATION '/test.jar' 'foo.class'
|
|
====
|
|
---- QUERY
|
|
create function function_ddl_test.fn(string, int)
|
|
RETURNS int LOCATION '/test.ll' 'foo.class'
|
|
====
|
|
---- QUERY
|
|
create function function_ddl_test.fn2(int) RETURNS int LOCATION '/test.so' 'foo.class'
|
|
====
|
|
---- QUERY
|
|
create function function_ddl_test.fn2(int, string)
|
|
RETURNS int LOCATION '/test.so' 'foo.class'
|
|
====
|
|
---- QUERY
|
|
show functions in function_ddl_test
|
|
---- RESULTS
|
|
'fn()'
|
|
'fn(INT)'
|
|
'fn(INT, STRING)'
|
|
'fn(STRING, INT)'
|
|
'fn2(INT)'
|
|
'fn2(INT, STRING)'
|
|
---- TYPES
|
|
STRING
|
|
====
|
|
---- QUERY
|
|
drop function function_ddl_test.fn2(int, string)
|
|
====
|
|
---- QUERY
|
|
show functions in function_ddl_test
|
|
---- RESULTS
|
|
'fn()'
|
|
'fn(INT)'
|
|
'fn(INT, STRING)'
|
|
'fn(STRING, INT)'
|
|
'fn2(INT)'
|
|
---- TYPES
|
|
STRING
|
|
====
|
|
---- QUERY
|
|
drop function if exists function_ddl_test.fn2(int, string)
|
|
====
|
|
---- QUERY
|
|
show functions in function_ddl_test
|
|
---- RESULTS
|
|
'fn()'
|
|
'fn(INT)'
|
|
'fn(INT, STRING)'
|
|
'fn(STRING, INT)'
|
|
'fn2(INT)'
|
|
---- TYPES
|
|
STRING
|
|
====
|
|
---- QUERY
|
|
use function_ddl_test
|
|
====
|
|
---- QUERY
|
|
show functions;
|
|
---- RESULTS
|
|
'fn()'
|
|
'fn(INT)'
|
|
'fn(INT, STRING)'
|
|
'fn(STRING, INT)'
|
|
'fn2(INT)'
|
|
---- TYPES
|
|
STRING
|
|
====
|
|
---- QUERY
|
|
drop function fn()
|
|
====
|
|
---- QUERY
|
|
show functions;
|
|
---- RESULTS
|
|
'fn(INT)'
|
|
'fn(INT, STRING)'
|
|
'fn(STRING, INT)'
|
|
'fn2(INT)'
|
|
---- TYPES
|
|
STRING
|
|
====
|