Re: Question: ProjectTransposeRule & ProjectMergeRule can't work well with prune ProjectRel, is it right?

2023-09-11 Thread LakeShen
Maybe you could use RelFieldTrimmer to do column pruning. Best, LakeShen GLeonSun 于2023年9月11日周一 19:13写道: > Hi everyone, SQL like this cannot be optimized for column cropping, is > this behavior a known defect? > > > — > select > count(1) > from > ( > select >

Re: Question on ProjectMergeRule

2019-02-12 Thread Homer
Julian, I am going to speculate it is due to the ProjectRemoveRule. Since the Project is on the Join and only projects its inputs. Thanks On 2019-02-12 1:36 p.m., Homer wrote: Julian, Thank for your reply, I also found ProjectRemoveRule and it successfully did what I needed.  Much

Re: Question on ProjectMergeRule

2019-02-12 Thread Homer
Julian, Thank for your reply, I also found ProjectRemoveRule and it successfully did what I needed.  Much appreciated. One interesting thing I am using these 4 rules: FilterProjectTransposeRule.INSTANCE, ProjectRemoveRule.INSTANCE, ProjectMergeRule.INSTANCE, FilterMergeRule.INSTANCE I am

Re: Question on ProjectMergeRule

2019-02-12 Thread Julian Hyde
Sorry the documentation isn’t clear, but read the code. It doesn’t remove identical projections so that ProjectRemoveRule can do it instead. ProjectMergeRule has a boolean “force" flag that will cause it to remove even if projections are identical. If you use RelBuilder to build the tree, a

Question on ProjectMergeRule

2019-02-12 Thread Homer
Hi The ProjectMergeRule specifies the following ProjectMergeRule merges a |Project| into another |Project|