Tim Armstrong has posted comments on this change. Change subject: IMPALA-4266: Java udf returning string can give incorrect results ......................................................................
Patch Set 1: (3 comments) http://gerrit.cloudera.org:8080/#/c/4941/1/be/src/exprs/hive-udf-call.cc File be/src/exprs/hive-udf-call.cc: Line 334: FunctionContext* fn_ctx = ctx->fn_context(fn_context_index_); > Just wondering whether you've considered the following alternative: Take th I'd rather avoid that because Java has to make those allocations via sun.misc.Unsafe, which I think calls malloc() (although the docs don't say). Normally UDF allocations come from a FreePool. We'd need a separate list of pointers that came from malloc() instead of the FreePool, which further complicates the local allocation mechanism, which is confusing anyway. I suspect that the FreePool alloc + copy is probably comparable in cost to the malloc anyway. http://gerrit.cloudera.org:8080/#/c/4941/1/testdata/workloads/functional-query/queries/QueryTest/java-udf.test File testdata/workloads/functional-query/queries/QueryTest/java-udf.test: Line 299: ====w > extraneous w? Done http://gerrit.cloudera.org:8080/#/c/4941/1/tests/test-hive-udfs/src/main/java/org/apache/impala/ReplaceStringUdf.java File tests/test-hive-udfs/src/main/java/org/apache/impala/ReplaceStringUdf.java: Line 3: import org.apache.hadoop.hive.ql.exec.UDF; > nit: order of imports Done -- To view, visit http://gerrit.cloudera.org:8080/4941 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-MessageType: comment Gerrit-Change-Id: I705d271814cb1143f67d8a12f4fd87bab7a8e161 Gerrit-PatchSet: 1 Gerrit-Project: Impala-ASF Gerrit-Branch: master Gerrit-Owner: Tim Armstrong <tarmstr...@cloudera.com> Gerrit-Reviewer: Alex Behm <alex.b...@cloudera.com> Gerrit-Reviewer: Bharath Vissapragada <bhara...@cloudera.com> Gerrit-Reviewer: Tim Armstrong <tarmstr...@cloudera.com> Gerrit-HasComments: Yes