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

#135: Allow queries with no particular sort order #127

Merged
merged 1 commit into from
Apr 2, 2025

Conversation

nvamelichev
Copy link
Collaborator

Add experimental unordered() API to all common query paths
(OrderExpression+EntityExpressions, TableQueryBuilder, YqlOrderBy).
The experimental API sets no particular sort order for the query results.

That is, the results will be returned in an implementation-defined order
which is subject to change at any time, potentially even giving a different
ordering for repeated executions of the same query
.

This is different from the OrderExpression being null or YqlOrderBy missing,
because YOJ interprets these as "order query results by entity ID ascending"
to ensure maximum predictability of query results.

There might be some modest performance gains from removing an implicit ORDER BY
clause from YOJ queries. The new experimental API allows users to take advantage
of these potential performance gains.

@nvamelichev nvamelichev added feature New feature or request experimental labels Mar 17, 2025
@nvamelichev nvamelichev requested a review from g-sg-v March 17, 2025 21:29
@nvamelichev nvamelichev self-assigned this Mar 17, 2025
Copy link
Contributor

@g-sg-v g-sg-v left a comment

Choose a reason for hiding this comment

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

Looks good!

@nvamelichev nvamelichev merged commit b03b8b5 into main Apr 2, 2025
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
experimental feature New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants