[test](mtmv) Add materialized view availability regression test (#30769)

Add materialized view availability regression test

when mv refresh_time is in the grace_period(unit is second), materialized view will be use to
query rewrite regardless of the base table is update or not
when mv refresh_time is out of the grace_period(unit is second), will check the base table is update or not
if update the materialized view will not be used to query rewrite
This commit is contained in:
seawinde
2024-02-04 14:39:17 +08:00
committed by yiguolei
parent 9e76592297
commit ccbcf879b5
11 changed files with 831 additions and 415 deletions

View File

@ -177,8 +177,9 @@ public class StructInfo {
nodePlan.accept(RELATION_COLLECTOR, nodeRelations);
relationBuilder.addAll(nodeRelations);
// every node should only have one relation, this is for LogicalCompatibilityContext
relationIdStructInfoNodeMap.put(nodeRelations.get(0).getRelationId(), (StructInfoNode) node);
if (!nodeRelations.isEmpty()) {
relationIdStructInfoNodeMap.put(nodeRelations.get(0).getRelationId(), (StructInfoNode) node);
}
// record expressions in node
if (structInfoNode.getExpressions() != null) {
structInfoNode.getExpressions().forEach(expression -> {