Skip to content

Enable Batch Sorted Merge for nullable order by with firstlast index - #9961

Merged
natalya-aksman merged 1 commit into
mainfrom
support_batch_sorted_merge_on_nullable_orderby_with_firstlast
Jun 11, 2026
Merged

Enable Batch Sorted Merge for nullable order by with firstlast index#9961
natalya-aksman merged 1 commit into
mainfrom
support_batch_sorted_merge_on_nullable_orderby_with_firstlast

Conversation

@natalya-aksman

@natalya-aksman natalya-aksman commented Jun 3, 2026

Copy link
Copy Markdown
Member

We can now support Batch Sorted Merge for nullable order by columns with firstlast index as #9784 have been implemented.

We forbade Batch Sorted Merge for nullable order by columns with minmax index in #9482. Now that firstlast index is available we can allow it for columns with firstlast index.

Disable-check: force-changelog-file

@github-actions

github-actions Bot commented Jun 3, 2026

Copy link
Copy Markdown

@svenklemm, @antekresic: please review this pull request.

Powered by pull-review

@natalya-aksman natalya-aksman added the Columnstore Related to the column store / compression label Jun 3, 2026
@natalya-aksman natalya-aksman added this to the v2.28.0 milestone Jun 3, 2026
@codecov

codecov Bot commented Jun 3, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@natalya-aksman
natalya-aksman force-pushed the support_batch_sorted_merge_on_nullable_orderby_with_firstlast branch from 28bdab5 to 7c184e4 Compare June 11, 2026 15:37
/* starting_pathkey_offset = */ 0,
compression_info,
/* for_bsm = */ true,
/* for_batch_sorted_merge = */ true,

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Just as a note for the future, I hope we can make the meaning of this more explicit. As far as I can understand, for full compressed sort pushdown the requirement is: "compressed sort leads to all batch rows beign fully sorted in required order", and for batch sorted merge it is: "compressed sort leads to first batch rows being sorted in required order"

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

And the "all rows sorted" condition is basically the "first row sorted" condition + "batches are not overlapping".

@natalya-aksman
natalya-aksman merged commit 644f669 into main Jun 11, 2026
60 checks passed
@natalya-aksman
natalya-aksman deleted the support_batch_sorted_merge_on_nullable_orderby_with_firstlast branch June 11, 2026 16:23
kpan2034 pushed a commit to kpan2034/timescaledb that referenced this pull request Jul 1, 2026
…imescale#9961)

We can now support Batch Sorted Merge for nullable order by columns with
firstlast index as
[timescale#9784](timescale#9784) have been
implemented.

We forbade Batch Sorted Merge for nullable order by columns with minmax
index in timescale#9482. Now that
firstlast index is available we can allow it for columns with firstlast
index.
@timescale-automation timescale-automation added the released-2.29.0 Released in 2.29.0 label Jul 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Columnstore Related to the column store / compression released-2.29.0 Released in 2.29.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants