File tree Expand file tree Collapse file tree 2 files changed +23
-1
lines changed Expand file tree Collapse file tree 2 files changed +23
-1
lines changed Original file line number Diff line number Diff line change @@ -1449,6 +1449,18 @@ auto ExecutionBlockImpl<SubqueryEndExecutor>::shadowRowForwarding() -> ExecState
1449
1449
}
1450
1450
}
1451
1451
1452
+ template <class Executor >
1453
+ auto ExecutionBlockImpl<Executor>::sideEffectShadowRowForwarding(AqlCallStack& stack) -> ExecState {
1454
+ static_assert (executorHasSideEffects<Executor>);
1455
+ if (!stack.needToSkipSubquery ()) {
1456
+ // We need to really produce things here
1457
+ // fall back to original version as any other executor.
1458
+ return shadowRowForwarding ();
1459
+ }
1460
+ // TODO implemenet ShadowRowHandling
1461
+ return shadowRowForwarding ();
1462
+ }
1463
+
1452
1464
template <class Executor >
1453
1465
auto ExecutionBlockImpl<Executor>::shadowRowForwarding() -> ExecState {
1454
1466
TRI_ASSERT (_outputItemRow);
@@ -1999,7 +2011,9 @@ ExecutionBlockImpl<Executor>::executeWithoutTrace(AqlCallStack stack) {
1999
2011
}
2000
2012
2001
2013
TRI_ASSERT (!_outputItemRow->allRowsUsed ());
2002
-
2014
+ if constexpr (executorHasSideEffects<Executor>) {
2015
+ _execState = sideEffectShadowRowForwarding (stack);
2016
+ }
2003
2017
// This may write one or more rows.
2004
2018
_execState = shadowRowForwarding ();
2005
2019
if constexpr (!std::is_same_v<Executor, SubqueryEndExecutor>) {
Original file line number Diff line number Diff line change @@ -308,6 +308,14 @@ class ExecutionBlockImpl final : public ExecutionBlock {
308
308
309
309
void resetExecutor ();
310
310
311
+ // Forwarding of ShadowRows if the executor has SideEffects.
312
+ // This skips over ShadowRows, and counts them in the correct
313
+ // position of the callStack as "skipped".
314
+ // as soon as we reach a place where there is no skip
315
+ // ordered in the outer shadow rows, this call
316
+ // will fall back to shadowRowForwardning.
317
+ [[nodiscard]] auto sideEffectShadowRowForwarding (AqlCallStack& stack) -> ExecState;
318
+
311
319
private:
312
320
/* *
313
321
* @brief Used to allow the row Fetcher to access selected methods of this
You can’t perform that action at this time.
0 commit comments