-
Notifications
You must be signed in to change notification settings - Fork 264
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add support for enabling ORDER BY on non projected columns (#1155)
In response to PR #1147, we've introduced support for the use of ORDER BY on non-projected columns ``` SELECT name FROM meme_images ORDER BY Similarity(SiftFeatureExtractor(Open("{}")), SiftFeatureExtractor(data)) LIMIT 1; SELECT FaceDetector(data) FROM MyVideo WHERE id < 5 order by scores; SELECT AirForecast(12) order by y; Select name FROM meme_images ORDER BY name; ``` The following query won't work. `Select name AS n FROM meme_images ORDER BY n;` Currently, we execute projection as the last operation. Only when a function expression is present it is executed before projection, allowing its use in ORDER BY. A complete fix will require us to redesign the binder. Right now, we've decided to defer this task because there is no urgency to support it. Ref: https://github.com/duckdb/duckdb/blob/52a47a6b311a8aa008e7c78d8472eb52a937fa62/src/planner/expression_binder/order_binder.cpp#L68
- Loading branch information
Showing
4 changed files
with
69 additions
and
17 deletions.
There are no files selected for viewing
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
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
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
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