asereda-gs commented on a change in pull request #2531:
URL: https://github.com/apache/calcite/pull/2531#discussion_r714380726
##########
File path:
core/src/main/java/org/apache/calcite/rel/rules/materialize/MaterializedViewOnlyAggregateRule.java
##########
@@ -69,18 +72,25 @@ public MaterializedViewOnlyAggregateRule(RelOptRuleOperand
operand,
}
/** Rule configuration. */
- public interface Config extends MaterializedViewAggregateRule.Config {
- Config DEFAULT = create(RelFactories.LOGICAL_BUILDER);
+ @Value.Immutable
+ public interface Config extends MaterializedViewAggregateRule.Config<Config>
{
+ Config DEFAULT =
ImmutableMaterializedViewOnlyAggregateRule.Config.builder()
+ .withRelBuilderFactory(RelFactories.LOGICAL_BUILDER)
+ .withGenerateUnionRewriting(true)
+ .withUnionRewritingPullProgram(null)
+ .withFastBailOut(false)
+ .build();
static Config create(RelBuilderFactory relBuilderFactory) {
- return MaterializedViewAggregateRule.Config.create(relBuilderFactory)
+
+ return ImmutableMaterializedViewOnlyAggregateRule.Config.builder()
Review comment:
You can also do build from `DEFAULT` instance:
```java
ImmutableMaterializedViewOnlyAggregateRule.Config.builder()
.from(DEFAULT)
.withRelBuilderFactory(relBuilderFactory)
.withOperandSupplier(b -> b.operand(Aggregate.class).anyInputs())
.withDescription("MaterializedViewAggregateRule(Aggregate)")
.build();
```
--
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]