You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hive.apache.org by "Ashutosh Chauhan (JIRA)" <ji...@apache.org> on 2014/12/04 01:53:13 UTC
[jira] [Commented] (HIVE-9015) Constant Folding optimizer doesn't
handle expressions involving null
[ https://issues.apache.org/jira/browse/HIVE-9015?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14233725#comment-14233725 ]
Ashutosh Chauhan commented on HIVE-9015:
----------------------------------------
{code}
hive> explain select (null +4) from t1;
TableScan
Select Operator
expressions: (null + 4) (type: double)
hive> explain select cast(null as double) from t1;
TableScan
Select Operator
expressions: UDFToDouble(null) (type: double)
{code}
In both of these examples, expression can be folded to null at compile time, but it isn't.
> Constant Folding optimizer doesn't handle expressions involving null
> --------------------------------------------------------------------
>
> Key: HIVE-9015
> URL: https://issues.apache.org/jira/browse/HIVE-9015
> Project: Hive
> Issue Type: Task
> Reporter: Ashutosh Chauhan
>
> Expressions which are guaranteed to evaluate to {{null}} aren't folded by optimizer yet.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)