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 2020/08/24 20:58:00 UTC

[jira] [Commented] (CALCITE-4183) FilterSetOpTransposeRule constructor should allow for user defined Filter and SetOp classes

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

Julian Hyde commented on CALCITE-4183:
--------------------------------------

Reviewing the PR.

I am not sure we need this. I am not denying that the fix works. But something similar could be accomplished in client code without any changes to Calcite. Without the {{withOperandFor}} method the test case would be 1 or 2 lines longer - not nothing, is it worth it?

I'm worried that people will think that {{withOperandFor}} methods are the ONLY way to customize rules. And post CALCITE-3923, they're syntactic sugar but not necessary.

> FilterSetOpTransposeRule constructor should allow for user defined Filter and SetOp classes
> -------------------------------------------------------------------------------------------
>
>                 Key: CALCITE-4183
>                 URL: https://issues.apache.org/jira/browse/CALCITE-4183
>             Project: Calcite
>          Issue Type: Improvement
>          Components: core
>    Affects Versions: 1.24.0
>            Reporter: Sean Broeder
>            Priority: Major
>              Labels: pull-request-available
>   Original Estimate: 168h
>          Time Spent: 20m
>  Remaining Estimate: 167h 50m
>
> The current FilterSetOpTransposeRule constructor simply takes a RelBuilderFactory.  Adding an additional constructor would allow more flexibility for user specific Filter and SetOp classes and follows behavior already allowed for several other rules.  
>  For example:
> /**
>  * Creates a FilterSetOpTransposeRule that uses a generic
>  * {@link Filter} and {@link SetOp}
>  * @param filterClass filter class
>  * @param setOpClass setOp class
>  * @param relBuilderFactory builder factory for relational expressions
>  */
> public FilterSetOpTransposeRule(Class<? extends Filter> filterClass,
>                                 Class<? extends SetOp> setOpClass,
>                                 RelBuilderFactory relBuilderFactory) {
>    super(
>        operand(filterClass,
>        operand(setOpClass, any())),
>        relBuilderFactory, null);
> }



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