-
Notifications
You must be signed in to change notification settings - Fork 62
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
[DRAFT] Experimental planner and physical plan evaluator #582
Conversation
…s and variable resolution. SIM: https://i.amazon.com/PENNING-385 cr: https://code.amazon.com/reviews/CR-64923512
Mostly, this involved deleting code related to nodes present in PartiqlAst but not PartiqlPhysical.
…ial list of expected failures.
3100+ failing unit tests though, to be expected for the time being.
Fixes ~500 tests.
Previously, build times were impact 10-30 seconds during IDE builds, hampering developer productivitiy. The following changes in this commit should significantly improve the IDE experience: - Use PIG snapshot (which splits output into multiple files), - Move pig output to build folder, - Set up task dependencies correctly in gradle to avoid needlessly regenerating & recompiling the PIG-generated files.
(needed dynamicId support because most CROSS JOIN tests uses dynamic resolution of variables)
These are to be implemented after this CR.
…easier to read code.
…to physical-plan-compiler
…iler for regular expressions to PhysicalExprToThunkConverterImpl.
…riables sub-nodes
…of adding merge_struct expression
@dlurton - I know this is a draft, but I wanted to check in and see how you'd like this to be reviewed. You indicate above that a good portion of the PR is noise and has merge commits. Should we have this cleanly re-based so that the merge commits are not noise? Are you already planning to do that as a prerequisite? Are there features this relies on that has not been merged? You also point out that a third of it is a duplicated an modified evaluating compiler--should that just be a separate PR on its own (probably dependent on this one)? Even your changes to the Unit tests might be better factored into another PR. Just trying to get some context here for myself or other potential reviewers--I think it might be helpful in the interest of making it easier for you to get these changes merged. cc: @jpschorr or @am357 as FYI, wouldn't mind any thoughts you might have on this PR. |
Split Into Smaller PRs:
Original text follows
This PR introduces a nascent physical plan evaluator and extremely minimal query planner as a new API, leaving the old AST evaluator intact. This allows customers to switch between them at runtime, providing a migration path.
This does not yet support the PartiQL features listed below. These will need to be supported before this work can be considered a complete replacement for the legacy AST evaluator:
If a customer depends on any of these features today, they will not be able to migrate to the new planner and evaluator until it does.
At some point we'll also have to think about doing static type checking / inference on the resolved logical plan (
partiql_logical_resolved
PIG domain) instead of on the AST (partiql_ast
). Although this is not strictly mandatory for the short term because the existing static type checker can work on the AST.Key Components to be Reviewed
lang/resources/org/partiql/type-domains/partiql.ion
, which was modified to define the logical and physical plans as permutations ofpartiql_ast
.org.partiql.lang.planner
package, which contains a very minimal query planner that currently only parses a PartiQL query, converts to a logical plan, resolves variables, and converts to a physical plan)org.partiql.eval.physical
package, which contains the physical plan evaluator.org.partiql.lang.eval.evaluatortestframework
, which has changes to allow all evaluation unit tests to be executed under planner & plan evaluator in addition to the old AST evaluator.Tasks before this can be merged (now completed):
version
number. i.e:plan
node.)dynamic_id
a function instead of a node.struct
constructor, to support SELECT-list projections.By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.