You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hive.apache.org by "Stamatis Zampetakis (Jira)" <ji...@apache.org> on 2022/01/31 21:33:00 UTC

[jira] [Resolved] (HIVE-25917) Use default value for 'hive.default.nulls.last' when no config is available instead of false

     [ https://issues.apache.org/jira/browse/HIVE-25917?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Stamatis Zampetakis resolved HIVE-25917.
----------------------------------------
    Fix Version/s: 4.0.0
       Resolution: Fixed

Fixed in https://github.com/apache/hive/commit/e806c8e04de5ae9171d43d9d872fbe81a2006f96. Thanks for the PR [~asolimando]!

> Use default value for 'hive.default.nulls.last' when no config is available instead of false
> --------------------------------------------------------------------------------------------
>
>                 Key: HIVE-25917
>                 URL: https://issues.apache.org/jira/browse/HIVE-25917
>             Project: Hive
>          Issue Type: Bug
>          Components: Parser
>    Affects Versions: 4.0.0
>            Reporter: Alessandro Solimando
>            Assignee: Alessandro Solimando
>            Priority: Trivial
>              Labels: pull-request-available
>             Fix For: 4.0.0
>
>          Time Spent: 20m
>  Remaining Estimate: 0h
>
> In [HiveParser.g#L866|https://github.com/apache/hive/blob/b92763e8e193076815f4ed6ba299c873d770aec1/parser/src/java/org/apache/hadoop/hive/ql/parse/HiveParser.g#L866] we have the following code:
> {code:java}
> protected boolean nullsLast() {
>      if(hiveConf == null){
>       return false;
>      }
>      return HiveConf.getBoolVar(hiveConf, HiveConf.ConfVars.HIVE_DEFAULT_NULLS_LAST);
>    } {code}
> so when no hive config is available, we return "false", while we should return the property's default value:
> {code:java}
> protected boolean nullsLast() {
>      if(hiveConf == null){
>       return HiveConf.ConfVars.HIVE_DEFAULT_NULLS_LAST.defaultBoolVal;
>      }
>      return HiveConf.getBoolVar(hiveConf, HiveConf.ConfVars.HIVE_DEFAULT_NULLS_LAST);
>    } {code}
>  



--
This message was sent by Atlassian Jira
(v8.20.1#820001)