Files
impala/testdata/workloads/functional-query/queries/QueryTest/functions-ddl.test
Nong Li a0bf45a0b4 Add udf type.
Change-Id: Ic5f52c127750cc9c847a3e34d3fdcfc78bee5a8a
Reviewed-on: http://gerrit.ent.cloudera.com:8080/454
Tested-by: jenkins
Reviewed-by: Alex Behm <alex.behm@cloudera.com>
2014-01-08 10:52:48 -08:00

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
====