Skip to content

feat: speed up equi ASOF joins#19654

Merged
KKould merged 2 commits intodatabendlabs:mainfrom
KKould:feat/asof-eq-hash-fast-path-tests
Apr 2, 2026
Merged

feat: speed up equi ASOF joins#19654
KKould merged 2 commits intodatabendlabs:mainfrom
KKould:feat/asof-eq-hash-fast-path-tests

Conversation

@KKould
Copy link
Copy Markdown
Member

@KKould KKould commented Apr 1, 2026

I hereby agree to the terms of the CLA available at: https://docs.databend.com/dev/policies/cla/

Summary

  • reuse the hash-join path for ASOF JOIN when equality keys are present
  • preserve the original SQL outer side for equi ASOF LEFT/RIGHT JOIN after the ASOF binder rewrite swaps the physical children
  • keep the ASOF residual predicates in place so the optimization only changes the physical fast path
  • add a focused sqllogictest that checks nearest-predecessor semantics, key partition isolation, and outer-join null preservation for both left and right ASOF cases

Tests

  • Unit Test
  • Logic Test
  • Benchmark Test
  • No Test - Explain why

Type of change

  • Bug Fix (non-breaking change which fixes an issue)
  • New Feature (non-breaking change which adds functionality)
  • Breaking Change (fix or feature that could cause existing functionality not to work as expected)
  • Documentation Update
  • Refactoring
  • Performance Improvement
  • Other (please describe):

This change is Reviewable

@KKould KKould requested a review from zhang2014 April 1, 2026 17:11
@KKould KKould self-assigned this Apr 1, 2026
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: f3ebb4081b

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

@KKould KKould added the C-improvement Category: improvement label Apr 1, 2026
@KKould KKould changed the title perf(query): speed up equi ASOF joins feat: speed up equi ASOF joins Apr 1, 2026
@github-actions github-actions bot added the pr-feature this PR introduces a new feature to the codebase label Apr 1, 2026
@KKould
Copy link
Copy Markdown
Member Author

KKould commented Apr 1, 2026

@codex review

@chatgpt-codex-connector
Copy link
Copy Markdown

Codex Review: Didn't find any major issues. 🚀

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Copy link
Copy Markdown
Member

@zhang2014 zhang2014 left a comment

Choose a reason for hiding this comment

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

ci failure.

@KKould KKould merged commit f8b4fec into databendlabs:main Apr 2, 2026
183 of 185 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

C-improvement Category: improvement pr-feature this PR introduces a new feature to the codebase

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants