You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@calcite.apache.org by "Julian Hyde (JIRA)" <ji...@apache.org> on 2016/10/23 21:38:58 UTC

[jira] [Created] (CALCITE-1465) Store constants as a derived field in RelOptPredicateList

Julian Hyde created CALCITE-1465:
------------------------------------

             Summary: Store constants as a derived field in RelOptPredicateList
                 Key: CALCITE-1465
                 URL: https://issues.apache.org/jira/browse/CALCITE-1465
             Project: Calcite
          Issue Type: Bug
            Reporter: Julian Hyde
            Assignee: Julian Hyde


I propose that we compute predicate constants when we create a {{RelOptPredicateList}}, and store them in an immutable field {{constantMap}}.

Currently, any rule that wishes to detect constants by aliasing (e.g. if we know {{x = 5}} and {{x = y}} then we can deduce {{y = 5}}) must start with a {{RelOptPredicateList}} (from the metadata supplier) and call the {{ReduceExpressionsRule.predicateConstants}} method. This method is called many times: in the current Calcite suite 1,201 instances of {{RelOptPredicateList}} are created and {{predicateConstants}} is called 82,670 times.

Pre-computing would use a little extra memory but reduce the method calls by ~68x.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)