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

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

Commit e5afebc0c1ed23bc3a040f70a2168120c052f8bd in impala's branch 
refs/heads/master from Michael Smith
[ https://gitbox.apache.org/repos/asf?p=impala.git;h=e5afebc0c ]

IMPALA-14450: (Addendum) Fix other numeric comparison

Fixes

    set-impala-java-tool-options.sh: line 25: ((: 1.8: syntax error:
    invalid arithmetic operator (error token is ".8")

Double parentheses - ((...)) - only support integer arithmetic. I can't
find any standard way to do decimal comparison in shells, so switch to
extract Java major version as an integer and compare that.

OpenJDK 8 has always considered "-target 1.8" and "-target 8" equivalent
https://github.com/openjdk/jdk/blob/jdk8-b01/langtools/src/share/classes/com/sun/tools/javac/jvm/Target.java#L105
so maven target can be set to 8 when IMPALA_JAVA_TARGET is 8.

Change-Id: I15cdd1859be51d3708f1c348e898831df2a92b13
Reviewed-on: http://gerrit.cloudera.org:8080/23452
Reviewed-by: Riza Suminto <[email protected]>
Tested-by: Impala Public Jenkins <[email protected]>


> Cannot manually set both JAVA_HOME and IMPALA_JAVA_TARGET
> ---------------------------------------------------------
>
>                 Key: IMPALA-14450
>                 URL: https://issues.apache.org/jira/browse/IMPALA-14450
>             Project: IMPALA
>          Issue Type: Task
>          Components: Frontend
>    Affects Versions: Impala 5.0.0
>            Reporter: Michael Smith
>            Assignee: Michael Smith
>            Priority: Major
>             Fix For: Impala 5.0.0
>
>
> As we work to support Java 17, a problem that's come up is that when you set 
> {{IMPALA_JAVA_HOME_OVERRIDE}} to specify your own {{JAVA_HOME}}, it overrides 
> {{IMPALA_JDK_VERSION}}. If you happen to source bin/impala-config.sh in the 
> same shell, then {{IMPALA_JAVA_TARGET=override}} and compilation fails.
> In more specific environments with subshells, this isn't necessarily a 
> problem until you try to provide {{IMPALA_JDK_VERSION}} as an environment 
> variable. By declaring the environment variable, the update 
> {{IMPALA_JDK_VERSION=override}} escapes the subshell and breaks subsequent 
> build steps.



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

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to