Add UNION ALL support for gpu_processing (legacy Sirius)#516
Open
ducndh wants to merge 3 commits intosirius-db:devfrom
Open
Add UNION ALL support for gpu_processing (legacy Sirius)#516ducndh wants to merge 3 commits intosirius-db:devfrom
ducndh wants to merge 3 commits intosirius-db:devfrom
Conversation
Implement GPUPhysicalUnion operator that follows DuckDB's PhysicalUnion
pipeline-splitter pattern: both children feed into the same downstream
sink via CreateUnionPipeline. Also fix GPUResultCollection to use
vector<unique_ptr<DataChunk>> instead of raw array to handle multiple
Sink calls from union pipelines without heap corruption.
Repro: CALL gpu_processing('SELECT * FROM t1 UNION ALL SELECT * FROM t2')
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
… meta-pipeline
The scheduler only checked the base pipeline's dependencies when deciding
scheduling order. When a hash join build-side dependency was added to a
non-base pipeline (e.g. the probe pipeline in a UNION ALL meta-pipeline),
the dependency was missed and the meta-pipeline was scheduled before its
build side completed, causing NULL pointer dereference.
Fix: check dependencies of ALL pipelines within the meta-pipeline, not
just the base pipeline.
Repro: CALL gpu_processing('WITH cte AS (...) SELECT ... FROM cte UNION ALL SELECT ... JOIN cte ...')
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
gpu_processing queries with UNION ALL fall back to CPU
Implementation: