Details
-
Improvement
-
Status: Closed
-
Minor
-
Resolution: Fixed
-
1.37.0
Description
Even if the default configuration of ProjectSetOpTransposeRule matches a LogicalProject, theoretically any downstream project could adjust the rule config to match a different subclass of Project, with the corresponding RelBuilderFactory, to obtain the rule behavior customized for their needs.
However, at this point this cannot work because ProjectSetOpTransposeRule#onMatch performs a
final LogicalProject origProject = call.rel(0);
which leads to a ClassCastException in this scenario.
Therefore, this line should be changed (and generalized) into
final Project origProject = call.rel(0);
(as it happens already in other rules, such as FilterSetOpTransposeRule or ProjectFilterTransposeRule) to improve the rule's adaptability, without impacting the rule's behavior.
Attachments
Issue Links
- links to