Files
impala/testdata/workloads/functional-query/queries/QueryTest/load-hive-udfs.test
Nong Li 0d2919fe7f Refactor scalar and aggregate function analysis and execution.
This patch cleans up analysis and execution of scalar and aggregate functions
so that there is no difference between how builtins and user functions are
handled. The only difference is that the catalog is populated with the builtins
all the time.

The BE always gets a TFunction object and just executes it (builtins will have
an empty hdfs file location).

This removes the opcode registry and all of the functionality is subsumed by
the catalog, most of which was already duplicated there anyway.

This also introduces the concept of a system database; databases that the
user cannot modify and is populated automatically on startup.

Change-Id: Iaa3f84dad0a1a57691f5c7d8df7305faf01d70ed
Reviewed-on: http://gerrit.ent.cloudera.com:8080/1386
Reviewed-by: Nong Li <nong@cloudera.com>
Tested-by: jenkins
Reviewed-on: http://gerrit.ent.cloudera.com:8080/1577
2014-02-18 18:40:08 -08:00

83 lines
3.0 KiB
Plaintext

====
---- QUERY
drop function if exists udf_test.hive_pi();
drop function if exists udf_test.hive_round(double);
drop function if exists udf_test.hive_floor(double);
drop function if exists udf_test.hive_mod(int, int);
drop function if exists udf_test.hive_bin(bigint);
drop function if exists udf_test.hive_lower(string);
drop function if exists udf_test.hive_trim(string);
drop function if exists udf_test.identity(boolean);
drop function if exists udf_test.identity(tinyint);
drop function if exists udf_test.identity(smallint);
drop function if exists udf_test.identity(int);
drop function if exists udf_test.identity(bigint);
drop function if exists udf_test.identity(float);
drop function if exists udf_test.identity(double);
drop function if exists udf_test.identity(string);
drop function if exists udf_test.identity(timestamp);
create database if not exists udf_test;
create function udf_test.hive_pi() returns double
location '/test-warehouse/hive-exec.jar'
symbol='org.apache.hadoop.hive.ql.udf.UDFPI';
create function udf_test.hive_round(double) returns double
location '/test-warehouse/hive-exec.jar'
symbol='org.apache.hadoop.hive.ql.udf.UDFRound';
create function udf_test.hive_floor(double) returns bigint
location '/test-warehouse/hive-exec.jar'
symbol='org.apache.hadoop.hive.ql.udf.UDFFloor';
create function udf_test.hive_mod(int, int) returns int
location '/test-warehouse/hive-exec.jar'
symbol='org.apache.hadoop.hive.ql.udf.UDFPosMod';
create function udf_test.hive_bin(bigint) returns string
location '/test-warehouse/hive-exec.jar'
symbol='org.apache.hadoop.hive.ql.udf.UDFBin';
create function udf_test.hive_lower(string) returns string
location '/test-warehouse/hive-exec.jar'
symbol='org.apache.hadoop.hive.ql.udf.UDFLower';
create function udf_test.hive_trim(string) returns string
location '/test-warehouse/hive-exec.jar'
symbol='org.apache.hadoop.hive.ql.udf.UDFTrim';
create function udf_test.identity(boolean) returns boolean
location '/test-warehouse/impala-hive-udfs.jar'
symbol='com.cloudera.impala.TestUdf';
create function udf_test.identity(tinyint) returns tinyint
location '/test-warehouse/impala-hive-udfs.jar'
symbol='com.cloudera.impala.TestUdf';
create function udf_test.identity(smallint) returns smallint
location '/test-warehouse/impala-hive-udfs.jar'
symbol='com.cloudera.impala.TestUdf';
create function udf_test.identity(int) returns int
location '/test-warehouse/impala-hive-udfs.jar'
symbol='com.cloudera.impala.TestUdf';
create function udf_test.identity(bigint) returns bigint
location '/test-warehouse/impala-hive-udfs.jar'
symbol='com.cloudera.impala.TestUdf';
create function udf_test.identity(float) returns float
location '/test-warehouse/impala-hive-udfs.jar'
symbol='com.cloudera.impala.TestUdf';
create function udf_test.identity(double) returns double
location '/test-warehouse/impala-hive-udfs.jar'
symbol='com.cloudera.impala.TestUdf';
create function udf_test.identity(string) returns string
location '/test-warehouse/impala-hive-udfs.jar'
symbol='com.cloudera.impala.TestUdf';
====