You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues-all@impala.apache.org by "ASF subversion and git services (Jira)" <ji...@apache.org> on 2023/06/20 17:02:00 UTC

[jira] [Commented] (IMPALA-12184) Java UDF increment on an empty string is inconsistent

    [ https://issues.apache.org/jira/browse/IMPALA-12184?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17735372#comment-17735372 ] 

ASF subversion and git services commented on IMPALA-12184:
----------------------------------------------------------

Commit 6b571eb7e4cd24c34331be43193416678e69b579 in impala's branch refs/heads/master from Peter Rozsa
[ https://gitbox.apache.org/repos/asf?p=impala.git;h=6b571eb7e ]

IMPALA-12184: Java UDF increment on an empty string is inconsistent

This change removes the Text-typed overload for BufferAlteringUDF to
avoid ambiguous function matchings. It also changes the 2-parameter
function in BufferAlteringUDF to cover Text typed arguments.

Tests:
 - test_udfs.py manually executed

Change-Id: I3a17240ce39fef41b0453f162ab5752f1c940f41
Reviewed-on: http://gerrit.cloudera.org:8080/20038
Reviewed-by: Michael Smith <mi...@cloudera.com>
Tested-by: Impala Public Jenkins <im...@cloudera.com>


> Java UDF increment on an empty string is inconsistent
> -----------------------------------------------------
>
>                 Key: IMPALA-12184
>                 URL: https://issues.apache.org/jira/browse/IMPALA-12184
>             Project: IMPALA
>          Issue Type: Bug
>    Affects Versions: Impala 4.3.0
>            Reporter: Michael Smith
>            Assignee: Peter Rozsa
>            Priority: Major
>             Fix For: Impala 4.3.0
>
>
> Java 8 and Java 11 seem to match different signatures forĀ {{{}select increment("");{}}}, and one is implemented to return null for empty string while the other ends up returning empty string.
> When passed a string, which signature of BufferAlteringUdf matches it appears to be arbitrary: in Java 8, Class.getMethods() returns the BytesWritable signature first (and the Thrift STRING type fits that signature) while in Java 11 it returns the Text signature first (which Thrift STRING type also matches).
> This causes failures in query_test.test_udfs.TestUdfExecution.test_java_udfs (e.g. https://jenkins.impala.io/job/ubuntu-20.04-from-scratch-java11/11/).



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-all-unsubscribe@impala.apache.org
For additional commands, e-mail: issues-all-help@impala.apache.org