Skip to content

Commit

Permalink
Manually add GenericProject and IsTestMemberId to static registry to …
Browse files Browse the repository at this point in the history
…bypass dynamic inference (#75)
  • Loading branch information
rzhang10 authored Apr 23, 2021
1 parent 1de59a3 commit fe4127a
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -358,6 +358,8 @@ public RelDataType inferReturnType(SqlOperatorBinding opBinding) {
family(SqlTypeFamily.NUMERIC, SqlTypeFamily.STRING, SqlTypeFamily.STRING));
createAddUserDefinedFunction("com.linkedin.dali.udf.date.hive.EpochToEpochMilliseconds", BIGINT_NULLABLE, NUMERIC);
createAddUserDefinedFunction("com.linkedin.dali.udf.sanitize.hive.Sanitize", HiveReturnTypes.STRING, STRING);
createAddUserDefinedFunction("org.apache.hadoop.hive.ql.udf.generic.GenericProject", ARG0,
family(SqlTypeFamily.ANY, SqlTypeFamily.STRING));

// LIHADOOP-48502: The following UDFs are already defined using Transport UDF.
// The class name is the corresponding Hive UDF.
Expand Down Expand Up @@ -393,6 +395,8 @@ public RelDataType inferReturnType(SqlOperatorBinding opBinding) {
family(Collections.nCopies(2, SqlTypeFamily.STRING)));
createAddUserDefinedFunction("com.linkedin.stdudfs.parsing.hive.Ip2Str", HiveReturnTypes.STRING,
or(family(SqlTypeFamily.STRING, SqlTypeFamily.NUMERIC, SqlTypeFamily.NUMERIC), family(SqlTypeFamily.STRING)));
createAddUserDefinedFunction("com.linkedin.stdudfs.daliudfs.hive.IsTestMemberId", ReturnTypes.BOOLEAN,
family(SqlTypeFamily.NUMERIC, SqlTypeFamily.STRING));

// This is a Hive Custom UDF which is a simplified version of 'date-converter' package.
// This UDF is not converted to a transport UDF.
Expand Down

0 comments on commit fe4127a

Please sign in to comment.