-
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
[V1] Address 1.0 partiql-plan feedback and cleanup #1665
Conversation
Rel ABCs done, moving on to Rex. Have lots of cleanup for builders and compiler, still draft. |
need rebase on #1658 |
beb149e
to
0e10601
Compare
dcdc719
to
81f5eca
Compare
CROSS-ENGINE-REPORT ❌
Testing Details
Result Details
Now FAILING Tests ❌The following 3 test(s) were previously PASSING in BASE but are now FAILING in TARGET: Click here to see
Now IGNORED Tests ❌The complete list can be found in GitHub CI summary, either from Step Summary or in the Artifact. Now Passing Tests180 test(s) were previously failing in BASE (LEGACY-V0.14.8) but now pass in TARGET (EVAL-BF9E86B). Before merging, confirm they are intended to pass. The complete list can be found in GitHub CI summary, either from Step Summary or in the Artifact. CROSS-COMMIT-REPORT ✅
Testing DetailsResult Details
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I still have some files left to review, but getting the review out quicker to allow you to address feedback sooner.
docs/wiki/documentation/Numeric Data Type & Arithmetic Operations.md
Outdated
Show resolved
Hide resolved
@NotNull | ||
@Override | ||
protected final List<Operator> operands() { | ||
Rel c0 = getInput(); | ||
return List.of(c0); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What I'm trying to figure out here is how this will play with the compilation process of strategies and matches. I know the issue you cut (#1664) mentions groups, but the Measures also have references to Rex's. This is also related to RexStruct
, among other scenarios I encountered while reviewing.
Personally, I'm not opposed to passing a reference of the compiler to a strategy. Especially since we might also want to pass the execution mode (since we want to write our own strategies for some of the relations that have special handling for permissive mode). Or, allowing matches to hold general PlanNodes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am trying to make the distinction between operands and arguments clear. For this example (RelAgggregate) the input relation is the only operand and the measures are an argument. A pattern matches operand trees, but a particular node match can define custom predicate logic on any arguments.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, the main reason I bring it up has to do with where getOperands()
is used, namely within the whole compilation strategies approach. If someone were to write a strategy for this RelAggregate, they'd have access to the compiled input in the operand tree. But, the Measures are arguments in this scenario, and thus aren't compiled, even though they contain plan Rex's (not compiled). Hence, they can't be used.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Passing a compiler reference is easy enough
partiql-plan/src/main/java/org/partiql/plan/rel/RelAggregate.java
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Minor comments/questions remaining. Once addressed, I can approve.
Issue
#1661
Description
This PR address a number of issues to (mostly) complete the 1.0 plan implementation. It includes,
Design
For the rule and strategy patterns to work, we need to model classes whose operands have a stable ordering;
so we have defined an abstract base class for all operators which holds operands and controls the access to them.
We use base implementations for state management and enforcing operands ordering; however we use interfaces for the
top-level of each domain. The abstract bases can be extended, and the operator/rel/rex interfaces can be implemented
directly.
What are operands?
Why interfaces for top-level domain entities and not abstract base classes?
Why abstract base classes for individual operators and not interfaces?
License Information
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.