[ 
https://issues.apache.org/jira/browse/CALCITE-2736?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17402457#comment-17402457
 ] 

Julian Hyde commented on CALCITE-2736:
--------------------------------------

The PR looks almost ready. A few comments:
 * Expand the javadoc for the test methods. Something like "Tests that a 
dynamic function (USER) is treated as a constant, and reduced, if \{link 
ReduceExpressionsRule.Conig#treatDynamicCallsAsConstant} is false. Test case 
for issue XXX."
 * Javadoc for treatDynamicCallsAsConstant should say what the default is, and 
give a brief example of the effect of the default.
 * In the test, I don't think you need a new tester. You just need a new 
executor, right? {{testReduceConstantsRequiresExecutor}} manages to set an 
executor. Maybe you could call {{sql.withTransform}}
 * The two test methods have quite a lot of common code. Can you figure out a 
way to refactor them so that the common code is common and the differences are 
apparent.
 * Thanks for grouping the tests with other constant-reduction tests. 

> ReduceExpressionsRule never reduces dynamic expressions but this should be 
> configurable
> ---------------------------------------------------------------------------------------
>
>                 Key: CALCITE-2736
>                 URL: https://issues.apache.org/jira/browse/CALCITE-2736
>             Project: Calcite
>          Issue Type: Improvement
>          Components: core
>            Reporter: Jacques Nadeau
>            Assignee: Jacques Nadeau
>            Priority: Major
>              Labels: pull-request-available
>          Time Spent: 1.5h
>  Remaining Estimate: 0h
>
> There are situations where it is helpful to reduce dynamic SqlCalls. Right 
> now, the ReduceExpressionsRule always avoids doing this. We should enhance 
> the rule so this can be configurable depending on where in planning the rule 
> is used.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to