In ReduceExpressionRule.java

L396-397:

final ImmutableMap<RexNode, RexLiteral> constants =

        predicateConstants(predicates);

Basically, my query is "select * from src where (key='12' and key is
null);" Here 'key' is a string type and it is one of the columns of 'src'
table.

Then I have predicates [=($0, '12'), isnull($0)], which is the input of the
predicateConstants, and the function will return me "{$0='12'}"

May I ask why it is designed in this way to extract only the predicate that
contains equal to a literal? It appears to me that none of the rows will
satisfy the predicate and extracting only the predicate that contains equal
to a literal is not useful and it merely adds more processing overhead.


Thanks.

Best

Pengcheng Xiong

Reply via email to