You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@impala.apache.org by "Steve Carlin (Code Review)" <ge...@cloudera.org> on 2021/10/31 19:48:25 UTC
[Impala-ASF-CR] IMPALA-10997: Refactor Java Hive UDF code.
Steve Carlin has uploaded this change for review. ( http://gerrit.cloudera.org:8080/17986
Change subject: IMPALA-10997: Refactor Java Hive UDF code.
......................................................................
IMPALA-10997: Refactor Java Hive UDF code.
In its current form, Impala supports Java UDFs that are derived from
the UDF.class.
The UDF.class is legacy code and Hive now supports implementation off
of the GenericUDF.class.
There are now three classes supporting Hive UDFs:
UdfExecutor: The entry point class which is directly accessed by the
backend. This is a wrapper class to the UDF class that will handle
the evaluation of rows.
HiveUdfExecutor: Abstract base class that contains code that is common to
the legacy UDF.class and the GenericUDF.class when it is eventually created.
HiveUdfExecutorLegacy: Implementation of the code that is UDF.class specific.
Change-Id: Ic1b981aed3021aef08c87e7cdbf7c6af95906754
---
M fe/src/main/java/org/apache/impala/analysis/CreateUdfStmt.java
M fe/src/main/java/org/apache/impala/catalog/ScalarFunction.java
A fe/src/main/java/org/apache/impala/hive/executor/HiveUdfExecutor.java
A fe/src/main/java/org/apache/impala/hive/executor/HiveUdfExecutorLegacy.java
M fe/src/main/java/org/apache/impala/hive/executor/UdfExecutor.java
M fe/src/main/java/org/apache/impala/util/FunctionUtils.java
6 files changed, 783 insertions(+), 549 deletions(-)
git pull ssh://gerrit.cloudera.org:29418/Impala-ASF refs/changes/86/17986/1
--
To view, visit http://gerrit.cloudera.org:8080/17986
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ic1b981aed3021aef08c87e7cdbf7c6af95906754
Gerrit-Change-Number: 17986
Gerrit-PatchSet: 1
Gerrit-Owner: Steve Carlin <sc...@cloudera.com>
[Impala-ASF-CR] IMPALA-10997: Refactor Java Hive UDF code.
Posted by "Impala Public Jenkins (Code Review)" <ge...@cloudera.org>.
Impala Public Jenkins has posted comments on this change. ( http://gerrit.cloudera.org:8080/17986 )
Change subject: IMPALA-10997: Refactor Java Hive UDF code.
......................................................................
Patch Set 1:
(4 comments)
http://gerrit.cloudera.org:8080/#/c/17986/1/fe/src/main/java/org/apache/impala/hive/executor/HiveUdfExecutor.java
File fe/src/main/java/org/apache/impala/hive/executor/HiveUdfExecutor.java:
http://gerrit.cloudera.org:8080/#/c/17986/1/fe/src/main/java/org/apache/impala/hive/executor/HiveUdfExecutor.java@483
PS1, Line 483: abstract protected void evaluateDerived(Object... inputArgs) throws ImpalaRuntimeException;
line too long (93 > 90)
http://gerrit.cloudera.org:8080/#/c/17986/1/fe/src/main/java/org/apache/impala/hive/executor/HiveUdfExecutorLegacy.java
File fe/src/main/java/org/apache/impala/hive/executor/HiveUdfExecutorLegacy.java:
http://gerrit.cloudera.org:8080/#/c/17986/1/fe/src/main/java/org/apache/impala/hive/executor/HiveUdfExecutorLegacy.java@121
PS1, Line 121: if (javaArgTypes_[i].getPrimitiveType() != parameterTypes[i].getPrimitiveType().toThrift()) {
line too long (101 > 90)
http://gerrit.cloudera.org:8080/#/c/17986/1/fe/src/main/java/org/apache/impala/hive/executor/UdfExecutor.java
File fe/src/main/java/org/apache/impala/hive/executor/UdfExecutor.java:
http://gerrit.cloudera.org:8080/#/c/17986/1/fe/src/main/java/org/apache/impala/hive/executor/UdfExecutor.java@82
PS1, Line 82: LOG.debug("Loaded UDF '" + request.fn.scalar_fn.symbol+ "' from " + request.local_location);
line too long (98 > 90)
http://gerrit.cloudera.org:8080/#/c/17986/1/fe/src/main/java/org/apache/impala/hive/executor/UdfExecutor.java@150
PS1, Line 150: throw new ImpalaRuntimeException("The class " + className + " does not derive from a "
line too long (94 > 90)
--
To view, visit http://gerrit.cloudera.org:8080/17986
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ic1b981aed3021aef08c87e7cdbf7c6af95906754
Gerrit-Change-Number: 17986
Gerrit-PatchSet: 1
Gerrit-Owner: Steve Carlin <sc...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Comment-Date: Sun, 31 Oct 2021 19:49:18 +0000
Gerrit-HasComments: Yes
[Impala-ASF-CR] IMPALA-10997: Refactor Java Hive UDF code.
Posted by "Steve Carlin (Code Review)" <ge...@cloudera.org>.
Steve Carlin has posted comments on this change. ( http://gerrit.cloudera.org:8080/17986 )
Change subject: IMPALA-10997: Refactor Java Hive UDF code.
......................................................................
Patch Set 1:
(2 comments)
http://gerrit.cloudera.org:8080/#/c/17986/1//COMMIT_MSG
Commit Message:
http://gerrit.cloudera.org:8080/#/c/17986/1//COMMIT_MSG@19
PS1, Line 19: HiveUdfExecutor: Abstract base class that contains code that is common to
: the legacy UDF.class and the GenericUDF.class when it is eventually created.
: HiveUdfExecutorLegacy: Implementation of the code that is UDF.class specific.
> nit: each line should have 72 or fewer characters if possible.
Done
http://gerrit.cloudera.org:8080/#/c/17986/1/fe/src/main/java/org/apache/impala/hive/executor/UdfExecutor.java
File fe/src/main/java/org/apache/impala/hive/executor/UdfExecutor.java:
http://gerrit.cloudera.org:8080/#/c/17986/1/fe/src/main/java/org/apache/impala/hive/executor/UdfExecutor.java@105
PS1, Line 105: classLoaderClosed_ = true;
> Why not use classLoader_ = null?
Done
--
To view, visit http://gerrit.cloudera.org:8080/17986
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ic1b981aed3021aef08c87e7cdbf7c6af95906754
Gerrit-Change-Number: 17986
Gerrit-PatchSet: 1
Gerrit-Owner: Steve Carlin <sc...@cloudera.com>
Gerrit-Reviewer: Fucun Chu <ch...@hotmail.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Steve Carlin <sc...@cloudera.com>
Gerrit-Comment-Date: Mon, 01 Nov 2021 13:39:36 +0000
Gerrit-HasComments: Yes
[Impala-ASF-CR] IMPALA-10997: Refactor Java Hive UDF code.
Posted by "Impala Public Jenkins (Code Review)" <ge...@cloudera.org>.
Impala Public Jenkins has posted comments on this change. ( http://gerrit.cloudera.org:8080/17986 )
Change subject: IMPALA-10997: Refactor Java Hive UDF code.
......................................................................
Patch Set 1:
Build Successful
https://jenkins.impala.io/job/gerrit-code-review-checks/9699/ : Initial code review checks passed. Use gerrit-verify-dryrun-external or gerrit-verify-dryrun to run full precommit tests.
--
To view, visit http://gerrit.cloudera.org:8080/17986
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ic1b981aed3021aef08c87e7cdbf7c6af95906754
Gerrit-Change-Number: 17986
Gerrit-PatchSet: 1
Gerrit-Owner: Steve Carlin <sc...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Comment-Date: Sun, 31 Oct 2021 20:10:55 +0000
Gerrit-HasComments: No
[Impala-ASF-CR] IMPALA-10997: Refactor Java Hive UDF code.
Posted by "Fucun Chu (Code Review)" <ge...@cloudera.org>.
Fucun Chu has posted comments on this change. ( http://gerrit.cloudera.org:8080/17986 )
Change subject: IMPALA-10997: Refactor Java Hive UDF code.
......................................................................
Patch Set 1:
(2 comments)
This looks good, I only had some minor comments.
http://gerrit.cloudera.org:8080/#/c/17986/1//COMMIT_MSG
Commit Message:
http://gerrit.cloudera.org:8080/#/c/17986/1//COMMIT_MSG@19
PS1, Line 19: HiveUdfExecutor: Abstract base class that contains code that is common to
: the legacy UDF.class and the GenericUDF.class when it is eventually created.
: HiveUdfExecutorLegacy: Implementation of the code that is UDF.class specific.
nit: each line should have 72 or fewer characters if possible.
http://gerrit.cloudera.org:8080/#/c/17986/1/fe/src/main/java/org/apache/impala/hive/executor/UdfExecutor.java
File fe/src/main/java/org/apache/impala/hive/executor/UdfExecutor.java:
http://gerrit.cloudera.org:8080/#/c/17986/1/fe/src/main/java/org/apache/impala/hive/executor/UdfExecutor.java@105
PS1, Line 105: classLoaderClosed_ = true;
Why not use classLoader_ = null?
--
To view, visit http://gerrit.cloudera.org:8080/17986
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ic1b981aed3021aef08c87e7cdbf7c6af95906754
Gerrit-Change-Number: 17986
Gerrit-PatchSet: 1
Gerrit-Owner: Steve Carlin <sc...@cloudera.com>
Gerrit-Reviewer: Fucun Chu <ch...@hotmail.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Comment-Date: Mon, 01 Nov 2021 08:21:15 +0000
Gerrit-HasComments: Yes
[Impala-ASF-CR] IMPALA-10997: Refactor Java Hive UDF code.
Posted by "Steve Carlin (Code Review)" <ge...@cloudera.org>.
Steve Carlin has abandoned this change. ( http://gerrit.cloudera.org:8080/17986 )
Change subject: IMPALA-10997: Refactor Java Hive UDF code.
......................................................................
Abandoned
Superseded by another patch with more changes
--
To view, visit http://gerrit.cloudera.org:8080/17986
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: abandon
Gerrit-Change-Id: Ic1b981aed3021aef08c87e7cdbf7c6af95906754
Gerrit-Change-Number: 17986
Gerrit-PatchSet: 4
Gerrit-Owner: Steve Carlin <sc...@cloudera.com>
Gerrit-Reviewer: Fucun Chu <ch...@hotmail.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Steve Carlin <sc...@cloudera.com>