Skip to content

Internal #6777: IEJoin Unified L1/2#20083

Merged
lnkuiper merged 18 commits intoduckdb:mainfrom
hawkfish:iejoin-parallel
Dec 11, 2025
Merged

Internal #6777: IEJoin Unified L1/2#20083
lnkuiper merged 18 commits intoduckdb:mainfrom
hawkfish:iejoin-parallel

Conversation

@hawkfish
Copy link
Contributor

@hawkfish hawkfish commented Dec 8, 2025

  • Pull out L1/L2 construction to tasks (still single threaded)
  • Convert IEJoinUnion to work on slices of L2
  • Remove dead code.
  • Cherry pick block iterator locking fix.
  • Add resource requirements to test.
  • Fix NOP memory race with placement new atomics.
  • Fix missing include

@hawkfish
Copy link
Contributor Author

hawkfish commented Dec 8, 2025

Benchmark trace showing parallel join task:

image

Copy link
Collaborator

@lnkuiper lnkuiper left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR! It looks good, I just have one thing:

auto &sort_key = static_cast<SORT_KEY &>(*this);
sort_key.payload.u.ptr = payload;
auto a = new ((void *)&sort_key.payload.u.ptr) atomic<data_ptr_t>;
a->store(payload);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we should wait for #20059 to be merged first, and then see if we can make ThreadSan CI succeed without the atomic hack. I must say, however, this is a very interesting hack!

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I had to remove the hack because it doesn't work on Windows for some reason (which is very strange because I first used it on Windows about 10 years ago.). I've added sanitiser rules for now and everything passes.

@duckdb-draftbot duckdb-draftbot marked this pull request as draft December 8, 2025 21:12
* Remove placement new atomics
* Suppress data race warnings for sort payloads
@hawkfish hawkfish marked this pull request as ready for review December 9, 2025 08:09
@duckdb-draftbot duckdb-draftbot marked this pull request as draft December 9, 2025 21:23
@lnkuiper lnkuiper marked this pull request as ready for review December 10, 2025 11:53
@lnkuiper
Copy link
Collaborator

I've merged with main and removed the threadsan suppressions. Good to go from my side once CI passes (fingers crossed for ThreadSan!)

@duckdb-draftbot duckdb-draftbot marked this pull request as draft December 10, 2025 23:21
@lnkuiper lnkuiper marked this pull request as ready for review December 11, 2025 08:00
@lnkuiper
Copy link
Collaborator

Thanks!

@lnkuiper lnkuiper merged commit 7981c3b into duckdb:main Dec 11, 2025
100 checks passed
@hawkfish hawkfish deleted the iejoin-parallel branch December 11, 2025 19:47
github-actions bot pushed a commit to duckdb/duckdb-r that referenced this pull request Feb 16, 2026
Remove pointer indirection in ExtensionAccess (duckdb/duckdb#19529)
fix: link error on linux with multiple definition of LogicalType::VARCHAR in `shell_renderer.cpp` (duckdb/duckdb#20096)
Internal duckdb/duckdb#6777: IEJoin Unified L1/2 (duckdb/duckdb#20083)
github-actions bot added a commit to duckdb/duckdb-r that referenced this pull request Feb 16, 2026
Remove pointer indirection in ExtensionAccess (duckdb/duckdb#19529)
fix: link error on linux with multiple definition of LogicalType::VARCHAR in `shell_renderer.cpp` (duckdb/duckdb#20096)
Internal duckdb/duckdb#6777: IEJoin Unified L1/2 (duckdb/duckdb#20083)

Co-authored-by: krlmlr <krlmlr@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants