You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A buffer planNode should consume input rows, write them to a buffer, and pass the rows through to the next node in the chain.
A scanBuffer planNode references a single buffer planNode and behaves like an iterator into that buffer. It doesn't live on the "main path" of a planNode tree - something else has to Next it to start it consuming from the buffer.
Together, these two nodes enable a couple of use cases:
37137: sql: add buffer and scanBuffer nodes r=yuzefovich a=yuzefovich
Adds bufferNode that consumes its input, stores all the rows in a
buffer, and then proceeds on passing the rows through. The buffer
can be iterated over multiple times using scanBuffer node that is
referencing a single bufferNode.
Fixes: #37050.
Release note: None
Co-authored-by: Yahor Yuzefovich <yahor@cockroachlabs.com>
A buffer planNode should consume input rows, write them to a buffer, and pass the rows through to the next node in the chain.
A scanBuffer planNode references a single buffer planNode and behaves like an iterator into that buffer. It doesn't live on the "main path" of a planNode tree - something else has to
Next
it to start it consuming from the buffer.Together, these two nodes enable a couple of use cases:
WITH
clause in a CTE, which is a known limitation: sql: multi-use common table expressions #21084For use case 2, you can imagine trees like the following making up a foreign key check, together (see issue #37053 for
errorIfRows
):The text was updated successfully, but these errors were encountered: