Skip to content

feat(sql): SQL hints for linear and indexed ASOF join algos#6197

Merged
bluestreak01 merged 14 commits intomasterfrom
mt_asof-join-hints
Oct 1, 2025
Merged

feat(sql): SQL hints for linear and indexed ASOF join algos#6197
bluestreak01 merged 14 commits intomasterfrom
mt_asof-join-hints

Conversation

@mtopolnik
Copy link
Copy Markdown
Contributor

@mtopolnik mtopolnik commented Sep 26, 2025

This PR:

  1. Deprecates and ignores the useFastAsOfJoin configuration property. Now QuestDB always uses the fast asof join, unless disabled through a hint.
  2. Deprecates for removal, but still honors, the existing SQL hints: avoid_asof_binary_search and avoid_lt_binary_search
  3. Adds two new hints: asof_linear_search and asof_index_search

The new hints apply to both ASOF and LT JOIN variants. Instead of hinting to avoid an algo, the hints positively select algos:

  • asof_linear_search selects the original algo with no binary search or index scan optimizations
  • asof_index_search requests the algo that leverages the symbol index

@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Sep 26, 2025

Important

Review skipped

Auto reviews are disabled on this repository.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

✨ Finishing touches
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch mt_asof-join-hints

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@puzpuzpuz puzpuzpuz added Enhancement Enhance existing functionality SQL Issues or changes relating to SQL execution labels Sep 30, 2025
@glasstiger
Copy link
Copy Markdown
Contributor

[PR Coverage check]

😍 pass : 11 / 11 (100.00%)

file detail

path covered line new line coverage
🔵 io/questdb/PropServerConfiguration.java 1 1 100.00%
🔵 io/questdb/griffin/SqlHints.java 2 2 100.00%
🔵 io/questdb/griffin/SqlCodeGenerator.java 8 8 100.00%

@bluestreak01 bluestreak01 merged commit e22c9fe into master Oct 1, 2025
35 checks passed
@bluestreak01 bluestreak01 deleted the mt_asof-join-hints branch October 1, 2025 16:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Enhancement Enhance existing functionality SQL Issues or changes relating to SQL execution

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants