walterddr commented on code in PR #10409:
URL: https://github.com/apache/pinot/pull/10409#discussion_r1134898155
##########
pinot-query-planner/src/main/java/org/apache/pinot/query/QueryEnvironment.java:
##########
@@ -110,12 +109,23 @@ public QueryEnvironment(TypeFactory typeFactory,
CalciteSchema rootSchema, Worke
.addRelBuilderConfigTransform(c -> c.withAggregateUnique(true)))
.build();
- // optimizer rules
- _logicalRuleSet = PinotQueryRuleSets.LOGICAL_OPT_RULES;
-
- // optimizer
HepProgramBuilder hepProgramBuilder = new HepProgramBuilder();
- for (RelOptRule relOptRule : _logicalRuleSet) {
+ // Set the match order as DEPTH_FIRST. The default is arbitrary which
works the same as DEPTH_FIRST, but it's
+ // best to be explicit.
+ hepProgramBuilder.addMatchOrder(HepMatchOrder.DEPTH_FIRST);
+ // First run the basic rules using 1 HepInstruction per rule.
+ for (RelOptRule relOptRule : PinotQueryRuleSets.BASIC_RULES) {
+ hepProgramBuilder.addRuleInstance(relOptRule);
+ }
Review Comment:
why do we need 1 HelpInstruction per rule?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]