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

Fix node order #188

Merged
merged 3 commits into from
Sep 10, 2020
Merged

Fix node order #188

merged 3 commits into from
Sep 10, 2020

Conversation

asdine
Copy link
Collaborator

@asdine asdine commented Sep 10, 2020

This PR fixes the order of the nodes generated by the parser. Projections are supposed to happen before sorting and limit/offset.

EXPLAIN SELECT a + 1 FROM test WHERE c > 30 ORDER BY a DESC LIMIT 10 OFFSET 20

Before:

Table(test) -> σ(cond: c > 30) -> Sort(a DESC) -> Offset(20) -> Limit(10) -> ∏(a + 1)

After:

Table(test) -> σ(cond: c > 30) -> ∏(a + 1) -> Sort(a DESC) -> Offset(20) -> Limit(10)

@asdine asdine merged commit 2c80890 into master Sep 10, 2020
@asdine asdine deleted the fix/node-order branch September 10, 2020 05:14
@asdine asdine added this to the v0.8.0 milestone Sep 26, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant