-
Notifications
You must be signed in to change notification settings - Fork 14
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
fix(order by
): for localized sorting, prepend table alias
#546
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
as reported in #543, postgres is not able to resolve a reference to a column unambigously if the reference is part of a `COLLATE` expression. This change adds a test which should reveal how the other DBs behave.:
order by
): for localized
sorting, prepend table alias
order by
): for localized
sorting, prepend table aliasorder by
): Ambiguous column reference in COLLATE expression for localized sorting
order by
): Ambiguous column reference in COLLATE expression for localized sortingorder by
): for localized sorting, prepend table alias
BobdenOs
reviewed
Apr 11, 2024
patricebender
commented
Apr 11, 2024
Merged
BobdenOs
approved these changes
Apr 11, 2024
patricebender
added a commit
that referenced
this pull request
Apr 11, 2024
this is a fix for #546, where those properties in some cases got lost.
johannes-vogel
added a commit
that referenced
this pull request
Apr 12, 2024
🤖 I have created a release *beep* *boop* --- <details><summary>db-service: 1.8.0</summary> ## [1.8.0](db-service-v1.7.0...db-service-v1.8.0) (2024-04-12) ### Added * Odata built-in query functions ([#558](#558)) ([6e63367](6e63367)) * support HANA stored procedures ([#542](#542)) ([52a00a0](52a00a0)) ### Fixed * **`expand`:** Only accept on structures, assocs or table aliases ([#551](#551)) ([3248512](3248512)) * **`order by`:** for localized sorting, prepend table alias ([#546](#546)) ([a273a92](a273a92)) * etag with stream_compat ([#562](#562)) ([b0a3a41](b0a3a41)) * exclude `cds.LargeBinary` from wildcard expansion ([#577](#577)) ([6661d63](6661d63)) * Reduce insert queries for deep update ([#568](#568)) ([55e5114](55e5114)) * Reduced count query complexity when possible ([#553](#553)) ([3331f02](3331f02)) </details> <details><summary>postgres: 1.7.0</summary> ## [1.7.0](postgres-v1.6.0...postgres-v1.7.0) (2024-04-12) ### Added * Odata built-in query functions ([#558](#558)) ([6e63367](6e63367)) </details> <details><summary>hana: 0.2.0</summary> ## [0.2.0](hana-v0.1.0...hana-v0.2.0) (2024-04-12) ### Added * Odata built-in query functions ([#558](#558)) ([6e63367](6e63367)) * support HANA stored procedures ([#542](#542)) ([52a00a0](52a00a0)) </details> --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). Co-authored-by: Johannes Vogel <31311694+johannes-vogel@users.noreply.github.com>
Merged
This was referenced Jan 28, 2025
Closed
Closed
Merged
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Usually, column references in simple names in order by clauses are left as is. That means no table alias is prepended. In expressions however, only source elements can be reffered to.
That is why in case of localized sorting, we must prepend the table alias nevertheless, as in the DB specific drivers, a
COLLATE
expression is wrapped around the string reference. Hence we must replace the column reference with the underlying source reference.as reported in #543, postgres is not able to resolve a reference to a column unambigously if the reference is part of a
COLLATE
expression.