You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hive.apache.org by "Alessandro Solimando (Jira)" <ji...@apache.org> on 2022/01/31 16:57:00 UTC
[jira] [Updated] (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 ]
Alessandro Solimando updated HIVE-25917:
----------------------------------------
Description:
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}
> 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
>
> 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)