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

Zhen Chen resolved CALCITE-6448.
--------------------------------
    Resolution: Duplicate

Fixed via CALCITE-7258

> FilterReduceExpressionsRule returns empty RelNode for RexLiterals
> -----------------------------------------------------------------
>
>                 Key: CALCITE-6448
>                 URL: https://issues.apache.org/jira/browse/CALCITE-6448
>             Project: Calcite
>          Issue Type: Bug
>          Components: core
>            Reporter: Soumyakanti Das
>            Assignee: Soumyakanti Das
>            Priority: Major
>              Labels: pull-request-available
>
> In Hive, for simple queries with {{WHERE 'foo'}} we get an empty result, 
> where as for simple queries with {{WHERE t.stringColumn}} we get non-empty 
> result.
> Currently in {{FilterReduceExpressionsRule}}, all {{RexLiteral}}s are 
> converted to empty values by 
> {code:java}
> else if (newConditionExp instanceof RexLiteral
>   || RexUtil.isNullLiteral(newConditionExp, true)) {
> call.transformTo(createEmptyRelOrEquivalent(call, filter));
> {code}
> This might be not inline with {{RexLiteral#isAlwaysFalse}}, and it might be 
> safer to leave the literal as it is.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to