You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@calcite.apache.org by "Jesus Camacho Rodriguez (JIRA)" <ji...@apache.org> on 2016/12/05 12:20:58 UTC
[jira] [Commented] (CALCITE-1526) Use Strong to infer whether a
predicate's inputs may be null
[ https://issues.apache.org/jira/browse/CALCITE-1526?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15722119#comment-15722119 ]
Jesus Camacho Rodriguez commented on CALCITE-1526:
--------------------------------------------------
{{RexUtil.ExprSimplifier}} traverses the expression and simplifies it, choosing whether to recognize UNKNOWN as FALSE depending on 1) the initial value for _ unknownAsFalseCall_, and 2) the expressions found in the traversal.
[~julianhyde], I think it could be extended to use Strong indeed, by checking whether a subexpression might produce UNKNOWN and choosing accordingly the simplify method to call in RexUtil. However, I am still doubting whether that would help to detect further simplification opportunities, or it would just help simplifying/unifying the different code paths.
> Use Strong to infer whether a predicate's inputs may be null
> ------------------------------------------------------------
>
> Key: CALCITE-1526
> URL: https://issues.apache.org/jira/browse/CALCITE-1526
> Project: Calcite
> Issue Type: Bug
> Reporter: Julian Hyde
> Assignee: Julian Hyde
>
> {{RexImplicationChecker}} must use [Strong|https://calcite.apache.org/apidocs/org/apache/calcite/plan/Strong.html] to infer whether a predicate's inputs may be null. In particular the code in {{RexImplicationChecker.implies2}}.
> Also {{RelMdPredicates.projectPredicate}}.
> [~jcamachorodriguez], Could/should {{RexUtil.ExprSimplifier}} be using {{Strong}}?
> Also, maybe, {{RexUtil.simplifyIs}}.
> Also, {{LogicVisitor}} might be able to deduce that an expression is never null if certain input fields are not null.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)