Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
1.36.0
Description
In the RelBuilder method aggregate_, when (config.pruneInputOfAggregate() && r instanceof Project) line 2443 the Project will be rewritten to remove unused columns.
When this happens, the new Project will be created with the following line
{{{}2487: r =
{}}}2488: project.copy(cluster.traitSet(), project.getInput(), newProjects,
2489: builder.build());
The use of cluster.traitSet() returns emptyTraitSet which is always going to use Convention.NONE regardless of the Rebuilder's ProjectFactory.
In the case of a query plan using a non-Logical convention FOO, with FooProject nodes that require the FOO convention, RelBuilder will normally happily produce FooProject nodes with FOO convention, allowing many CoreRules to be easily reused for custom Conventions.
However, while RelBuilder will produce FooProject with FOO convention in the majority of cases, for the one specific case of column pruning a Project input to an aggregate, it will instead product a FooProject with NONE convention.
Attachments
Issue Links
- is related to
-
CALCITE-6391 Apply mapping to RelCompositeTrait does not apply it to wrapped traits
- Open
- links to