You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hive.apache.org by "Alessandro Solimando (Jira)" <ji...@apache.org> on 2022/11/13 17:44:00 UTC
[jira] [Created] (HIVE-26733) HiveRelMdPredicates::getPredicate(Project) should return IS_NULL for CAST(NULL)
Alessandro Solimando created HIVE-26733:
-------------------------------------------
Summary: HiveRelMdPredicates::getPredicate(Project) should return IS_NULL for CAST(NULL)
Key: HIVE-26733
URL: https://issues.apache.org/jira/browse/HIVE-26733
Project: Hive
Issue Type: Bug
Components: CBO
Affects Versions: 4.0.0-alpha-1
Reporter: Alessandro Solimando
Assignee: Alessandro Solimando
Given a _CAST(NULL as $type)_ as i-th project expression, the method returns _(=($i, CAST(null:NULL):$type)_ instead of _IS_NULL($i)_ as in the case of a _NULL_ literal project expression.
This is because _RexLiteral::isNullLiteral_ is used [here|https://github.com/apache/hive/blob/a6c0229f910972e84ba558e728532ffc245cc10d/ql/src/java/org/apache/hadoop/hive/ql/optimizer/calcite/stats/HiveRelMdPredicates.java#L153], while in similar places, it's often convenient to use {_}RexUtil::isNullLiteral(RexNode, boolean allowCast){_}.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)