korlov42 commented on a change in pull request #9126:
URL: https://github.com/apache/ignite/pull/9126#discussion_r640463970
##########
File path:
modules/calcite/src/main/java/org/apache/ignite/internal/processors/query/calcite/rel/IgniteTableModify.java
##########
@@ -96,4 +108,64 @@ public IgniteTableModify(RelInput input) {
return new IgniteTableModify(cluster, getTraitSet(), getTable(),
sole(inputs),
getOperation(), getUpdateColumnList(), getSourceExpressionList(),
isFlattened());
}
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public List<Pair<RelTraitSet, List<RelTraitSet>>>
deriveRewindability(RelTraitSet nodeTraits,
+
List<RelTraitSet> inTraits) {
+ return
ImmutableList.of(Pair.of(nodeTraits.replace(TraitUtils.rewindability(inTraits.get(0))),
+ inTraits));
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public List<Pair<RelTraitSet, List<RelTraitSet>>>
deriveDistribution(RelTraitSet nodeTraits,
+
List<RelTraitSet> inTraits) {
+ return
ImmutableList.of(Pair.of(nodeTraits.replace(TraitUtils.distribution(inTraits.get(0))),
+ inTraits));
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public List<Pair<RelTraitSet, List<RelTraitSet>>>
deriveCollation(RelTraitSet nodeTraits,
+
List<RelTraitSet> inTraits) {
+ return
ImmutableList.of(Pair.of(nodeTraits.replace(TraitUtils.collation(inTraits.get(0))),
+ inTraits));
+ }
+
+ /**
+ *
+ */
+ @Override
+ public Pair<RelTraitSet, List<RelTraitSet>>
passThroughCorrelation(RelTraitSet nodeTraits,
+
List<RelTraitSet> inTraits) {
+ CorrelationTrait correlation = TraitUtils.correlation(nodeTraits);
+
+ return Pair.of(nodeTraits,
ImmutableList.of(inTraits.get(0).replace(correlation)));
+ }
+
+ /**
+ *
+ */
+ @Override
+ public List<Pair<RelTraitSet, List<RelTraitSet>>>
deriveCorrelation(RelTraitSet nodeTraits,
+
List<RelTraitSet> inTraits) {
+ Set<CorrelationId> corrIds =
RexUtils.extractCorrelationIds(getSourceExpressionList());
Review comment:
Currently IgniteTableModify doesn't introduce any correlations, so we
should propagate its child's correlation only
--
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]