I mean, testPushNonSimpleMappingProject [1] runs with RelFieldTrimmer
enabled, which is done by [2]
[1]
https://github.com/apache/calcite/pull/1500/files#diff-3c834a32d46b821b5241e132f2ae6bfaR324
[2]
https://github.com/apache/calcite/blob/master/core/src/main/java/org/apache/calcite/prepare/Prepar
Yes, that's how testPushNonSimpleMappingProject [1] works
[1]
https://github.com/apache/calcite/pull/1500/files#diff-3c834a32d46b821b5241e132f2ae6bfaR324
Danny Chan 于2019年10月14日周一 下午3:36写道:
> > But why the final BindableTableScan is not pruned ?
>
> The RelFieldTrimmer default is turned off, yo
> But why the final BindableTableScan is not pruned ?
The RelFieldTrimmer default is turned off, you should open it explicitly.
Best,
Danny Chan
在 2019年10月14日 +0800 AM11:51,dev@calcite.apache.org,写道:
>
> BINDABLE_TABLE_SCAN_RULE
Also regarding that Projects merging is common in Calcite optimization
rules, we should always remember to avoid merging for cases like the one
given by Rommel.
I think that would be hard.
Best,
Jin
XING JIN 于2019年10月14日周一 上午11:51写道:
> Hi, Stamatis, Danny~
>
> Thanks for explain ~
>
> > "The co
Hi, Stamatis, Danny~
Thanks for explain ~
> "The consumer in the case of P1 is the project which only needs $0, $2,
$5,
$6 so the trimmer could slim down the scan by projecting only these fields."
I think RelFieldTrimmer is already doing this by [1].
But why the final BindableTableScan is not pr
+1, RelFieldTrimmer is the role to trim the unused fields.
Best,
Danny Chan
在 2019年10月13日 +0800 AM6:25,dev@calcite.apache.org,写道:
>
> RelFieldTrimmer
I was thinking that RelFieldTrimmer can be used to transform the plan P1 to
plan P2 and then ProjectTableScanRule can be used to introduce the
BindableTableScan.
The consumer in the case of P1 is the project which only needs $0, $2, $5,
$6 so the trimmer could slim down the scan by projecting only
Sure we can ~
If we use BindableTableScanRule to derive a BindableTableScan from
ProjectableFilterableTable, that would happen during a stage of
optimization run by RelOptPlanner. But RelFieldTrimmer works right during
conversion of Sql to Rel.
Wang Yanlin <1989yanlinw...@163.com> 于2019年10月12日周六 下