Impala Public Jenkins has submitted this change and it was merged. ( http://gerrit.cloudera.org:8080/19304 )
Change subject: IMPALA-11549: Support Hive GenericUdfs that return primitive java types ...................................................................... IMPALA-11549: Support Hive GenericUdfs that return primitive java types Before this patch only the Writable* types were accepted in GenericUdfs as return types, while some GenericUdfs in the wild return primitive java types (e.g. Integer instead of IntWritable). For legacy Hive UDFs these return types were already handled, so the only change needed was to map the ObjectInspector subclasses (e.g. JavaIntObjectInspector) to the correct JavaUdfDataType in Impala. Testing: - Added a subclass for TestGenericUdf (TestGenericUdfWithJavaReturnTypes) that returns primitive java types (probably inheriting in the opposite direction would be more logical, but the diff is smaller this way). - Changed EE tests to also use TestGenericUdfWithJavaReturnTypes. - Changed FE tests (UdfExecutorTest) to check both TestGenericUdfWithJavaReturnTypes and TestGenericUdf. - Also added a test with BINARY type to UdfExecutorTest as this was forgotten during the original BINARY patch. Change-Id: I30679045d6693ebd35718b6f1a22aaa4963c1e63 Reviewed-on: http://gerrit.cloudera.org:8080/19304 Reviewed-by: Impala Public Jenkins <[email protected]> Tested-by: Impala Public Jenkins <[email protected]> --- M fe/src/main/java/org/apache/impala/hive/executor/HiveGenericJavaFunction.java M fe/src/main/java/org/apache/impala/hive/executor/HiveUdfExecutorGeneric.java M fe/src/main/java/org/apache/impala/hive/executor/JavaUdfDataType.java M fe/src/test/java/org/apache/impala/hive/executor/TestGenericUdf.java A fe/src/test/java/org/apache/impala/hive/executor/TestGenericUdfWithJavaReturnTypes.java M fe/src/test/java/org/apache/impala/hive/executor/UdfExecutorTest.java M java/test-hive-udfs/src/main/java/org/apache/impala/TestGenericUdf.java A java/test-hive-udfs/src/main/java/org/apache/impala/TestGenericUdfWithJavaReturnTypes.java M testdata/workloads/functional-query/queries/QueryTest/generic-java-udf.test M testdata/workloads/functional-query/queries/QueryTest/load-generic-java-udfs.test 10 files changed, 740 insertions(+), 208 deletions(-) Approvals: Impala Public Jenkins: Looks good to me, approved; Verified -- To view, visit http://gerrit.cloudera.org:8080/19304 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-Project: Impala-ASF Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: I30679045d6693ebd35718b6f1a22aaa4963c1e63 Gerrit-Change-Number: 19304 Gerrit-PatchSet: 11 Gerrit-Owner: Csaba Ringhofer <[email protected]> Gerrit-Reviewer: Csaba Ringhofer <[email protected]> Gerrit-Reviewer: Daniel Becker <[email protected]> Gerrit-Reviewer: Impala Public Jenkins <[email protected]> Gerrit-Reviewer: Steve Carlin <[email protected]>
