Impala Public Jenkins has submitted this change and it was merged. ( 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 as these operations are now handled in the byte array. ImpalaStringWritable class is also removed, writables that used it before now store the data directly. Tests: - Test UDFs added as BufferAlteringUdf and GenericBufferAlteringUdf - E2E test ran for UDFs Change-Id: Ifb28bd0dce7b0482c7abe1f61f245691fcbfe212 Reviewed-on: http://gerrit.cloudera.org:8080/19507 Reviewed-by: Impala Public Jenkins <[email protected]> Tested-by: Impala Public Jenkins <[email protected]> --- M fe/src/compat-hive-3/java/org/apache/impala/compat/HiveEsriGeospatialBuiltins.java M fe/src/main/java/org/apache/impala/hive/executor/HiveUdfExecutor.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 D fe/src/main/java/org/apache/impala/hive/executor/ImpalaStringWritable.java M fe/src/main/java/org/apache/impala/hive/executor/ImpalaTextWritable.java M fe/src/main/java/org/apache/impala/hive/executor/JavaUdfDataType.java A fe/src/main/java/org/apache/impala/hive/executor/Reloadable.java M fe/src/test/java/org/apache/impala/hive/executor/UdfExecutorTest.java A java/test-hive-udfs/src/main/java/org/apache/impala/BufferAlteringUdf.java A java/test-hive-udfs/src/main/java/org/apache/impala/GenericBufferAlteringUdf.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 16 files changed, 546 insertions(+), 425 deletions(-) Approvals: Impala Public Jenkins: Looks good to me, approved; Verified -- 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: merged Gerrit-Change-Id: Ifb28bd0dce7b0482c7abe1f61f245691fcbfe212 Gerrit-Change-Number: 19507 Gerrit-PatchSet: 19 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]>
