[ https://issues.apache.org/jira/browse/HIVE-5046?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13735731#comment-13735731 ]
Hive QA commented on HIVE-5046: ------------------------------- {color:green}Overall{color}: +1 all checks pass Here are the results of testing the latest attachment: https://issues.apache.org/jira/secure/attachment/12597181/HIVE-5046.1.patch {color:green}SUCCESS:{color} +1 2774 tests passed Test results: https://builds.apache.org/job/PreCommit-HIVE-Build/373/testReport Console output: https://builds.apache.org/job/PreCommit-HIVE-Build/373/console Messages: {noformat} Executing org.apache.hive.ptest.execution.PrepPhase Executing org.apache.hive.ptest.execution.ExecutionPhase Executing org.apache.hive.ptest.execution.ReportingPhase {noformat} This message is automatically generated. > Hcatalog's bin/hcat script doesn't respect HIVE_HOME > ---------------------------------------------------- > > Key: HIVE-5046 > URL: https://issues.apache.org/jira/browse/HIVE-5046 > Project: Hive > Issue Type: Bug > Components: HCatalog > Affects Versions: 0.11.0 > Reporter: Mark Grover > Assignee: Mark Grover > Attachments: HIVE-5046.1.patch > > > https://github.com/apache/hive/blob/trunk/hcatalog/bin/hcat#L81 > The quoted snippet (see below) intends to set HIVE_HOME if it's not set (i.e. > HIVE_HOME is currently null). > {code} > if [ -n ${HIVE_HOME} ]; then > {code} > However, {{-n}} checks if the variable is _not_ null. So, the above code ends > up setting HIVE_HOME to the default value if it is actually set already, > overriding the set value. This condition needs to be negated. > Moreover, {{-n}} checks requires the string being tested to be enclosed in > quotes. > Reference: > http://tldp.org/LDP/abs/html/comparison-ops.html -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira