thomasrebele commented on pull request #2690:
URL: https://github.com/apache/calcite/pull/2690#issuecomment-1014322602


   The repeat union closes the enumerator of the iteration enumerable after 
every iteration. So this would also close the enumerator of the 
`ListTransientTable`, therefore making the table unavailable for the iterations 
after the first one. Alternatively we could introduce a `TableSpoolScope` 
operator that initializes the table and removes it when it is closed:
   
   ```
   TableSpoolScope(delta) // <- creates the ListTransientScan and removes the 
table from the schema at the end
     RepeatUnion(iterations=..., all=...)
        TableSpool(delta)
           TableScan
   ```
   
   The table parameter of `EnumerableRepeatUnion` could be made optional, 
allowing to keep the same behavior of the operator as before. @zabetak, could 
you be more specific about the uses with other sub-plans that you have in mind?


-- 
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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to