The meta-answer: I would use ‘git log’ and identify commit that modify both 
RelOptRulesTest.java and also at least one .iq file.

I don’t think there’s a way to selectively enable a planner rule in a .iq file. 
I don’t know if there is a way to add such a mechanism which is reasonably 
simple for people to understand.

If the rule is added to the standard set of rules then it’s easy to use the 
rule in a Quidem test. I haven’t thought about whether this rule should be in 
the standard rule set.

Julian


> On Aug 28, 2023, at 5:36 AM, LakeShen <[email protected]> wrote:
> 
> Hi Community,
> 
> Now I have created the CALCITE-5889 and have added the MinusToDistinctRule,I
> want to test the correctness of my optimization rules in quidem,but I
> didn't find any unit test that I could refer to. Could the community give
> me some help?
> 
> Usually, we finished the optimization rules, we could add the unit test in
> RelOptRulesTest , and then in RelOptRulesTest.xml file, we need add the
> expected results of the plan.If we could add end-to-end testing to our
> optimization rules, we could ensure that our rules are correct.
> 
> Best,
> LakeShen

Reply via email to