Soumyakanti Das created CALCITE-6448:
----------------------------------------
Summary: 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
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)