Added some rules and generated Calcite codes for them#10
Merged
Sicheng-Pan merged 2 commits intoqed-solver:dslfrom May 7, 2025
Merged
Added some rules and generated Calcite codes for them#10Sicheng-Pan merged 2 commits intoqed-solver:dslfrom
Sicheng-Pan merged 2 commits intoqed-solver:dslfrom
Conversation
…terTranspose UnionMerge
…oinFilterTranspose UnionMerge
Collaborator
|
Looks good. Have you tried to verify your rules with the prover? |
Sicheng-Pan
approved these changes
May 3, 2025
Collaborator
Author
Yes. They are provable. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
I added the rules of UnionMerge, IntersectMerge, JoinExtractFilter, SemiJoinFilterTranspose, and FilterSetOpTranspose in RRuleInstance.java.
For now, the set operation in FilterSetOpTranspose is supposed to be a union operation. Maybe it can later be extended to include an intersection operation and become a rule family. By the way, it seems we don't support generating and applying Java code for a rule family currently.
I implemented some onMatch rules and transform rules in CalciteGenerator.java so that Java code can be generated for these five rules. These five rules can work correctly by testing them in CalciteTest.java.
After implementing these onMatch and transform rules, Java code can also be generated for some other rules. However, some of these rules cannot work correctly, and I am still looking for the reasons.
I also noticed that some rules, like ProjectMerge, FilterReduceFalse, and FilterReduceTrue, might be automatically optimized by the RuleBuilder. I have commented out the code for testing them in CalciteTest.java.