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

Add logical plan between AST and execution #5

Open
fpetkovski opened this issue Sep 14, 2022 · 1 comment
Open

Add logical plan between AST and execution #5

fpetkovski opened this issue Sep 14, 2022 · 1 comment

Comments

@fpetkovski
Copy link
Collaborator

fpetkovski commented Sep 14, 2022

We currently translate the AST directly to a physical plan. Having an in-between logical plan will allow us to run optimizers before the query is executed.

The logical plan would have a one to one mapping with the AST and will contain the parameters of each AST node.
Query optimizers can then transform the logical plan based on predefined heuristics. One example would be optimizing series selects in binary operations so that we do as few network calls as possible.

Finally, we would build the physical plan from the optimized logical plan instead doing it from the AST directly.

image

@yeya24
Copy link
Contributor

yeya24 commented Sep 28, 2022

As discussed on Slack, thanos-io/thanos#4407 this is something we can support when having the logical plan and optimizer.

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

No branches or pull requests

2 participants