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 a query planner for OxQL #7152

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

Add a query planner for OxQL #7152

wants to merge 2 commits into from

Conversation

bnaecker
Copy link
Collaborator

  • Add types to represent the plan tree and the currently-supported plan tree nodes. These mostly correspond to the existing query AST nodes, but include information about the expected schema for the input and output tables, along with the query AST nodes that "implement" that transformation.
  • Add an explicit node for computing deltas from a cumulative timeseries, automatically after the node for fetching its data from the DB. This is currently implicitly done after fetching the data, but will be part of an explicit plan step going forward. The ultimate goal is to push that into the database itself where possible.
  • Adds methods to optimize a query plan, which currently includes the predicate-pushdown and limit-pushdown tricks we already do to limit the amount of data we get from the database. Adds some tests to verify behavior of these optimizations, in particular that they don't change the planned output of the query itself.
  • Add pretty-printing of the plan tree, and include a way to show that in the OxQL shell.
  • Add detection of full table scans. Use the planner in OxQL queries, only to verify them and check that there are no scans. The queries themselves are executed in the original method today.

- Add types to represent the plan tree and the currently-supported plan
  tree nodes. These mostly correspond to the existing query AST nodes,
  but include information about the expected schema for the input and
  output tables, along with the query AST nodes that "implement" that
  transformation.
- Add an explicit node for computing deltas from a cumulative
  timeseries, automatically after the node for fetching its data from
  the DB. This is currently implicitly done after fetching the data, but
  will be part of an explicit plan step going forward. The ultimate goal
  is to push that into the database itself where possible.
- Adds methods to optimize a query plan, which currently includes the
  predicate-pushdown and limit-pushdown tricks we already do to limit
  the amount of data we get from the database. Adds some tests to verify
  behavior of these optimizations, in particular that they don't change
  the _planned_ output of the query itself.
- Add pretty-printing of the plan tree, and include a way to show that
  in the OxQL shell.
- Add detection of full table scans. Use the planner in OxQL queries,
  _only to verify them_ and check that there are no scans. The queries
  themselves are executed in the original method today.
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