Balazs Hevele has uploaded this change for review. ( 
http://gerrit.cloudera.org:8080/23963


Change subject: WIP IMPALA-14575: Add constant handling for Hive GenericUDFs
......................................................................

WIP IMPALA-14575: Add constant handling for Hive GenericUDFs

If an argument is constant, it is now only evaluated and copied
to the input buffer once, in HiveUdfCall::OpenEvaluator.
This means, we save the re-evaluation and re-copying of the value
for each evaluation.
The constantness flags for arguments are also sent to the frontend,
where appropriate constant ObjectInspector's will be created for
them, so any constant optimization for the UDF on Hive's side will be
enabled.

TODO:
-remove allocateInputObjects in HiveUdfExecutor
  -use the one from InputHandler
-handle is_arg_const properly in HiveJavaFunctionFactoryImpl::create
-handle todo in HiveGenericJavaFunction.java::checkValidFunction
-handle todo in HiveGenericJavaFunction.java::getInspectors
  -can an argument be const + writable?
-handle THiveUdfExecutorCtorParams::is_constant_arg being null

Change-Id: I4a6ca8c0bab499dffed88bb9786753da559af4c5
---
M be/src/exprs/expr-value.h
M be/src/exprs/hive-udf-call.cc
M be/src/exprs/hive-udf-call.h
M common/thrift/Frontend.thrift
M fe/src/main/java/org/apache/impala/hive/executor/HiveGenericJavaFunction.java
M fe/src/main/java/org/apache/impala/hive/executor/HiveJavaFunctionFactory.java
M 
fe/src/main/java/org/apache/impala/hive/executor/HiveJavaFunctionFactoryImpl.java
M fe/src/main/java/org/apache/impala/hive/executor/HiveUdfExecutor.java
A fe/src/main/java/org/apache/impala/hive/executor/HiveUdfInputHandler.java
M fe/src/main/java/org/apache/impala/hive/executor/JavaUdfDataType.java
M fe/src/main/java/org/apache/impala/hive/executor/UdfExecutor.java
M fe/src/test/java/org/apache/impala/hive/executor/TestGenericUdf.java
M 
fe/src/test/java/org/apache/impala/hive/executor/TestHiveJavaFunctionFactory.java
M fe/src/test/java/org/apache/impala/hive/executor/UdfExecutorTest.java
A java/test-hive-udfs/src/main/java/org/apache/impala/GenericAlltypeArgUdf.java
M 
java/test-hive-udfs/src/main/java/org/apache/impala/GenericBufferAlteringUdf.java
M java/test-hive-udfs/src/main/java/org/apache/impala/TestGenericUdf.java
M testdata/workloads/functional-query/queries/QueryTest/generic-java-udf.test
M 
testdata/workloads/functional-query/queries/QueryTest/load-generic-java-udfs.test
19 files changed, 611 insertions(+), 149 deletions(-)



  git pull ssh://gerrit.cloudera.org:29418/Impala-ASF refs/changes/63/23963/1
--
To view, visit http://gerrit.cloudera.org:8080/23963
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I4a6ca8c0bab499dffed88bb9786753da559af4c5
Gerrit-Change-Number: 23963
Gerrit-PatchSet: 1
Gerrit-Owner: Balazs Hevele <[email protected]>

Reply via email to