Csaba Ringhofer has posted comments on this change. ( 
http://gerrit.cloudera.org:8080/19304 )

Change subject: IMPALA-11549: Support Hive GenericUdfs that return primitive 
java types
......................................................................


Patch Set 6:

(8 comments)

http://gerrit.cloudera.org:8080/#/c/19304/4//COMMIT_MSG
Commit Message:

http://gerrit.cloudera.org:8080/#/c/19304/4//COMMIT_MSG@18
PS4, Line 18: probably inheriting in the opposite
            :   direction would be more logical
> We could also have an abstract base class and a concrete class for both kin
I would prefer to keep is this way in this patch so that the changes in the 
actual logic behind the udf is more visible.

https://gerrit.cloudera.org/#/c/19177/ also modifies these classes, I can do 
this refactor after merging this and rebasing that patch.


http://gerrit.cloudera.org:8080/#/c/19304/4/fe/src/main/java/org/apache/impala/hive/executor/JavaUdfDataType.java
File fe/src/main/java/org/apache/impala/hive/executor/JavaUdfDataType.java:

http://gerrit.cloudera.org:8080/#/c/19304/4/fe/src/main/java/org/apache/impala/hive/executor/JavaUdfDataType.java@116
PS4, Line 116:
> We could insert a precondition check for that.
Done


http://gerrit.cloudera.org:8080/#/c/19304/4/fe/src/test/java/org/apache/impala/hive/executor/UdfExecutorTest.java
File fe/src/test/java/org/apache/impala/hive/executor/UdfExecutorTest.java:

http://gerrit.cloudera.org:8080/#/c/19304/4/fe/src/test/java/org/apache/impala/hive/executor/UdfExecutorTest.java@441
PS4, Line 441:     TestHiveUdf(UDFSign.class, createDouble(1), createDouble(3));
> We only have one Bytes test now, is it intentional?
There are not many builtin functions in Hive that use BINARY. Added a tests for 
UDFBase64 and UDFUnbase64


http://gerrit.cloudera.org:8080/#/c/19304/4/fe/src/test/java/org/apache/impala/hive/executor/UdfExecutorTest.java@514
PS4, Line 514:     TestGenericUdf(createFloat(1.1f + 1.2f + 1.3f),
> Can we also test a function with more than one BINARY arguments?
Done


http://gerrit.cloudera.org:8080/#/c/19304/4/java/test-hive-udfs/src/main/java/org/apache/impala/TestGenericUdf.java
File java/test-hive-udfs/src/main/java/org/apache/impala/TestGenericUdf.java:

http://gerrit.cloudera.org:8080/#/c/19304/4/java/test-hive-udfs/src/main/java/org/apache/impala/TestGenericUdf.java@56
PS4, Line 56: it re
> Now we return the last (see L322).
Rewrote the function to concatenate the arrays.


http://gerrit.cloudera.org:8080/#/c/19304/4/java/test-hive-udfs/src/main/java/org/apache/impala/TestGenericUdf.java@57
PS4, Line 57:  *
> Not new in this patch, but we could also mention that if any argument is nu
Oops, forgot this, will do in next patch.


http://gerrit.cloudera.org:8080/#/c/19304/4/java/test-hive-udfs/src/main/java/org/apache/impala/TestGenericUdf.java@389
PS4, Line 389:     BytesWritable resultBinary = new BytesWritable();
> Before this change we returned a BytesWritable without setting it, not 'nul
In the original commit evaluateBinary returned null IMO, see
      if (input == null) {
        return null;
      }
The result == null handling was needed for the 0 argument case.


http://gerrit.cloudera.org:8080/#/c/19304/4/testdata/workloads/functional-query/queries/QueryTest/generic-java-udf.test
File 
testdata/workloads/functional-query/queries/QueryTest/generic-java-udf.test:

http://gerrit.cloudera.org:8080/#/c/19304/4/testdata/workloads/functional-query/queries/QueryTest/generic-java-udf.test@24
PS4, Line 24: #Test GenericUDF functions
> We could also check some of the multi-argument functions with Java Object r
I am not sure if this useful in this case, as the change is about the return 
types and does not change argument type handling.



--
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: comment
Gerrit-Change-Id: I30679045d6693ebd35718b6f1a22aaa4963c1e63
Gerrit-Change-Number: 19304
Gerrit-PatchSet: 6
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-Comment-Date: Tue, 06 Dec 2022 14:40:05 +0000
Gerrit-HasComments: Yes

Reply via email to