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

Julian Hyde resolved CALCITE-1465.
----------------------------------
       Resolution: Fixed
    Fix Version/s: 1.11.0

Fixed in http://git-wip-us.apache.org/repos/asf/calcite/commit/0f36aec7.

> 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
>             Fix For: 1.11.0
>
>
> 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)

Reply via email to