Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Query : Fixes ORDER BY query issue when partial partition key is specified with hierarchical partition #4507

Merged
merged 4 commits into from
May 21, 2024

Conversation

adityasa
Copy link
Contributor

@adityasa adityasa commented May 19, 2024

Pull Request Template

Description

If partial partition key is specified during query execution and the container partition is split at the top level of the partition key, ORDER BY query results may be wrong. This happens because query is incorrectly treated as a streaming ORDER BY query, even though it spans across multiple physical partitions. The fix is to ensure cross-partition ORDER BY pipeline gets used, which applies global sort on results obtained from each backend partition (using k-way merge). Since the physical partitions are already resolved by the time this determination is made (they just happen to get ignored at the moment), the fix is straightforward and bulk of the change is test related.

Type of change

Please delete options that are not relevant.

  • [] Bug fix (non-breaking change which fixes an issue)
  • [] New feature (non-breaking change which adds functionality)
  • [] Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • [] This change requires a documentation update

Closing issues

To automatically close an issue: closes #4472

Copy link
Contributor

@sboshra sboshra left a comment

Choose a reason for hiding this comment

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

:shipit:

@kirankumarkolli kirankumarkolli added the auto-merge Enables automation to merge PRs label May 21, 2024
@kirankumarkolli kirankumarkolli merged commit dda9cb4 into master May 21, 2024
21 checks passed
@kirankumarkolli kirankumarkolli deleted the users/adityasa/HierarchicalPKOrderByIssue branch May 21, 2024 00:02
adityasa added a commit that referenced this pull request Jun 7, 2024
…ified with hierarchical partition (#4507)

* Initial commit

* Initial commit

* Update.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
auto-merge Enables automation to merge PRs
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Incorrect order of items on "Order by" query on multi-partition container
4 participants