ORDER BY before SELECT #34
Replies: 1 comment
-
The main reason for this is that Even more interesting is section 12.4 which has to deal with the lack of environment for the set operators and |
Beta Was this translation helpful? Give feedback.
-
Background
I have a question regarding the evaluation order of PartiQL's SFW query. It originally stems from my PR in PartiQL Kotlin's PR #740, which originally came from Issue #571.
It specifically has to do with the input bindings to ORDER BY and where it lies in the evaluation order. In Section 3.3 of the PartiQL Specification, it states:
It was my assumption that ORDER BY, LIMIT, and OFFSET would follow SELECT, but in this case, it does not.
Then, Section 12.5 of the PartiQL Specification writes:
My Question
Why did PartiQL opt to choose the order of evaluation that it uses? We specify a workaround in Section 12.5 to maintain compatibility with SQL, but this would not be necessary if ORDER BY was evaluated after SELECT.
References
Beta Was this translation helpful? Give feedback.
All reactions