Peter Rozsa has uploaded a new patch set (#12). ( 
http://gerrit.cloudera.org:8080/19507 )

Change subject: IMPALA-11854: ImpalaStringWritable's underlying array can't be 
changed in UDFs
......................................................................

IMPALA-11854: ImpalaStringWritable's underlying array can't be changed in UDFs

This change fixes the behavior of BytesWritable and TextWritable's
getBytes() method. Now the returned byte array could be handled as
the underlying buffer as it gets loaded before the UDF's evaluation,
and tracks the changes as a regular Java byte array; the resizing
operation still resets the reference. The operations that wrote back
to the native heap were also removed from ImpalaStringWritable
as these operations are now handled in the byte array.

Tests:
 - Test UDFs added as CachedWritablesUdf and Generic CachedWritableUdf
 - E2E test ran for UDFs

Change-Id: Ifb28bd0dce7b0482c7abe1f61f245691fcbfe212
---
M 
fe/src/compat-hive-3/java/org/apache/impala/compat/HiveEsriGeospatialBuiltins.java
M fe/src/main/java/org/apache/impala/hive/executor/HiveUdfExecutorGeneric.java
M fe/src/main/java/org/apache/impala/hive/executor/HiveUdfExecutorLegacy.java
M fe/src/main/java/org/apache/impala/hive/executor/ImpalaBytesWritable.java
M fe/src/main/java/org/apache/impala/hive/executor/ImpalaStringWritable.java
M fe/src/main/java/org/apache/impala/hive/executor/ImpalaTextWritable.java
A fe/src/main/java/org/apache/impala/hive/executor/Resettable.java
M fe/src/test/java/org/apache/impala/hive/executor/UdfExecutorTest.java
A java/test-hive-udfs/src/main/java/org/apache/impala/CachedWritablesUdf.java
A 
java/test-hive-udfs/src/main/java/org/apache/impala/GenericCachedWritablesUdf.java
M testdata/workloads/functional-query/queries/QueryTest/generic-java-udf.test
M testdata/workloads/functional-query/queries/QueryTest/java-udf.test
M 
testdata/workloads/functional-query/queries/QueryTest/load-generic-java-udfs.test
M testdata/workloads/functional-query/queries/QueryTest/load-java-udfs.test
14 files changed, 407 insertions(+), 146 deletions(-)


  git pull ssh://gerrit.cloudera.org:29418/Impala-ASF refs/changes/07/19507/12
--
To view, visit http://gerrit.cloudera.org:8080/19507
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: Ifb28bd0dce7b0482c7abe1f61f245691fcbfe212
Gerrit-Change-Number: 19507
Gerrit-PatchSet: 12
Gerrit-Owner: Peter Rozsa <[email protected]>
Gerrit-Reviewer: Csaba Ringhofer <[email protected]>
Gerrit-Reviewer: Daniel Becker <[email protected]>
Gerrit-Reviewer: Impala Public Jenkins <[email protected]>
Gerrit-Reviewer: Peter Rozsa <[email protected]>

Reply via email to