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

Predicate Compiler for Evaluators #99

Open
omervk opened this issue Nov 13, 2018 · 0 comments
Open

Predicate Compiler for Evaluators #99

omervk opened this issue Nov 13, 2018 · 0 comments

Comments

@omervk
Copy link
Contributor

omervk commented Nov 13, 2018

Predicates are currently created as ASTs, but are not compiled or optimized. Instead, evaluating them means traversing the tree in its entirety, something that, in a tight loop (like going over partitioning functions for all files in a table), is suboptimal.

Compiling the expressions into a minimal syntax tree that embeds the right-hand side values would let us optimize it ahead of time in several ways, including:

  1. Compressing equals-or-equals trees to in.
  2. Dropping always-true and always-false expressions entirely.

This issue therefore includes three things:

  1. Representing expressions as a value-embedded AST.
  2. Creating an optimizer framework.
  3. Slowly building more and more optimizations.

This could probably be done using existing tools, without reinventing the wheel :)

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

1 participant