liyafan82 commented on a change in pull request #1912: [CALCITE-3889] Add
apply(Mappings.Mapping) to RelTrait and RelTraitSet
URL: https://github.com/apache/calcite/pull/1912#discussion_r407312335
##########
File path: core/src/main/java/org/apache/calcite/plan/RelTrait.java
##########
@@ -85,4 +87,14 @@
* @param planner Planner
*/
void register(RelOptPlanner planner);
+
+ /**
+ * Applies a mapping to this trait.
+ *
+ * @param mapping Mapping
+ * @return trait with mapping applied
+ */
+ default <T extends RelTrait> T apply(Mappings.TargetMapping mapping) {
+ return (T) this;
+ }
Review comment:
In which cases does the returned trait have a different type from this?
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services