rubenada opened a new pull request #2690: URL: https://github.com/apache/calcite/pull/2690
This PR solves some known issues around the RepeatUnion operator, which was implemented via CALCITE-2812. These issues are: [CALCITE-3673] ListTransientTable should not leave tables in the schema [CALCITE-4054] RepeatUnion containing a Correlate with a transientScan on its RHS causes NPE The root cause of both is the same: how / when the transient table (temporary table that holds RepeatUnion intermediate results) is added / removed in the schema. As a solution, it is proposed that this responsibility shall be placed in the RepeatUnion operator itself: - It will add the table to the schema at the beginning of its process, see `EnumerableRepeatUnion#implement`; this will ensure that the table will be ready for its inputs' operators (fixes CALCITE-4054). - It will remove the table from the schema at the end of its process, see `EnumerableDefaults#repeatUnion#close` (fixes CALCITE-3673). A new method `SchemaPlus#removeTable` needs to be added for the second point. A (no-op) default implementation is provided in the interface for backwards compatibility, to be removed in a future version. -- 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]
