[fix](nereids) the project node is lost when creating PhysicalStorageLayerAggregate node (#15467)
This commit is contained in:
@ -284,10 +284,16 @@ public class AggregateStrategies implements ImplementationRuleFactory {
|
||||
.build()
|
||||
.transform(olapScan, cascadesContext)
|
||||
.get(0);
|
||||
|
||||
return aggregate.withChildren(ImmutableList.of(
|
||||
new PhysicalStorageLayerAggregate(physicalOlapScan, mergeOp)
|
||||
));
|
||||
if (project != null) {
|
||||
return aggregate.withChildren(ImmutableList.of(
|
||||
project.withChildren(
|
||||
ImmutableList.of(new PhysicalStorageLayerAggregate(physicalOlapScan, mergeOp)))
|
||||
));
|
||||
} else {
|
||||
return aggregate.withChildren(ImmutableList.of(
|
||||
new PhysicalStorageLayerAggregate(physicalOlapScan, mergeOp)
|
||||
));
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@ -120,7 +120,9 @@ public class PhysicalStorageLayerAggregateTest implements GeneratedPatterns {
|
||||
.applyImplementation(storageLayerAggregateWithProject())
|
||||
.matches(
|
||||
logicalAggregate(
|
||||
physicalStorageLayerAggregate().when(agg -> agg.getAggOp() == PushDownAggOp.MIN_MAX)
|
||||
logicalProject(
|
||||
physicalStorageLayerAggregate().when(agg -> agg.getAggOp() == PushDownAggOp.MIN_MAX)
|
||||
)
|
||||
)
|
||||
);
|
||||
|
||||
@ -135,7 +137,9 @@ public class PhysicalStorageLayerAggregateTest implements GeneratedPatterns {
|
||||
.applyImplementation(storageLayerAggregateWithProject())
|
||||
.matches(
|
||||
logicalAggregate(
|
||||
physicalStorageLayerAggregate().when(agg -> agg.getAggOp() == PushDownAggOp.COUNT)
|
||||
logicalProject(
|
||||
physicalStorageLayerAggregate().when(agg -> agg.getAggOp() == PushDownAggOp.COUNT)
|
||||
)
|
||||
)
|
||||
);
|
||||
|
||||
@ -152,7 +156,9 @@ public class PhysicalStorageLayerAggregateTest implements GeneratedPatterns {
|
||||
.applyImplementation(storageLayerAggregateWithProject())
|
||||
.matches(
|
||||
logicalAggregate(
|
||||
physicalStorageLayerAggregate().when(agg -> agg.getAggOp() == PushDownAggOp.MIX)
|
||||
logicalProject(
|
||||
physicalStorageLayerAggregate().when(agg -> agg.getAggOp() == PushDownAggOp.MIX)
|
||||
)
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user