alex-plekhanov commented on a change in pull request #9084:
URL: https://github.com/apache/ignite/pull/9084#discussion_r630261846
##########
File path:
modules/calcite/src/main/java/org/apache/ignite/internal/processors/query/calcite/exec/ExecutionServiceImpl.java
##########
@@ -1149,4 +1159,79 @@ private void onError(Throwable error) {
tryClose();
}
}
+
+ static class FixDependentInsertNodeShuttle extends IgniteRelShuttle {
+ /**
+ * Flags indicate whether a {@link IgniteTableModify insert node}
+ * modifies the same table used for querying a data set to isnert.
Review comment:
Typo: "isnert"
##########
File path:
modules/calcite/src/main/java/org/apache/ignite/internal/processors/query/calcite/exec/ExecutionServiceImpl.java
##########
@@ -614,6 +622,8 @@ private QueryPlan prepareDml(SqlNode sqlNode,
PlanningContext ctx) throws Valida
// Convert to Relational operators graph
IgniteRel igniteRel = optimize(sqlNode, planner);
+ igniteRel = new FixDependentInsertNodeShuttle().visit(igniteRel);
Review comment:
If `IgniteTableModify` is always a top-level node, perhaps it's better
to check this condition before recursive processing of the whole tree (to avoid
redundant traversal for read-only queries).
--
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]