-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
Document polymorphic table functions not preserving row ordering #14505
Conversation
This is not a limitation. It's just how the SQL language works. The ORDER BY clause is a clause for the polymorphic table function, not for the query. It's for sorting inputs to the table function, but has no bearing or relationship to how the outputs of the table function come out. In a way, it's similar to ORDER BY appearing in window functions or subqueries. |
i know and you know i know. Still, some users were seen doing SELECT * FORM TABLE ( catalog.system.query(' ... ORDER BY ...')) and it's good to explain them that it's kind of pointless. |
Oh, that's different. I thought it was referring to the ORDER BY clause in the polymorphic table function invocation: SELECT * FROM TABLE(table_function(
input => TABLE(...) ORDER BY ...
)) In that case, yes, I agree with @findepi. This should go in the documentation for the specific table functions. |
d0bbfc0
to
e5ff019
Compare
Reworked to include this note as a fragment in the query table function sections of applicable connectors, PTAL. |
docs/src/main/sphinx/connector/polymorphic-table-function-ordering.fragment
Outdated
Show resolved
Hide resolved
e5ff019
to
e01220e
Compare
This PR has been rebased to master and builds fine locally, so I'm not sure why checks are failing. |
@findepi Have I addressed all feedback/can we merge this? |
e01220e
to
925ab4c
Compare
Description
See #14401 (review) for context
Non-technical explanation
Polymorphic table functions don't preserve row ordering, so this PR documents that limitation
Release notes
(z) This is not user-visible or docs only and no release notes are required.
( ) Release notes are required, please propose a release note for me.
( ) Release notes are required, with the following suggested text: