diff --git a/fe/fe-core/src/main/java/org/apache/doris/nereids/jobs/joinorder/hypergraph/edge/Edge.java b/fe/fe-core/src/main/java/org/apache/doris/nereids/jobs/joinorder/hypergraph/edge/Edge.java index 599511302a72fe..35694169498870 100644 --- a/fe/fe-core/src/main/java/org/apache/doris/nereids/jobs/joinorder/hypergraph/edge/Edge.java +++ b/fe/fe-core/src/main/java/org/apache/doris/nereids/jobs/joinorder/hypergraph/edge/Edge.java @@ -225,10 +225,6 @@ public String getTypeName() { @Override public String toString() { - if (!leftRejectEdges.isEmpty() || !rightRejectEdges.isEmpty()) { - return String.format("<%s --%s-- %s>[%s , %s]", LongBitmap.toString(leftExtendedNodes), - this.getTypeName(), LongBitmap.toString(rightExtendedNodes), leftRejectEdges, rightRejectEdges); - } return String.format("<%s --%s-- %s>", LongBitmap.toString(leftExtendedNodes), this.getTypeName(), LongBitmap.toString(rightExtendedNodes)); } diff --git a/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/exploration/mv/AbstractMaterializedViewRule.java b/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/exploration/mv/AbstractMaterializedViewRule.java index 60b5c58d4c50df..8e9ef1eaa97b7a 100644 --- a/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/exploration/mv/AbstractMaterializedViewRule.java +++ b/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/exploration/mv/AbstractMaterializedViewRule.java @@ -234,7 +234,7 @@ protected List doRewrite(StructInfo queryStructInfo, CascadesContext casca continue; } Plan rewrittenPlan; - Plan mvScan = materializationContext.getScanPlan(queryStructInfo); + Plan mvScan = materializationContext.getScanPlan(queryStructInfo, cascadesContext); Plan queryPlan = queryStructInfo.getTopPlan(); if (compensatePredicates.isAlwaysTrue()) { rewrittenPlan = mvScan; @@ -262,12 +262,6 @@ protected List doRewrite(StructInfo queryStructInfo, CascadesContext casca // Rewrite query by view rewrittenPlan = rewriteQueryByView(matchMode, queryStructInfo, viewStructInfo, viewToQuerySlotMapping, rewrittenPlan, materializationContext, cascadesContext); - // If rewrite successfully, try to get mv read lock to avoid data inconsistent, - // try to get lock which should added before RBO - if (materializationContext instanceof AsyncMaterializationContext && !materializationContext.isSuccess()) { - cascadesContext.getStatementContext() - .addTableReadLock(((AsyncMaterializationContext) materializationContext).getMtmv()); - } rewrittenPlan = MaterializedViewUtils.rewriteByRules(cascadesContext, childContext -> { Rewriter.getWholeTreeRewriter(childContext).execute(); @@ -379,9 +373,9 @@ protected List doRewrite(StructInfo queryStructInfo, CascadesContext casca } trySetStatistics(materializationContext, cascadesContext); rewriteResults.add(rewrittenPlan); - // if rewrite successfully, try to regenerate mv scan because it maybe used again - materializationContext.tryReGenerateScanPlan(cascadesContext); recordIfRewritten(queryStructInfo.getOriginalPlan(), materializationContext, cascadesContext); + // If rewrite successfully, try to clear mv scan currently because it maybe used again + materializationContext.clearScanPlan(cascadesContext); } return rewriteResults; } diff --git a/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/exploration/mv/AsyncMaterializationContext.java b/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/exploration/mv/AsyncMaterializationContext.java index 0d88672fed64de..96d37ad546a7b4 100644 --- a/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/exploration/mv/AsyncMaterializationContext.java +++ b/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/exploration/mv/AsyncMaterializationContext.java @@ -57,9 +57,7 @@ public class AsyncMaterializationContext extends MaterializationContext { */ public AsyncMaterializationContext(MTMV mtmv, Plan mvPlan, Plan mvOriginalPlan, List baseTables, List
baseViews, CascadesContext cascadesContext, StructInfo structInfo) { - super(mvPlan, mvOriginalPlan, MaterializedViewUtils.generateMvScanPlan(mtmv, mtmv.getBaseIndexId(), - mtmv.getPartitionIds(), PreAggStatus.on(), cascadesContext), - cascadesContext, structInfo); + super(mvPlan, mvOriginalPlan, cascadesContext, structInfo); this.mtmv = mtmv; } @@ -110,7 +108,7 @@ public Optional> getPlanStatistics(CascadesContext cascades return Optional.empty(); } RelationId relationId = null; - Optional logicalOlapScan = this.getScanPlan(null) + Optional logicalOlapScan = this.getScanPlan(null, cascadesContext) .collectFirst(LogicalOlapScan.class::isInstance); if (logicalOlapScan.isPresent()) { relationId = logicalOlapScan.get().getRelationId(); @@ -132,7 +130,13 @@ boolean isFinalChosen(Relation relation) { } @Override - public Plan getScanPlan(StructInfo queryInfo) { + public Plan getScanPlan(StructInfo queryInfo, CascadesContext cascadesContext) { + // If try to get scan plan or rewrite successfully, try to get mv read lock to avoid meta data inconsistent, + // try to get lock which should added before RBO + if (!this.isSuccess()) { + cascadesContext.getStatementContext().addTableReadLock(this.getMtmv()); + } + super.getScanPlan(queryInfo, cascadesContext); return scanPlan; } diff --git a/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/exploration/mv/HyperGraphComparator.java b/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/exploration/mv/HyperGraphComparator.java index 42dd4b59da1956..868f97949c0705 100644 --- a/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/exploration/mv/HyperGraphComparator.java +++ b/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/exploration/mv/HyperGraphComparator.java @@ -455,7 +455,9 @@ private boolean compareEdgeWithNode(Edge query, Edge view) { if (query instanceof FilterEdge && view instanceof FilterEdge) { return compareFilterEdgeWithNode((FilterEdge) query, viewFilterEdgesAfterInferring.get(view.getIndex())); } else if (query instanceof JoinEdge && view instanceof JoinEdge) { - return compareJoinEdgeWithNode((JoinEdge) query, viewJoinEdgesAfterInferring.get(view.getIndex())); + // compare original or inferred join edge + return compareJoinEdgeWithNode((JoinEdge) query, viewJoinEdgesAfterInferring.get(view.getIndex())) + || compareJoinEdgeWithNode((JoinEdge) query, (JoinEdge) view); } return false; } diff --git a/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/exploration/mv/MaterializationContext.java b/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/exploration/mv/MaterializationContext.java index df535d59d87399..38eba2ac3406ff 100644 --- a/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/exploration/mv/MaterializationContext.java +++ b/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/exploration/mv/MaterializationContext.java @@ -105,22 +105,13 @@ public abstract class MaterializationContext { /** * MaterializationContext, this contains necessary info for query rewriting by materialization */ - public MaterializationContext(Plan plan, Plan originalPlan, Plan scanPlan, + public MaterializationContext(Plan plan, Plan originalPlan, CascadesContext cascadesContext, StructInfo structInfo) { this.plan = plan; this.originalPlan = originalPlan; - this.scanPlan = scanPlan; - StatementBase parsedStatement = cascadesContext.getStatementContext().getParsedStatement(); this.enableRecordFailureDetail = parsedStatement != null && parsedStatement.isExplain() && ExplainLevel.MEMO_PLAN == parsedStatement.getExplainOptions().getExplainLevel(); - List originalPlanOutput = originalPlan.getOutput(); - List scanPlanOutput = this.scanPlan.getOutput(); - if (originalPlanOutput.size() == scanPlanOutput.size()) { - for (int slotIndex = 0; slotIndex < originalPlanOutput.size(); slotIndex++) { - this.exprToScanExprMapping.put(originalPlanOutput.get(slotIndex), scanPlanOutput.get(slotIndex)); - } - } // Construct materialization struct info, catch exception which may cause planner roll back this.structInfo = structInfo == null ? constructStructInfo(plan, originalPlan, cascadesContext, new BitSet()).orElseGet(() -> null) @@ -128,10 +119,6 @@ public MaterializationContext(Plan plan, Plan originalPlan, Plan scanPlan, this.available = this.structInfo != null; if (available) { this.planOutputShuttledExpressions = this.structInfo.getPlanOutputShuttledExpressions(); - // materialization output expression shuttle, this will be used to expression rewrite - this.shuttledExprToScanExprMapping = ExpressionMapping.generate( - this.planOutputShuttledExpressions, - scanPlanOutput); } } @@ -176,17 +163,19 @@ public void addMatchedGroup(GroupId groupId, boolean rewriteSuccess) { * if MaterializationContext is already rewritten successfully, then should generate new scan plan in later * query rewrite, because one plan may hit the materialized view repeatedly and the materialization scan output * should be different. - * This method should be called when query rewrite successfully */ - public void tryReGenerateScanPlan(CascadesContext cascadesContext) { + public void tryGenerateScanPlan(CascadesContext cascadesContext) { + if (!this.isAvailable()) { + return; + } this.scanPlan = doGenerateScanPlan(cascadesContext); - // materialization output expression shuttle, this will be used to expression rewrite - this.shuttledExprToScanExprMapping = ExpressionMapping.generate( - this.planOutputShuttledExpressions, - this.scanPlan.getOutput()); + // Materialization output expression shuttle, this will be used to expression rewrite + List scanPlanOutput = this.scanPlan.getOutput(); + this.shuttledExprToScanExprMapping = ExpressionMapping.generate(this.planOutputShuttledExpressions, + scanPlanOutput); + // This is used by normalize statistics column expression Map regeneratedMapping = new HashMap<>(); List originalPlanOutput = originalPlan.getOutput(); - List scanPlanOutput = this.scanPlan.getOutput(); if (originalPlanOutput.size() == scanPlanOutput.size()) { for (int slotIndex = 0; slotIndex < originalPlanOutput.size(); slotIndex++) { regeneratedMapping.put(originalPlanOutput.get(slotIndex), scanPlanOutput.get(slotIndex)); @@ -195,6 +184,17 @@ public void tryReGenerateScanPlan(CascadesContext cascadesContext) { this.exprToScanExprMapping = regeneratedMapping; } + /** + * Should clear scan plan after materializationContext is already rewritten successfully, + * Because one plan may hit the materialized view repeatedly and the materialization scan output + * should be different. + */ + public void clearScanPlan(CascadesContext cascadesContext) { + this.scanPlan = null; + this.shuttledExprToScanExprMapping = null; + this.exprToScanExprMapping = null; + } + public void addSlotMappingToCache(RelationMapping relationMapping, SlotMapping slotMapping) { queryToMaterializationSlotMappingCache.put(relationMapping, slotMapping); } @@ -275,7 +275,11 @@ public Plan getOriginalPlan() { return originalPlan; } - public Plan getScanPlan(StructInfo queryStructInfo) { + public Plan getScanPlan(StructInfo queryStructInfo, CascadesContext cascadesContext) { + if (this.scanPlan == null || this.shuttledExprToScanExprMapping == null + || this.exprToScanExprMapping == null) { + tryGenerateScanPlan(cascadesContext); + } return scanPlan; } diff --git a/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/exploration/mv/StructInfo.java b/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/exploration/mv/StructInfo.java index fa29d4d0e123be..526ec7030d2db5 100644 --- a/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/exploration/mv/StructInfo.java +++ b/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/exploration/mv/StructInfo.java @@ -210,28 +210,25 @@ private static boolean collectStructInfoFromGraph(HyperGraph hyperGraph, }); // Collect expression from join condition in hyper graph for (JoinEdge edge : hyperGraph.getJoinEdges()) { - List hashJoinConjuncts = edge.getHashJoinConjuncts(); + List joinConjunctExpressions = edge.getExpressions(); // shuttle expression in edge for the build of LogicalCompatibilityContext later. // Record the exprId to expr map in the processing to strut info // TODO get exprId to expr map when complex project is ready in join dege - hashJoinConjuncts.forEach(conjunctExpr -> { - ExpressionLineageReplacer.ExpressionReplaceContext replaceContext = - new ExpressionLineageReplacer.ExpressionReplaceContext( - Lists.newArrayList(conjunctExpr), ImmutableSet.of(), - ImmutableSet.of(), new BitSet()); - topPlan.accept(ExpressionLineageReplacer.INSTANCE, replaceContext); - // Replace expressions by expression map - List replacedExpressions = replaceContext.getReplacedExpressions(); + ExpressionLineageReplacer.ExpressionReplaceContext replaceContext = + new ExpressionLineageReplacer.ExpressionReplaceContext( + joinConjunctExpressions.stream().map(expr -> (Expression) expr) + .collect(Collectors.toList()), + ImmutableSet.of(), ImmutableSet.of(), new BitSet()); + topPlan.accept(ExpressionLineageReplacer.INSTANCE, replaceContext); + // Replace expressions by expression map + List replacedExpressions = replaceContext.getReplacedExpressions(); + for (int i = 0; i < replacedExpressions.size(); i++) { putShuttledExpressionsToExpressionsMap(shuttledExpressionsToExpressionsMap, - ExpressionPosition.JOIN_EDGE, replacedExpressions.get(0), conjunctExpr); - // Record this, will be used in top level expression shuttle later, see the method - // ExpressionLineageReplacer#visitGroupPlan - namedExprIdAndExprMapping.putAll(replaceContext.getExprIdExpressionMap()); - }); - List otherJoinConjuncts = edge.getOtherJoinConjuncts(); - if (!otherJoinConjuncts.isEmpty()) { - return false; + ExpressionPosition.JOIN_EDGE, replacedExpressions.get(i), joinConjunctExpressions.get(i)); } + // Record this, will be used in top level expression shuttle later, see the method + // ExpressionLineageReplacer#visitGroupPlan + namedExprIdAndExprMapping.putAll(replaceContext.getExprIdExpressionMap()); } // Collect expression from where in hyper graph hyperGraph.getFilterEdges().forEach(filterEdge -> { @@ -621,9 +618,6 @@ public Boolean visitLogicalJoin(LogicalJoin join if (!checkContext.getSupportJoinTypes().contains(join.getJoinType())) { return false; } - if (!join.getOtherJoinConjuncts().isEmpty()) { - return false; - } return visit(join, checkContext); } diff --git a/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/exploration/mv/SyncMaterializationContext.java b/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/exploration/mv/SyncMaterializationContext.java index 47b01385ac1646..e27b3d5174391f 100644 --- a/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/exploration/mv/SyncMaterializationContext.java +++ b/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/exploration/mv/SyncMaterializationContext.java @@ -25,6 +25,7 @@ import org.apache.doris.nereids.trees.plans.Plan; import org.apache.doris.nereids.trees.plans.PreAggStatus; import org.apache.doris.nereids.trees.plans.RelationId; +import org.apache.doris.nereids.trees.plans.algebra.CatalogRelation; import org.apache.doris.nereids.trees.plans.algebra.Relation; import org.apache.doris.nereids.trees.plans.logical.LogicalOlapScan; import org.apache.doris.nereids.trees.plans.physical.PhysicalOlapScan; @@ -55,9 +56,7 @@ public class SyncMaterializationContext extends MaterializationContext { */ public SyncMaterializationContext(Plan mvPlan, Plan mvOriginalPlan, OlapTable olapTable, long indexId, String indexName, CascadesContext cascadesContext, Statistics statistics) { - super(mvPlan, mvOriginalPlan, - MaterializedViewUtils.generateMvScanPlan(olapTable, indexId, olapTable.getPartitionIds(), - PreAggStatus.unset(), cascadesContext), cascadesContext, null); + super(mvPlan, mvOriginalPlan, cascadesContext, null); this.olapTable = olapTable; this.indexId = indexId; this.indexName = indexName; @@ -100,7 +99,7 @@ String getStringInfo() { @Override Optional> getPlanStatistics(CascadesContext cascadesContext) { RelationId relationId = null; - Optional scanObj = this.getScanPlan(null) + Optional scanObj = this.getScanPlan(null, cascadesContext) .collectFirst(LogicalOlapScan.class::isInstance); if (scanObj.isPresent()) { relationId = scanObj.get().getRelationId(); @@ -109,19 +108,27 @@ Optional> getPlanStatistics(CascadesContext cascadesContext } @Override - public Plan getScanPlan(StructInfo queryStructInfo) { + public Plan getScanPlan(StructInfo queryStructInfo, CascadesContext cascadesContext) { + // Already get lock if sync mv, doesn't need to get lock + super.getScanPlan(queryStructInfo, cascadesContext); if (queryStructInfo == null) { return scanPlan; } - if (queryStructInfo.getRelations().size() == 1 - && queryStructInfo.getRelations().get(0) instanceof LogicalOlapScan - && !((LogicalOlapScan) queryStructInfo.getRelations().get(0)).getSelectedPartitionIds().isEmpty()) { + List queryStructInfoRelations = queryStructInfo.getRelations(); + if (queryStructInfoRelations.size() == 1 + && queryStructInfoRelations.get(0) instanceof LogicalOlapScan + && !((LogicalOlapScan) queryStructInfoRelations.get(0)).getSelectedPartitionIds().isEmpty()) { // Partition prune if sync materialized view return scanPlan.accept(new DefaultPlanRewriter() { @Override public Plan visitLogicalOlapScan(LogicalOlapScan olapScan, Void context) { + if (!queryStructInfoRelations.get(0).getTable().getFullQualifiers().equals( + olapScan.getTable().getFullQualifiers())) { + // Only the same table, we can do partition prue + return olapScan; + } return olapScan.withSelectedPartitionIds( - ((LogicalOlapScan) queryStructInfo.getRelations().get(0)).getSelectedPartitionIds()); + ((LogicalOlapScan) queryStructInfoRelations.get(0)).getSelectedPartitionIds()); } }, null); } diff --git a/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/exploration/mv/mapping/RelationMapping.java b/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/exploration/mv/mapping/RelationMapping.java index 42d4cd59b0d6cd..d71e128e9f166d 100644 --- a/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/exploration/mv/mapping/RelationMapping.java +++ b/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/exploration/mv/mapping/RelationMapping.java @@ -29,9 +29,9 @@ import com.google.common.collect.ImmutableBiMap.Builder; import com.google.common.collect.ImmutableList; import com.google.common.collect.Lists; -import com.google.common.collect.Sets; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; import java.util.Objects; import java.util.Set; @@ -92,39 +92,25 @@ public static List generate(List sources, List } // relation appear more than once, should cartesian them and power set to correct combination // if query is select * from tableA0, tableA1, materialized view is select * from tableA2, tableA3, - // tableA is the same table used by both query and materialized view - // relationMapping will be - // tableA0 tableA2 - // tableA0 tableA3 - // tableA1 tableA2 - // tableA1 tableA3 - ImmutableList> relationMapping = Sets.cartesianProduct( - sourceMappedRelations, targetMappedRelations) - .stream() - .map(listPair -> Pair.of(listPair.get(0), listPair.get(1))) - .collect(ImmutableList.toImmutableList()); - - // the mapping in relationMappingPowerList should be bi-direction + // the relationMappingPowerList in relationMappingPowerList should be bi-direction // [ - // {tableA0 tableA2, tableA1 tableA3} - // {tableA0 tableA3, tableA1 tableA2} + // {tableA0 -> tableA2, tableA1 -> tableA3} + // {tableA0 -> tableA3, tableA1 -> tableA2} // ] + // query is select * from tableA0, tableA1, tableA4 List> relationMappingPowerList = new ArrayList<>(); - int relationMappingSize = relationMapping.size(); - int relationMappingMinSize = Math.min(sourceMappedRelations.size(), targetMappedRelations.size()); - for (int i = 0; i < relationMappingSize; i++) { - HashBiMap relationBiMap = HashBiMap.create(); - relationBiMap.put(relationMapping.get(i).key(), relationMapping.get(i).value()); - for (int j = i + 1; j < relationMappingSize; j++) { - if (!relationBiMap.containsKey(relationMapping.get(j).key()) - && !relationBiMap.containsValue(relationMapping.get(j).value())) { - relationBiMap.put(relationMapping.get(j).key(), relationMapping.get(j).value()); - } - } - // mapping should contain min num of relation in source or target at least - if (relationBiMap.size() >= relationMappingMinSize) { - relationMappingPowerList.add(relationBiMap); + List> combinations = getUniquePermutation( + sourceMappedRelations.toArray(sourceMappedRelations.toArray(new MappedRelation[0])), + targetMappedRelations.toArray(new MappedRelation[0])); + for (Pair combination : combinations) { + BiMap combinationBiMap = HashBiMap.create(); + MappedRelation[] key = combination.key(); + MappedRelation[] value = combination.value(); + int length = Math.min(key.length, value.length); + for (int i = 0; i < length; i++) { + combinationBiMap.put(key[i], value[i]); } + relationMappingPowerList.add(combinationBiMap); } mappedRelations.add(relationMappingPowerList); } @@ -167,4 +153,58 @@ public boolean equals(Object o) { public int hashCode() { return Objects.hash(mappedRelationMap); } + + /** + * Permutation and remove duplicated element + * For example: + * Given [1, 4, 5] and [191, 194, 195] + * This would return + * [ + * [(1, 191) (4, 194) (5, 195)], + * [(1, 191) (4, 195) (5, 194)], + * [(1, 194) (4, 191) (5, 195)], + * [(1, 194) (4, 195) (5, 191)], + * [(1, 195) (4, 191) (5, 194)], + * [(1, 195) (4, 194) (5, 191)] + * ] + * */ + private static List> getUniquePermutation( + MappedRelation[] left, MappedRelation[] right) { + boolean needSwap = left.length > right.length; + if (needSwap) { + MappedRelation[] temp = left; + left = right; + right = temp; + } + + boolean[] used = new boolean[right.length]; + MappedRelation[] current = new MappedRelation[left.length]; + List> results = new ArrayList<>(); + backtrack(left, right, 0, used, current, results); + if (needSwap) { + List> tmpResults = results; + results = new ArrayList<>(); + for (Pair relation : tmpResults) { + results.add(Pair.of(relation.value(), relation.key())); + } + } + return results; + } + + private static void backtrack(MappedRelation[] left, MappedRelation[] right, int index, + boolean[] used, MappedRelation[] current, List> results) { + if (index == left.length) { + results.add(Pair.of(Arrays.copyOf(left, left.length), Arrays.copyOf(current, current.length))); + return; + } + + for (int i = 0; i < right.length; i++) { + if (!used[i]) { + used[i] = true; + current[index] = right[i]; + backtrack(left, right, index + 1, used, current, results); + used[i] = false; + } + } + } } diff --git a/fe/fe-core/src/test/java/org/apache/doris/nereids/mv/IdStatisticsMapTest.java b/fe/fe-core/src/test/java/org/apache/doris/nereids/mv/IdStatisticsMapTest.java index a4c05fa81e6d0c..0090982db00898 100644 --- a/fe/fe-core/src/test/java/org/apache/doris/nereids/mv/IdStatisticsMapTest.java +++ b/fe/fe-core/src/test/java/org/apache/doris/nereids/mv/IdStatisticsMapTest.java @@ -76,7 +76,7 @@ public boolean isMVPartitionValid(MTMV mtmv, ConnectContext ctx, boolean isMVPar .rewrite(); // scan plan output will be refreshed after mv rewrite successfully, so need tmp store Set materializationScanOutput = c1.getMaterializationContexts().get(0) - .getScanPlan(null).getOutputSet(); + .getScanPlan(null, c1).getOutputSet(); tmpPlanChecker .optimize() .printlnBestPlanTree(); diff --git a/fe/fe-core/src/test/java/org/apache/doris/nereids/rules/exploration/mv/MappingTest.java b/fe/fe-core/src/test/java/org/apache/doris/nereids/rules/exploration/mv/MappingTest.java index 4371b9f578594b..80c2873aed337b 100644 --- a/fe/fe-core/src/test/java/org/apache/doris/nereids/rules/exploration/mv/MappingTest.java +++ b/fe/fe-core/src/test/java/org/apache/doris/nereids/rules/exploration/mv/MappingTest.java @@ -33,7 +33,9 @@ import org.junit.jupiter.api.Test; import java.util.ArrayList; +import java.util.HashSet; import java.util.List; +import java.util.Set; /** * MappingTest @@ -343,6 +345,259 @@ public void testGenerateMapping5() { assertRelationMapping(generateRelationMapping.get(0), expectedRelationMapping, expectedSlotMapping); } + // Test more than two tables, and the same table num in source plan is equals to target plan + @Test + public void testGenerateMapping6() { + Plan sourcePlan = PlanChecker.from(connectContext) + .analyze("SELECT orders.*, l1.l_orderkey, l2.l_orderkey, l3.l_orderkey " + + "FROM\n" + + " orders,\n" + + " lineitem l1,\n" + + " lineitem l2,\n" + + " lineitem l3\n" + + "WHERE\n" + + " l1.l_orderkey = l2.l_orderkey and l1.l_orderkey = l3.l_orderkey\n" + + " AND l1.l_orderkey = o_orderkey") + .getPlan(); + + Plan targetPlan = PlanChecker.from(connectContext) + .analyze("SELECT orders.*, l1.l_orderkey, l2.l_orderkey, l3.l_orderkey " + + "FROM\n" + + " lineitem l1,\n" + + " orders,\n" + + " lineitem l2,\n" + + " lineitem l3\n" + + "WHERE\n" + + " l1.l_orderkey = l2.l_orderkey and l1.l_orderkey = l3.l_orderkey\n" + + " AND l2.l_orderkey = o_orderkey") + .getPlan(); + List sourceRelations = new ArrayList<>(); + sourcePlan.accept(RelationCollector.INSTANCE, sourceRelations); + + List targetRelations = new ArrayList<>(); + targetPlan.accept(RelationCollector.INSTANCE, targetRelations); + + List generateRelationMapping = RelationMapping.generate(sourceRelations, targetRelations); + Assertions.assertNotNull(generateRelationMapping); + Assertions.assertEquals(6, generateRelationMapping.size()); + + // expected table relation mapping is as following + // (1, 3), (2, 2), (3, 0), (0, 1) + // (1, 0), (2, 3), (3, 2), (0, 1) + // (1, 2), (2, 3), (3, 0), (0, 1) + // (1, 0), (2, 2), (3, 3), (0, 1) + // (1, 2), (2, 0), (3, 3), (0, 1) + // (1, 3), (2, 0), (3, 2), (0, 1) + Set> expectedRelationMappingSet = new HashSet<>(); + BiMap expectedRelationMapping = HashBiMap.create(); + expectedRelationMapping.put(new RelationId(1), new RelationId(3)); + expectedRelationMapping.put(new RelationId(2), new RelationId(2)); + expectedRelationMapping.put(new RelationId(3), new RelationId(0)); + expectedRelationMapping.put(new RelationId(0), new RelationId(1)); + expectedRelationMappingSet.add(expectedRelationMapping); + + expectedRelationMapping = HashBiMap.create(); + expectedRelationMapping.put(new RelationId(1), new RelationId(0)); + expectedRelationMapping.put(new RelationId(2), new RelationId(3)); + expectedRelationMapping.put(new RelationId(3), new RelationId(2)); + expectedRelationMapping.put(new RelationId(0), new RelationId(1)); + expectedRelationMappingSet.add(expectedRelationMapping); + + expectedRelationMapping = HashBiMap.create(); + expectedRelationMapping.put(new RelationId(1), new RelationId(2)); + expectedRelationMapping.put(new RelationId(2), new RelationId(3)); + expectedRelationMapping.put(new RelationId(3), new RelationId(0)); + expectedRelationMapping.put(new RelationId(0), new RelationId(1)); + expectedRelationMappingSet.add(expectedRelationMapping); + + expectedRelationMapping = HashBiMap.create(); + expectedRelationMapping.put(new RelationId(1), new RelationId(0)); + expectedRelationMapping.put(new RelationId(2), new RelationId(2)); + expectedRelationMapping.put(new RelationId(3), new RelationId(3)); + expectedRelationMapping.put(new RelationId(0), new RelationId(1)); + expectedRelationMappingSet.add(expectedRelationMapping); + + expectedRelationMapping = HashBiMap.create(); + expectedRelationMapping.put(new RelationId(1), new RelationId(2)); + expectedRelationMapping.put(new RelationId(2), new RelationId(0)); + expectedRelationMapping.put(new RelationId(3), new RelationId(3)); + expectedRelationMapping.put(new RelationId(0), new RelationId(1)); + expectedRelationMappingSet.add(expectedRelationMapping); + + expectedRelationMapping = HashBiMap.create(); + expectedRelationMapping.put(new RelationId(1), new RelationId(3)); + expectedRelationMapping.put(new RelationId(2), new RelationId(0)); + expectedRelationMapping.put(new RelationId(3), new RelationId(2)); + expectedRelationMapping.put(new RelationId(0), new RelationId(1)); + expectedRelationMappingSet.add(expectedRelationMapping); + + assertRelationMapping(new HashSet<>(generateRelationMapping), expectedRelationMappingSet); + } + + // Test more than two tables, and the same table num in source plan is less then the num of target plan + @Test + public void testGenerateMapping7() { + Plan sourcePlan = PlanChecker.from(connectContext) + .analyze("SELECT orders.*, l1.l_orderkey, l3.l_orderkey " + + "FROM\n" + + " orders,\n" + + " lineitem l1,\n" + + " lineitem l3\n" + + "WHERE\n" + + " l1.l_orderkey = l3.l_orderkey\n" + + " AND l1.l_orderkey = o_orderkey") + .getPlan(); + + Plan targetPlan = PlanChecker.from(connectContext) + .analyze("SELECT orders.*, l1.l_orderkey, l2.l_orderkey, l3.l_orderkey " + + "FROM\n" + + " lineitem l1,\n" + + " orders,\n" + + " lineitem l2,\n" + + " lineitem l3\n" + + "WHERE\n" + + " l1.l_orderkey = l2.l_orderkey and l1.l_orderkey = l3.l_orderkey\n" + + " AND l2.l_orderkey = o_orderkey") + .getPlan(); + List sourceRelations = new ArrayList<>(); + sourcePlan.accept(RelationCollector.INSTANCE, sourceRelations); + + List targetRelations = new ArrayList<>(); + targetPlan.accept(RelationCollector.INSTANCE, targetRelations); + + List generateRelationMapping = RelationMapping.generate(sourceRelations, targetRelations); + Assertions.assertNotNull(generateRelationMapping); + Assertions.assertEquals(6, generateRelationMapping.size()); + + // expected table relation mapping is as following + // (1, 2), (2, 0), (0, 1) + // (1, 2), (2, 3), (0, 1) + // (1, 0), (2, 2), (0, 1) + // (1, 0), (2, 3), (0, 1) + // (1, 3), (2, 0), (0, 1) + // (1, 3), (2, 2), (0, 1) + Set> expectedRelationMappingSet = new HashSet<>(); + BiMap expectedRelationMapping = HashBiMap.create(); + expectedRelationMapping.put(new RelationId(1), new RelationId(2)); + expectedRelationMapping.put(new RelationId(2), new RelationId(0)); + expectedRelationMapping.put(new RelationId(0), new RelationId(1)); + expectedRelationMappingSet.add(expectedRelationMapping); + + expectedRelationMapping = HashBiMap.create(); + expectedRelationMapping.put(new RelationId(1), new RelationId(2)); + expectedRelationMapping.put(new RelationId(2), new RelationId(3)); + expectedRelationMapping.put(new RelationId(0), new RelationId(1)); + expectedRelationMappingSet.add(expectedRelationMapping); + + expectedRelationMapping = HashBiMap.create(); + expectedRelationMapping.put(new RelationId(1), new RelationId(0)); + expectedRelationMapping.put(new RelationId(2), new RelationId(2)); + expectedRelationMapping.put(new RelationId(0), new RelationId(1)); + expectedRelationMappingSet.add(expectedRelationMapping); + + expectedRelationMapping = HashBiMap.create(); + expectedRelationMapping.put(new RelationId(1), new RelationId(0)); + expectedRelationMapping.put(new RelationId(2), new RelationId(3)); + expectedRelationMapping.put(new RelationId(0), new RelationId(1)); + expectedRelationMappingSet.add(expectedRelationMapping); + + expectedRelationMapping = HashBiMap.create(); + expectedRelationMapping.put(new RelationId(1), new RelationId(3)); + expectedRelationMapping.put(new RelationId(2), new RelationId(0)); + expectedRelationMapping.put(new RelationId(0), new RelationId(1)); + expectedRelationMappingSet.add(expectedRelationMapping); + + expectedRelationMapping = HashBiMap.create(); + expectedRelationMapping.put(new RelationId(1), new RelationId(3)); + expectedRelationMapping.put(new RelationId(2), new RelationId(2)); + expectedRelationMapping.put(new RelationId(0), new RelationId(1)); + expectedRelationMappingSet.add(expectedRelationMapping); + + assertRelationMapping(new HashSet<>(generateRelationMapping), expectedRelationMappingSet); + } + + // Test more than two tables, and the same table num in source plan is more then the num of target plan + @Test + public void testGenerateMapping8() { + Plan sourcePlan = PlanChecker.from(connectContext) + .analyze("SELECT orders.*, l1.l_orderkey, l2.l_orderkey, l3.l_orderkey " + + "FROM\n" + + " orders,\n" + + " lineitem l1,\n" + + " lineitem l2,\n" + + " lineitem l3\n" + + "WHERE\n" + + " l1.l_orderkey = l2.l_orderkey and l1.l_orderkey = l3.l_orderkey\n" + + " AND l1.l_orderkey = o_orderkey") + .getPlan(); + + Plan targetPlan = PlanChecker.from(connectContext) + .analyze("SELECT orders.*, l1.l_orderkey, l3.l_orderkey " + + "FROM\n" + + " lineitem l1,\n" + + " orders,\n" + + " lineitem l3\n" + + "WHERE\n" + + " l1.l_orderkey = l3.l_orderkey\n" + + " AND l3.l_orderkey = o_orderkey") + .getPlan(); + List sourceRelations = new ArrayList<>(); + sourcePlan.accept(RelationCollector.INSTANCE, sourceRelations); + + List targetRelations = new ArrayList<>(); + targetPlan.accept(RelationCollector.INSTANCE, targetRelations); + + List generateRelationMapping = RelationMapping.generate(sourceRelations, targetRelations); + Assertions.assertNotNull(generateRelationMapping); + Assertions.assertEquals(6, generateRelationMapping.size()); + + // expected table relation mapping is as following + // (1, 0), (2, 2), (0, 1) + // (1, 0), (3, 2), (0, 1) + // (2, 0), (1, 2), (0, 1) + // (3, 0), (2, 2), (0, 1) + // (2, 0), (3, 2), (0, 1) + // (3, 0), (1, 2), (0, 1) + Set> expectedRelationMappingSet = new HashSet<>(); + BiMap expectedRelationMapping = HashBiMap.create(); + expectedRelationMapping.put(new RelationId(1), new RelationId(0)); + expectedRelationMapping.put(new RelationId(2), new RelationId(2)); + expectedRelationMapping.put(new RelationId(0), new RelationId(1)); + expectedRelationMappingSet.add(expectedRelationMapping); + + expectedRelationMapping = HashBiMap.create(); + expectedRelationMapping.put(new RelationId(1), new RelationId(0)); + expectedRelationMapping.put(new RelationId(3), new RelationId(2)); + expectedRelationMapping.put(new RelationId(0), new RelationId(1)); + expectedRelationMappingSet.add(expectedRelationMapping); + + expectedRelationMapping = HashBiMap.create(); + expectedRelationMapping.put(new RelationId(2), new RelationId(0)); + expectedRelationMapping.put(new RelationId(1), new RelationId(2)); + expectedRelationMapping.put(new RelationId(0), new RelationId(1)); + expectedRelationMappingSet.add(expectedRelationMapping); + + expectedRelationMapping = HashBiMap.create(); + expectedRelationMapping.put(new RelationId(3), new RelationId(0)); + expectedRelationMapping.put(new RelationId(2), new RelationId(2)); + expectedRelationMapping.put(new RelationId(0), new RelationId(1)); + expectedRelationMappingSet.add(expectedRelationMapping); + + expectedRelationMapping = HashBiMap.create(); + expectedRelationMapping.put(new RelationId(2), new RelationId(0)); + expectedRelationMapping.put(new RelationId(3), new RelationId(2)); + expectedRelationMapping.put(new RelationId(0), new RelationId(1)); + expectedRelationMappingSet.add(expectedRelationMapping); + + expectedRelationMapping = HashBiMap.create(); + expectedRelationMapping.put(new RelationId(3), new RelationId(0)); + expectedRelationMapping.put(new RelationId(1), new RelationId(2)); + expectedRelationMapping.put(new RelationId(0), new RelationId(1)); + expectedRelationMappingSet.add(expectedRelationMapping); + + assertRelationMapping(new HashSet<>(generateRelationMapping), expectedRelationMappingSet); + } + private void assertRelationMapping(RelationMapping relationMapping, BiMap expectRelationMapping, BiMap expectSlotMapping) { @@ -362,6 +617,20 @@ private void assertRelationMapping(RelationMapping relationMapping, Assertions.assertEquals(generatedSlotMapping, expectSlotMapping); } + private void assertRelationMapping(Set relationMapping, + Set> expectRelationMapping) { + // check relation mapping if equals or not + Set> relationMappingSet = new HashSet<>(); + relationMapping.forEach(mapping -> { + BiMap generatedRelationMapping = HashBiMap.create(); + mapping.getMappedRelationMap().forEach((key, value) -> + generatedRelationMapping.put(key.getRelationId(), value.getRelationId())); + relationMappingSet.add(generatedRelationMapping); + } + ); + Assertions.assertEquals(relationMappingSet, expectRelationMapping); + } + protected static class RelationCollector extends DefaultPlanVisitor> { public static final RelationCollector INSTANCE = new RelationCollector(); diff --git a/regression-test/data/nereids_rules_p0/mv/join/left_outer/outer_join.out b/regression-test/data/nereids_rules_p0/mv/join/left_outer/outer_join.out index 1a1b846054bbce..b8e78048d8e9ff 100644 --- a/regression-test/data/nereids_rules_p0/mv/join/left_outer/outer_join.out +++ b/regression-test/data/nereids_rules_p0/mv/join/left_outer/outer_join.out @@ -373,3 +373,49 @@ 2023-12-12 2 mi 108 2 2023-12-12 2 mi 108 2 +-- !query12_0_before -- +2023-12-09 1 yy 95 4 +2023-12-09 1 yy 95 4 +2023-12-09 1 yy 96 4 +2023-12-09 1 yy 96 4 +2023-12-09 1 yy 97 4 +2023-12-09 1 yy 97 4 +2023-12-10 1 yy 100 2 +2023-12-10 1 yy 101 2 +2023-12-10 1 yy 98 2 +2023-12-10 1 yy 99 2 +2023-12-11 2 mm 102 3 +2023-12-11 2 mm 103 3 +2023-12-11 2 mm 104 3 +2023-12-12 2 mi 105 2 +2023-12-12 2 mi 105 2 +2023-12-12 2 mi 106 2 +2023-12-12 2 mi 106 2 +2023-12-12 2 mi 107 2 +2023-12-12 2 mi 107 2 +2023-12-12 2 mi 108 2 +2023-12-12 2 mi 108 2 + +-- !query12_0_after -- +2023-12-09 1 yy 95 4 +2023-12-09 1 yy 95 4 +2023-12-09 1 yy 96 4 +2023-12-09 1 yy 96 4 +2023-12-09 1 yy 97 4 +2023-12-09 1 yy 97 4 +2023-12-10 1 yy 100 2 +2023-12-10 1 yy 101 2 +2023-12-10 1 yy 98 2 +2023-12-10 1 yy 99 2 +2023-12-11 2 mm 102 3 +2023-12-11 2 mm 103 3 +2023-12-11 2 mm 104 3 +2023-12-12 2 mi 105 2 +2023-12-12 2 mi 105 2 +2023-12-12 2 mi 106 2 +2023-12-12 2 mi 106 2 +2023-12-12 2 mi 107 2 +2023-12-12 2 mi 107 2 +2023-12-12 2 mi 108 2 +2023-12-12 2 mi 108 2 + diff --git a/regression-test/data/nereids_rules_p0/mv/other_join_conjuncts/anti/other_join_conjuncts_anti.out b/regression-test/data/nereids_rules_p0/mv/other_join_conjuncts/anti/other_join_conjuncts_anti.out new file mode 100644 index 00000000000000..885c9ae71ccf2e --- /dev/null +++ b/regression-test/data/nereids_rules_p0/mv/other_join_conjuncts/anti/other_join_conjuncts_anti.out @@ -0,0 +1,65 @@ +-- This file is automatically generated. You should know what you did if you want to edit this +-- !query1_0_before -- + +-- !query1_0_after -- + +-- !query1_4_before -- + +-- !query1_4_after -- + +-- !query1_5_before -- + +-- !query1_5_after -- + +-- !query1_1_before -- + +-- !query1_1_after -- + +-- !query1_2_before -- + +-- !query1_2_after -- + +-- !query1_3_before -- + +-- !query1_3_after -- + +-- !query2_0_before -- + +-- !query2_0_after -- + +-- !query2_1_before -- + +-- !query2_1_after -- + +-- !query2_2_before -- + +-- !query2_2_after -- + +-- !query2_3_before -- + +-- !query2_3_after -- + +-- !query2_4_before -- + +-- !query2_4_after -- + +-- !query2_5_before -- + +-- !query2_5_after -- + +-- !query3_0_before -- +4 +4 + +-- !query3_0_after -- +4 +4 + +-- !query4_0_before -- +4 +4 + +-- !query4_0_after -- +4 +4 + diff --git a/regression-test/data/nereids_rules_p0/mv/other_join_conjuncts/inner/other_join_conjuncts_inner.out b/regression-test/data/nereids_rules_p0/mv/other_join_conjuncts/inner/other_join_conjuncts_inner.out new file mode 100644 index 00000000000000..a177e9422f1ea1 --- /dev/null +++ b/regression-test/data/nereids_rules_p0/mv/other_join_conjuncts/inner/other_join_conjuncts_inner.out @@ -0,0 +1,1489 @@ +-- This file is automatically generated. You should know what you did if you want to edit this +-- !query1_0_before -- +1 2023-12-08 +1 2023-12-08 +1 2023-12-08 +1 2023-12-08 +1 2023-12-08 +1 2023-12-08 +1 2023-12-08 +1 2023-12-08 +1 2023-12-09 +1 2023-12-09 +1 2023-12-09 +1 2023-12-09 +3 2023-12-10 +3 2023-12-10 +3 2023-12-10 +3 2023-12-10 +3 2023-12-12 +3 2023-12-12 +3 2023-12-12 +3 2023-12-12 +3 2023-12-13 +3 2023-12-13 +3 2023-12-13 +3 2023-12-13 +5 2023-12-12 +5 2023-12-12 +5 2023-12-12 +5 2023-12-12 +5 2023-12-14 +5 2023-12-14 +5 2023-12-16 +5 2023-12-16 + +-- !query1_0_after -- +1 2023-12-08 +1 2023-12-08 +1 2023-12-08 +1 2023-12-08 +1 2023-12-08 +1 2023-12-08 +1 2023-12-08 +1 2023-12-08 +1 2023-12-09 +1 2023-12-09 +1 2023-12-09 +1 2023-12-09 +3 2023-12-10 +3 2023-12-10 +3 2023-12-10 +3 2023-12-10 +3 2023-12-12 +3 2023-12-12 +3 2023-12-12 +3 2023-12-12 +3 2023-12-13 +3 2023-12-13 +3 2023-12-13 +3 2023-12-13 +5 2023-12-12 +5 2023-12-12 +5 2023-12-12 +5 2023-12-12 +5 2023-12-14 +5 2023-12-14 +5 2023-12-16 +5 2023-12-16 + +-- !query1_6_before -- +1 2023-12-08 +1 2023-12-08 +1 2023-12-08 +1 2023-12-08 +1 2023-12-08 +1 2023-12-08 +1 2023-12-08 +1 2023-12-08 +1 2023-12-09 +1 2023-12-09 +1 2023-12-09 +1 2023-12-09 +3 2023-12-10 +3 2023-12-10 +3 2023-12-10 +3 2023-12-10 +3 2023-12-12 +3 2023-12-12 +3 2023-12-12 +3 2023-12-12 +3 2023-12-13 +3 2023-12-13 +3 2023-12-13 +3 2023-12-13 +5 2023-12-12 +5 2023-12-12 +5 2023-12-12 +5 2023-12-12 +5 2023-12-14 +5 2023-12-14 +5 2023-12-16 +5 2023-12-16 + +-- !query1_6_after -- +1 2023-12-08 +1 2023-12-08 +1 2023-12-08 +1 2023-12-08 +1 2023-12-08 +1 2023-12-08 +1 2023-12-08 +1 2023-12-08 +1 2023-12-09 +1 2023-12-09 +1 2023-12-09 +1 2023-12-09 +3 2023-12-10 +3 2023-12-10 +3 2023-12-10 +3 2023-12-10 +3 2023-12-12 +3 2023-12-12 +3 2023-12-12 +3 2023-12-12 +3 2023-12-13 +3 2023-12-13 +3 2023-12-13 +3 2023-12-13 +5 2023-12-12 +5 2023-12-12 +5 2023-12-12 +5 2023-12-12 +5 2023-12-14 +5 2023-12-14 +5 2023-12-16 +5 2023-12-16 + +-- !query1_7_before -- +1 2023-12-08 +1 2023-12-08 +1 2023-12-08 +1 2023-12-08 +1 2023-12-08 +1 2023-12-08 +1 2023-12-08 +1 2023-12-08 +1 2023-12-09 +1 2023-12-09 +1 2023-12-09 +1 2023-12-09 +3 2023-12-10 +3 2023-12-10 +3 2023-12-10 +3 2023-12-10 +3 2023-12-12 +3 2023-12-12 +3 2023-12-12 +3 2023-12-12 +3 2023-12-13 +3 2023-12-13 +3 2023-12-13 +3 2023-12-13 +5 2023-12-12 +5 2023-12-12 +5 2023-12-12 +5 2023-12-12 +5 2023-12-14 +5 2023-12-14 +5 2023-12-16 +5 2023-12-16 + +-- !query1_7_after -- +1 2023-12-08 +1 2023-12-08 +1 2023-12-08 +1 2023-12-08 +1 2023-12-08 +1 2023-12-08 +1 2023-12-08 +1 2023-12-08 +1 2023-12-09 +1 2023-12-09 +1 2023-12-09 +1 2023-12-09 +3 2023-12-10 +3 2023-12-10 +3 2023-12-10 +3 2023-12-10 +3 2023-12-12 +3 2023-12-12 +3 2023-12-12 +3 2023-12-12 +3 2023-12-13 +3 2023-12-13 +3 2023-12-13 +3 2023-12-13 +5 2023-12-12 +5 2023-12-12 +5 2023-12-12 +5 2023-12-12 +5 2023-12-14 +5 2023-12-14 +5 2023-12-16 +5 2023-12-16 + +-- !query1_1_before -- +1 2023-12-09 +1 2023-12-09 +1 2023-12-09 +1 2023-12-09 +3 2023-12-12 +3 2023-12-12 +3 2023-12-12 +3 2023-12-12 +3 2023-12-13 +3 2023-12-13 +3 2023-12-13 +3 2023-12-13 +5 2023-12-14 +5 2023-12-14 +5 2023-12-16 +5 2023-12-16 + +-- !query1_1_after -- +1 2023-12-09 +1 2023-12-09 +1 2023-12-09 +1 2023-12-09 +3 2023-12-12 +3 2023-12-12 +3 2023-12-12 +3 2023-12-12 +3 2023-12-13 +3 2023-12-13 +3 2023-12-13 +3 2023-12-13 +5 2023-12-14 +5 2023-12-14 +5 2023-12-16 +5 2023-12-16 + +-- !query1_2_before -- +1 2023-12-08 2023-12-09 +1 2023-12-08 2023-12-09 +1 2023-12-08 2023-12-09 +1 2023-12-08 2023-12-09 +3 2023-12-10 2023-12-12 +3 2023-12-10 2023-12-12 +3 2023-12-10 2023-12-12 +3 2023-12-10 2023-12-12 +3 2023-12-10 2023-12-13 +3 2023-12-10 2023-12-13 +3 2023-12-10 2023-12-13 +3 2023-12-10 2023-12-13 +5 2023-12-12 2023-12-14 +5 2023-12-12 2023-12-14 +5 2023-12-12 2023-12-16 +5 2023-12-12 2023-12-16 + +-- !query1_2_after -- +1 2023-12-08 2023-12-09 +1 2023-12-08 2023-12-09 +1 2023-12-08 2023-12-09 +1 2023-12-08 2023-12-09 +3 2023-12-10 2023-12-12 +3 2023-12-10 2023-12-12 +3 2023-12-10 2023-12-12 +3 2023-12-10 2023-12-12 +3 2023-12-10 2023-12-13 +3 2023-12-10 2023-12-13 +3 2023-12-10 2023-12-13 +3 2023-12-10 2023-12-13 +5 2023-12-12 2023-12-14 +5 2023-12-12 2023-12-14 +5 2023-12-12 2023-12-16 +5 2023-12-12 2023-12-16 + +-- !query1_3_before -- +1 2023-12-08 +1 2023-12-08 +1 2023-12-08 +1 2023-12-08 +2 2023-12-09 +2 2023-12-09 +2 2023-12-09 +2 2023-12-09 +3 2023-12-10 +3 2023-12-10 +3 2023-12-10 +3 2023-12-10 +5 2023-12-12 +5 2023-12-12 +5 2023-12-12 +5 2023-12-12 + +-- !query1_3_after -- +1 2023-12-08 +1 2023-12-08 +1 2023-12-08 +1 2023-12-08 +2 2023-12-09 +2 2023-12-09 +2 2023-12-09 +2 2023-12-09 +3 2023-12-10 +3 2023-12-10 +3 2023-12-10 +3 2023-12-10 +5 2023-12-12 +5 2023-12-12 +5 2023-12-12 +5 2023-12-12 + +-- !query1_4_before -- +1 2023-12-08 2023-12-07 +1 2023-12-08 2023-12-07 +1 2023-12-08 2023-12-07 +1 2023-12-08 2023-12-07 +1 2023-12-08 2023-12-08 +1 2023-12-08 2023-12-08 +1 2023-12-08 2023-12-08 +1 2023-12-08 2023-12-08 +1 2023-12-08 2023-12-08 +1 2023-12-08 2023-12-08 +1 2023-12-08 2023-12-08 +1 2023-12-08 2023-12-08 +1 2023-12-08 2023-12-09 +1 2023-12-08 2023-12-09 +1 2023-12-08 2023-12-09 +1 2023-12-08 2023-12-09 +2 2023-12-09 2023-12-08 +2 2023-12-09 2023-12-08 +2 2023-12-09 2023-12-08 +2 2023-12-09 2023-12-08 +2 2023-12-09 2023-12-09 +2 2023-12-09 2023-12-09 +2 2023-12-09 2023-12-09 +2 2023-12-09 2023-12-09 +2 2023-12-09 2023-12-11 +2 2023-12-09 2023-12-11 +2 2023-12-09 2023-12-11 +2 2023-12-09 2023-12-11 +3 2023-12-10 2023-12-09 +3 2023-12-10 2023-12-09 +3 2023-12-10 2023-12-09 +3 2023-12-10 2023-12-09 +3 2023-12-10 2023-12-10 +3 2023-12-10 2023-12-10 +3 2023-12-10 2023-12-10 +3 2023-12-10 2023-12-10 +3 2023-12-10 2023-12-12 +3 2023-12-10 2023-12-12 +3 2023-12-10 2023-12-12 +3 2023-12-10 2023-12-12 +3 2023-12-10 2023-12-13 +3 2023-12-10 2023-12-13 +3 2023-12-10 2023-12-13 +3 2023-12-10 2023-12-13 +4 2023-12-11 2023-12-10 +4 2023-12-11 2023-12-10 +4 2023-12-11 2023-12-10 +4 2023-12-11 2023-12-10 +4 2023-12-11 2023-12-11 +4 2023-12-11 2023-12-11 +4 2023-12-11 2023-12-11 +4 2023-12-11 2023-12-11 +4 2023-12-11 2023-12-13 +4 2023-12-11 2023-12-13 +4 2023-12-11 2023-12-13 +4 2023-12-11 2023-12-13 +5 2023-12-12 2023-12-12 +5 2023-12-12 2023-12-12 +5 2023-12-12 2023-12-12 +5 2023-12-12 2023-12-12 +5 2023-12-12 2023-12-12 +5 2023-12-12 2023-12-12 +5 2023-12-12 2023-12-12 +5 2023-12-12 2023-12-12 +5 2023-12-12 2023-12-14 +5 2023-12-12 2023-12-14 +5 2023-12-12 2023-12-14 +5 2023-12-12 2023-12-14 +5 2023-12-12 2023-12-16 +5 2023-12-12 2023-12-16 +5 2023-12-12 2023-12-16 +5 2023-12-12 2023-12-16 + +-- !query1_4_after -- +1 2023-12-08 2023-12-07 +1 2023-12-08 2023-12-07 +1 2023-12-08 2023-12-07 +1 2023-12-08 2023-12-07 +1 2023-12-08 2023-12-08 +1 2023-12-08 2023-12-08 +1 2023-12-08 2023-12-08 +1 2023-12-08 2023-12-08 +1 2023-12-08 2023-12-08 +1 2023-12-08 2023-12-08 +1 2023-12-08 2023-12-08 +1 2023-12-08 2023-12-08 +1 2023-12-08 2023-12-09 +1 2023-12-08 2023-12-09 +1 2023-12-08 2023-12-09 +1 2023-12-08 2023-12-09 +2 2023-12-09 2023-12-08 +2 2023-12-09 2023-12-08 +2 2023-12-09 2023-12-08 +2 2023-12-09 2023-12-08 +2 2023-12-09 2023-12-09 +2 2023-12-09 2023-12-09 +2 2023-12-09 2023-12-09 +2 2023-12-09 2023-12-09 +2 2023-12-09 2023-12-11 +2 2023-12-09 2023-12-11 +2 2023-12-09 2023-12-11 +2 2023-12-09 2023-12-11 +3 2023-12-10 2023-12-09 +3 2023-12-10 2023-12-09 +3 2023-12-10 2023-12-09 +3 2023-12-10 2023-12-09 +3 2023-12-10 2023-12-10 +3 2023-12-10 2023-12-10 +3 2023-12-10 2023-12-10 +3 2023-12-10 2023-12-10 +3 2023-12-10 2023-12-12 +3 2023-12-10 2023-12-12 +3 2023-12-10 2023-12-12 +3 2023-12-10 2023-12-12 +3 2023-12-10 2023-12-13 +3 2023-12-10 2023-12-13 +3 2023-12-10 2023-12-13 +3 2023-12-10 2023-12-13 +4 2023-12-11 2023-12-10 +4 2023-12-11 2023-12-10 +4 2023-12-11 2023-12-10 +4 2023-12-11 2023-12-10 +4 2023-12-11 2023-12-11 +4 2023-12-11 2023-12-11 +4 2023-12-11 2023-12-11 +4 2023-12-11 2023-12-11 +4 2023-12-11 2023-12-13 +4 2023-12-11 2023-12-13 +4 2023-12-11 2023-12-13 +4 2023-12-11 2023-12-13 +5 2023-12-12 2023-12-12 +5 2023-12-12 2023-12-12 +5 2023-12-12 2023-12-12 +5 2023-12-12 2023-12-12 +5 2023-12-12 2023-12-12 +5 2023-12-12 2023-12-12 +5 2023-12-12 2023-12-12 +5 2023-12-12 2023-12-12 +5 2023-12-12 2023-12-14 +5 2023-12-12 2023-12-14 +5 2023-12-12 2023-12-14 +5 2023-12-12 2023-12-14 +5 2023-12-12 2023-12-16 +5 2023-12-12 2023-12-16 +5 2023-12-12 2023-12-16 +5 2023-12-12 2023-12-16 + +-- !query1_5_before -- +1 2023-12-08 2023-12-09 +1 2023-12-08 2023-12-09 +1 2023-12-08 2023-12-09 +1 2023-12-08 2023-12-09 +3 2023-12-10 2023-12-12 +3 2023-12-10 2023-12-12 +3 2023-12-10 2023-12-12 +3 2023-12-10 2023-12-12 +3 2023-12-10 2023-12-13 +3 2023-12-10 2023-12-13 +3 2023-12-10 2023-12-13 +3 2023-12-10 2023-12-13 +5 2023-12-12 2023-12-14 +5 2023-12-12 2023-12-14 +5 2023-12-12 2023-12-16 +5 2023-12-12 2023-12-16 + +-- !query1_5_after -- +1 2023-12-08 2023-12-09 +1 2023-12-08 2023-12-09 +1 2023-12-08 2023-12-09 +1 2023-12-08 2023-12-09 +3 2023-12-10 2023-12-12 +3 2023-12-10 2023-12-12 +3 2023-12-10 2023-12-12 +3 2023-12-10 2023-12-12 +3 2023-12-10 2023-12-13 +3 2023-12-10 2023-12-13 +3 2023-12-10 2023-12-13 +3 2023-12-10 2023-12-13 +5 2023-12-12 2023-12-14 +5 2023-12-12 2023-12-14 +5 2023-12-12 2023-12-16 +5 2023-12-12 2023-12-16 + +-- !query2_0_before -- +2023-12-08 1 yy 1 2 +2023-12-08 1 yy 1 2 +2023-12-08 1 yy 1 2 +2023-12-08 1 yy 1 2 +2023-12-08 1 yy 1 2 +2023-12-08 1 yy 1 2 +2023-12-08 1 yy 1 2 +2023-12-08 1 yy 1 2 +2023-12-09 1 yy 1 2 +2023-12-09 1 yy 1 2 +2023-12-09 1 yy 1 2 +2023-12-09 1 yy 1 2 +2023-12-10 1 yy 3 2 +2023-12-10 1 yy 3 2 +2023-12-10 1 yy 3 2 +2023-12-10 1 yy 3 2 +2023-12-12 1 yy 3 2 +2023-12-12 1 yy 3 2 +2023-12-12 1 yy 3 2 +2023-12-12 1 yy 3 2 +2023-12-12 2 mi 5 2 +2023-12-12 2 mi 5 2 +2023-12-12 2 mi 5 2 +2023-12-12 2 mi 5 2 +2023-12-13 1 yy 3 2 +2023-12-13 1 yy 3 2 +2023-12-13 1 yy 3 2 +2023-12-13 1 yy 3 2 +2023-12-14 2 mi 5 2 +2023-12-14 2 mi 5 2 +2023-12-16 2 mi 5 2 +2023-12-16 2 mi 5 2 + +-- !query2_0_after -- +2023-12-08 1 yy 1 2 +2023-12-08 1 yy 1 2 +2023-12-08 1 yy 1 2 +2023-12-08 1 yy 1 2 +2023-12-08 1 yy 1 2 +2023-12-08 1 yy 1 2 +2023-12-08 1 yy 1 2 +2023-12-08 1 yy 1 2 +2023-12-09 1 yy 1 2 +2023-12-09 1 yy 1 2 +2023-12-09 1 yy 1 2 +2023-12-09 1 yy 1 2 +2023-12-10 1 yy 3 2 +2023-12-10 1 yy 3 2 +2023-12-10 1 yy 3 2 +2023-12-10 1 yy 3 2 +2023-12-12 1 yy 3 2 +2023-12-12 1 yy 3 2 +2023-12-12 1 yy 3 2 +2023-12-12 1 yy 3 2 +2023-12-12 2 mi 5 2 +2023-12-12 2 mi 5 2 +2023-12-12 2 mi 5 2 +2023-12-12 2 mi 5 2 +2023-12-13 1 yy 3 2 +2023-12-13 1 yy 3 2 +2023-12-13 1 yy 3 2 +2023-12-13 1 yy 3 2 +2023-12-14 2 mi 5 2 +2023-12-14 2 mi 5 2 +2023-12-16 2 mi 5 2 +2023-12-16 2 mi 5 2 + +-- !query2_1_before -- +2023-12-09 1 yy 1 2 +2023-12-09 1 yy 1 2 +2023-12-09 1 yy 1 2 +2023-12-09 1 yy 1 2 +2023-12-12 1 yy 3 2 +2023-12-12 1 yy 3 2 +2023-12-12 1 yy 3 2 +2023-12-12 1 yy 3 2 +2023-12-13 1 yy 3 2 +2023-12-13 1 yy 3 2 +2023-12-13 1 yy 3 2 +2023-12-13 1 yy 3 2 +2023-12-14 2 mi 5 2 +2023-12-14 2 mi 5 2 +2023-12-16 2 mi 5 2 +2023-12-16 2 mi 5 2 + +-- !query2_1_after -- +2023-12-09 1 yy 1 2 +2023-12-09 1 yy 1 2 +2023-12-09 1 yy 1 2 +2023-12-09 1 yy 1 2 +2023-12-12 1 yy 3 2 +2023-12-12 1 yy 3 2 +2023-12-12 1 yy 3 2 +2023-12-12 1 yy 3 2 +2023-12-13 1 yy 3 2 +2023-12-13 1 yy 3 2 +2023-12-13 1 yy 3 2 +2023-12-13 1 yy 3 2 +2023-12-14 2 mi 5 2 +2023-12-14 2 mi 5 2 +2023-12-16 2 mi 5 2 +2023-12-16 2 mi 5 2 + +-- !query2_2_before -- +2023-12-09 2023-12-08 yy 1 2 +2023-12-09 2023-12-08 yy 1 2 +2023-12-09 2023-12-08 yy 1 2 +2023-12-09 2023-12-08 yy 1 2 +2023-12-12 2023-12-10 yy 3 2 +2023-12-12 2023-12-10 yy 3 2 +2023-12-12 2023-12-10 yy 3 2 +2023-12-12 2023-12-10 yy 3 2 +2023-12-13 2023-12-10 yy 3 2 +2023-12-13 2023-12-10 yy 3 2 +2023-12-13 2023-12-10 yy 3 2 +2023-12-13 2023-12-10 yy 3 2 +2023-12-14 2023-12-12 mi 5 2 +2023-12-14 2023-12-12 mi 5 2 +2023-12-16 2023-12-12 mi 5 2 +2023-12-16 2023-12-12 mi 5 2 + +-- !query2_2_after -- +2023-12-09 2023-12-08 yy 1 2 +2023-12-09 2023-12-08 yy 1 2 +2023-12-09 2023-12-08 yy 1 2 +2023-12-09 2023-12-08 yy 1 2 +2023-12-12 2023-12-10 yy 3 2 +2023-12-12 2023-12-10 yy 3 2 +2023-12-12 2023-12-10 yy 3 2 +2023-12-12 2023-12-10 yy 3 2 +2023-12-13 2023-12-10 yy 3 2 +2023-12-13 2023-12-10 yy 3 2 +2023-12-13 2023-12-10 yy 3 2 +2023-12-13 2023-12-10 yy 3 2 +2023-12-14 2023-12-12 mi 5 2 +2023-12-14 2023-12-12 mi 5 2 +2023-12-16 2023-12-12 mi 5 2 +2023-12-16 2023-12-12 mi 5 2 + +-- !query2_3_before -- +1 2023-12-08 +1 2023-12-08 +1 2023-12-08 +1 2023-12-08 +2 2023-12-09 +2 2023-12-09 +2 2023-12-09 +2 2023-12-09 +3 2023-12-10 +3 2023-12-10 +3 2023-12-10 +3 2023-12-10 +5 2023-12-12 +5 2023-12-12 +5 2023-12-12 +5 2023-12-12 + +-- !query2_3_after -- +1 2023-12-08 +1 2023-12-08 +1 2023-12-08 +1 2023-12-08 +2 2023-12-09 +2 2023-12-09 +2 2023-12-09 +2 2023-12-09 +3 2023-12-10 +3 2023-12-10 +3 2023-12-10 +3 2023-12-10 +5 2023-12-12 +5 2023-12-12 +5 2023-12-12 +5 2023-12-12 + +-- !query2_4_before -- +2023-12-07 2023-12-08 yy 1 2 +2023-12-07 2023-12-08 yy 1 2 +2023-12-07 2023-12-08 yy 1 2 +2023-12-07 2023-12-08 yy 1 2 +2023-12-08 2023-12-08 yy 1 2 +2023-12-08 2023-12-08 yy 1 2 +2023-12-08 2023-12-08 yy 1 2 +2023-12-08 2023-12-08 yy 1 2 +2023-12-08 2023-12-08 yy 1 2 +2023-12-08 2023-12-08 yy 1 2 +2023-12-08 2023-12-08 yy 1 2 +2023-12-08 2023-12-08 yy 1 2 +2023-12-09 2023-12-08 yy 1 2 +2023-12-09 2023-12-08 yy 1 2 +2023-12-09 2023-12-08 yy 1 2 +2023-12-09 2023-12-08 yy 1 2 +2023-12-09 2023-12-10 yy 3 2 +2023-12-09 2023-12-10 yy 3 2 +2023-12-09 2023-12-10 yy 3 2 +2023-12-09 2023-12-10 yy 3 2 +2023-12-10 2023-12-10 yy 3 2 +2023-12-10 2023-12-10 yy 3 2 +2023-12-10 2023-12-10 yy 3 2 +2023-12-10 2023-12-10 yy 3 2 +2023-12-12 2023-12-10 yy 3 2 +2023-12-12 2023-12-10 yy 3 2 +2023-12-12 2023-12-10 yy 3 2 +2023-12-12 2023-12-10 yy 3 2 +2023-12-12 2023-12-12 mi 5 2 +2023-12-12 2023-12-12 mi 5 2 +2023-12-12 2023-12-12 mi 5 2 +2023-12-12 2023-12-12 mi 5 2 +2023-12-12 2023-12-12 mi 5 2 +2023-12-12 2023-12-12 mi 5 2 +2023-12-12 2023-12-12 mi 5 2 +2023-12-12 2023-12-12 mi 5 2 +2023-12-13 2023-12-10 yy 3 2 +2023-12-13 2023-12-10 yy 3 2 +2023-12-13 2023-12-10 yy 3 2 +2023-12-13 2023-12-10 yy 3 2 +2023-12-14 2023-12-12 mi 5 2 +2023-12-14 2023-12-12 mi 5 2 +2023-12-14 2023-12-12 mi 5 2 +2023-12-14 2023-12-12 mi 5 2 +2023-12-16 2023-12-12 mi 5 2 +2023-12-16 2023-12-12 mi 5 2 +2023-12-16 2023-12-12 mi 5 2 +2023-12-16 2023-12-12 mi 5 2 + +-- !query2_4_after -- +2023-12-07 2023-12-08 yy 1 2 +2023-12-07 2023-12-08 yy 1 2 +2023-12-07 2023-12-08 yy 1 2 +2023-12-07 2023-12-08 yy 1 2 +2023-12-08 2023-12-08 yy 1 2 +2023-12-08 2023-12-08 yy 1 2 +2023-12-08 2023-12-08 yy 1 2 +2023-12-08 2023-12-08 yy 1 2 +2023-12-08 2023-12-08 yy 1 2 +2023-12-08 2023-12-08 yy 1 2 +2023-12-08 2023-12-08 yy 1 2 +2023-12-08 2023-12-08 yy 1 2 +2023-12-09 2023-12-08 yy 1 2 +2023-12-09 2023-12-08 yy 1 2 +2023-12-09 2023-12-08 yy 1 2 +2023-12-09 2023-12-08 yy 1 2 +2023-12-09 2023-12-10 yy 3 2 +2023-12-09 2023-12-10 yy 3 2 +2023-12-09 2023-12-10 yy 3 2 +2023-12-09 2023-12-10 yy 3 2 +2023-12-10 2023-12-10 yy 3 2 +2023-12-10 2023-12-10 yy 3 2 +2023-12-10 2023-12-10 yy 3 2 +2023-12-10 2023-12-10 yy 3 2 +2023-12-12 2023-12-10 yy 3 2 +2023-12-12 2023-12-10 yy 3 2 +2023-12-12 2023-12-10 yy 3 2 +2023-12-12 2023-12-10 yy 3 2 +2023-12-12 2023-12-12 mi 5 2 +2023-12-12 2023-12-12 mi 5 2 +2023-12-12 2023-12-12 mi 5 2 +2023-12-12 2023-12-12 mi 5 2 +2023-12-12 2023-12-12 mi 5 2 +2023-12-12 2023-12-12 mi 5 2 +2023-12-12 2023-12-12 mi 5 2 +2023-12-12 2023-12-12 mi 5 2 +2023-12-13 2023-12-10 yy 3 2 +2023-12-13 2023-12-10 yy 3 2 +2023-12-13 2023-12-10 yy 3 2 +2023-12-13 2023-12-10 yy 3 2 +2023-12-14 2023-12-12 mi 5 2 +2023-12-14 2023-12-12 mi 5 2 +2023-12-14 2023-12-12 mi 5 2 +2023-12-14 2023-12-12 mi 5 2 +2023-12-16 2023-12-12 mi 5 2 +2023-12-16 2023-12-12 mi 5 2 +2023-12-16 2023-12-12 mi 5 2 +2023-12-16 2023-12-12 mi 5 2 + +-- !query2_5_before -- +2023-12-08 2023-12-08 yy 1 2 +2023-12-08 2023-12-08 yy 1 2 +2023-12-08 2023-12-08 yy 1 2 +2023-12-08 2023-12-08 yy 1 2 +2023-12-08 2023-12-08 yy 1 2 +2023-12-08 2023-12-08 yy 1 2 +2023-12-08 2023-12-08 yy 1 2 +2023-12-08 2023-12-08 yy 1 2 +2023-12-09 2023-12-08 yy 1 2 +2023-12-09 2023-12-08 yy 1 2 +2023-12-09 2023-12-08 yy 1 2 +2023-12-09 2023-12-08 yy 1 2 +2023-12-10 2023-12-10 yy 3 2 +2023-12-10 2023-12-10 yy 3 2 +2023-12-10 2023-12-10 yy 3 2 +2023-12-10 2023-12-10 yy 3 2 +2023-12-12 2023-12-10 yy 3 2 +2023-12-12 2023-12-10 yy 3 2 +2023-12-12 2023-12-10 yy 3 2 +2023-12-12 2023-12-10 yy 3 2 +2023-12-12 2023-12-12 mi 5 2 +2023-12-12 2023-12-12 mi 5 2 +2023-12-12 2023-12-12 mi 5 2 +2023-12-12 2023-12-12 mi 5 2 +2023-12-13 2023-12-10 yy 3 2 +2023-12-13 2023-12-10 yy 3 2 +2023-12-13 2023-12-10 yy 3 2 +2023-12-13 2023-12-10 yy 3 2 +2023-12-14 2023-12-12 mi 5 2 +2023-12-14 2023-12-12 mi 5 2 +2023-12-16 2023-12-12 mi 5 2 +2023-12-16 2023-12-12 mi 5 2 + +-- !query2_5_after -- +2023-12-08 2023-12-08 yy 1 2 +2023-12-08 2023-12-08 yy 1 2 +2023-12-08 2023-12-08 yy 1 2 +2023-12-08 2023-12-08 yy 1 2 +2023-12-08 2023-12-08 yy 1 2 +2023-12-08 2023-12-08 yy 1 2 +2023-12-08 2023-12-08 yy 1 2 +2023-12-08 2023-12-08 yy 1 2 +2023-12-09 2023-12-08 yy 1 2 +2023-12-09 2023-12-08 yy 1 2 +2023-12-09 2023-12-08 yy 1 2 +2023-12-09 2023-12-08 yy 1 2 +2023-12-10 2023-12-10 yy 3 2 +2023-12-10 2023-12-10 yy 3 2 +2023-12-10 2023-12-10 yy 3 2 +2023-12-10 2023-12-10 yy 3 2 +2023-12-12 2023-12-10 yy 3 2 +2023-12-12 2023-12-10 yy 3 2 +2023-12-12 2023-12-10 yy 3 2 +2023-12-12 2023-12-10 yy 3 2 +2023-12-12 2023-12-12 mi 5 2 +2023-12-12 2023-12-12 mi 5 2 +2023-12-12 2023-12-12 mi 5 2 +2023-12-12 2023-12-12 mi 5 2 +2023-12-13 2023-12-10 yy 3 2 +2023-12-13 2023-12-10 yy 3 2 +2023-12-13 2023-12-10 yy 3 2 +2023-12-13 2023-12-10 yy 3 2 +2023-12-14 2023-12-12 mi 5 2 +2023-12-14 2023-12-12 mi 5 2 +2023-12-16 2023-12-12 mi 5 2 +2023-12-16 2023-12-12 mi 5 2 + +-- !query2_6_before -- +2023-12-08 1 yy 1 2 +2023-12-08 1 yy 1 2 +2023-12-08 1 yy 1 2 +2023-12-08 1 yy 1 2 +2023-12-08 1 yy 1 2 +2023-12-08 1 yy 1 2 +2023-12-08 1 yy 1 2 +2023-12-08 1 yy 1 2 +2023-12-09 1 yy 1 2 +2023-12-09 1 yy 1 2 +2023-12-09 1 yy 1 2 +2023-12-09 1 yy 1 2 +2023-12-10 1 yy 3 2 +2023-12-10 1 yy 3 2 +2023-12-10 1 yy 3 2 +2023-12-10 1 yy 3 2 +2023-12-12 1 yy 3 2 +2023-12-12 1 yy 3 2 +2023-12-12 1 yy 3 2 +2023-12-12 1 yy 3 2 +2023-12-12 2 mi 5 2 +2023-12-12 2 mi 5 2 +2023-12-12 2 mi 5 2 +2023-12-12 2 mi 5 2 +2023-12-13 1 yy 3 2 +2023-12-13 1 yy 3 2 +2023-12-13 1 yy 3 2 +2023-12-13 1 yy 3 2 +2023-12-14 2 mi 5 2 +2023-12-14 2 mi 5 2 +2023-12-16 2 mi 5 2 +2023-12-16 2 mi 5 2 + +-- !query2_6_after -- +2023-12-08 1 yy 1 2 +2023-12-08 1 yy 1 2 +2023-12-08 1 yy 1 2 +2023-12-08 1 yy 1 2 +2023-12-08 1 yy 1 2 +2023-12-08 1 yy 1 2 +2023-12-08 1 yy 1 2 +2023-12-08 1 yy 1 2 +2023-12-09 1 yy 1 2 +2023-12-09 1 yy 1 2 +2023-12-09 1 yy 1 2 +2023-12-09 1 yy 1 2 +2023-12-10 1 yy 3 2 +2023-12-10 1 yy 3 2 +2023-12-10 1 yy 3 2 +2023-12-10 1 yy 3 2 +2023-12-12 1 yy 3 2 +2023-12-12 1 yy 3 2 +2023-12-12 1 yy 3 2 +2023-12-12 1 yy 3 2 +2023-12-12 2 mi 5 2 +2023-12-12 2 mi 5 2 +2023-12-12 2 mi 5 2 +2023-12-12 2 mi 5 2 +2023-12-13 1 yy 3 2 +2023-12-13 1 yy 3 2 +2023-12-13 1 yy 3 2 +2023-12-13 1 yy 3 2 +2023-12-14 2 mi 5 2 +2023-12-14 2 mi 5 2 +2023-12-16 2 mi 5 2 +2023-12-16 2 mi 5 2 + +-- !query3_0_before -- +2023-12-08 1 yy 1 2 +2023-12-08 1 yy 1 2 +2023-12-08 1 yy 1 2 +2023-12-08 1 yy 1 2 +2023-12-08 1 yy 1 2 +2023-12-08 1 yy 1 2 +2023-12-08 1 yy 1 2 +2023-12-08 1 yy 1 2 +2023-12-09 1 yy 1 2 +2023-12-09 1 yy 1 2 +2023-12-09 1 yy 1 2 +2023-12-09 1 yy 1 2 +2023-12-10 1 yy 3 2 +2023-12-10 1 yy 3 2 +2023-12-10 1 yy 3 2 +2023-12-10 1 yy 3 2 +2023-12-12 1 yy 3 2 +2023-12-12 1 yy 3 2 +2023-12-12 1 yy 3 2 +2023-12-12 1 yy 3 2 +2023-12-12 2 mi 5 2 +2023-12-12 2 mi 5 2 +2023-12-12 2 mi 5 2 +2023-12-12 2 mi 5 2 +2023-12-13 1 yy 3 2 +2023-12-13 1 yy 3 2 +2023-12-13 1 yy 3 2 +2023-12-13 1 yy 3 2 +2023-12-14 2 mi 5 2 +2023-12-14 2 mi 5 2 +2023-12-16 2 mi 5 2 +2023-12-16 2 mi 5 2 + +-- !query3_0_after -- +2023-12-08 1 yy 1 2 +2023-12-08 1 yy 1 2 +2023-12-08 1 yy 1 2 +2023-12-08 1 yy 1 2 +2023-12-08 1 yy 1 2 +2023-12-08 1 yy 1 2 +2023-12-08 1 yy 1 2 +2023-12-08 1 yy 1 2 +2023-12-09 1 yy 1 2 +2023-12-09 1 yy 1 2 +2023-12-09 1 yy 1 2 +2023-12-09 1 yy 1 2 +2023-12-10 1 yy 3 2 +2023-12-10 1 yy 3 2 +2023-12-10 1 yy 3 2 +2023-12-10 1 yy 3 2 +2023-12-12 1 yy 3 2 +2023-12-12 1 yy 3 2 +2023-12-12 1 yy 3 2 +2023-12-12 1 yy 3 2 +2023-12-12 2 mi 5 2 +2023-12-12 2 mi 5 2 +2023-12-12 2 mi 5 2 +2023-12-12 2 mi 5 2 +2023-12-13 1 yy 3 2 +2023-12-13 1 yy 3 2 +2023-12-13 1 yy 3 2 +2023-12-13 1 yy 3 2 +2023-12-14 2 mi 5 2 +2023-12-14 2 mi 5 2 +2023-12-16 2 mi 5 2 +2023-12-16 2 mi 5 2 + +-- !query3_6_before -- +2023-12-08 1 yy 1 2 +2023-12-08 1 yy 1 2 +2023-12-08 1 yy 1 2 +2023-12-08 1 yy 1 2 +2023-12-08 1 yy 1 2 +2023-12-08 1 yy 1 2 +2023-12-08 1 yy 1 2 +2023-12-08 1 yy 1 2 +2023-12-09 1 yy 1 2 +2023-12-09 1 yy 1 2 +2023-12-09 1 yy 1 2 +2023-12-09 1 yy 1 2 +2023-12-10 1 yy 3 2 +2023-12-10 1 yy 3 2 +2023-12-10 1 yy 3 2 +2023-12-10 1 yy 3 2 +2023-12-12 1 yy 3 2 +2023-12-12 1 yy 3 2 +2023-12-12 1 yy 3 2 +2023-12-12 1 yy 3 2 +2023-12-12 2 mi 5 2 +2023-12-12 2 mi 5 2 +2023-12-12 2 mi 5 2 +2023-12-12 2 mi 5 2 +2023-12-13 1 yy 3 2 +2023-12-13 1 yy 3 2 +2023-12-13 1 yy 3 2 +2023-12-13 1 yy 3 2 +2023-12-14 2 mi 5 2 +2023-12-14 2 mi 5 2 +2023-12-16 2 mi 5 2 +2023-12-16 2 mi 5 2 + +-- !query3_6_after -- +2023-12-08 1 yy 1 2 +2023-12-08 1 yy 1 2 +2023-12-08 1 yy 1 2 +2023-12-08 1 yy 1 2 +2023-12-08 1 yy 1 2 +2023-12-08 1 yy 1 2 +2023-12-08 1 yy 1 2 +2023-12-08 1 yy 1 2 +2023-12-09 1 yy 1 2 +2023-12-09 1 yy 1 2 +2023-12-09 1 yy 1 2 +2023-12-09 1 yy 1 2 +2023-12-10 1 yy 3 2 +2023-12-10 1 yy 3 2 +2023-12-10 1 yy 3 2 +2023-12-10 1 yy 3 2 +2023-12-12 1 yy 3 2 +2023-12-12 1 yy 3 2 +2023-12-12 1 yy 3 2 +2023-12-12 1 yy 3 2 +2023-12-12 2 mi 5 2 +2023-12-12 2 mi 5 2 +2023-12-12 2 mi 5 2 +2023-12-12 2 mi 5 2 +2023-12-13 1 yy 3 2 +2023-12-13 1 yy 3 2 +2023-12-13 1 yy 3 2 +2023-12-13 1 yy 3 2 +2023-12-14 2 mi 5 2 +2023-12-14 2 mi 5 2 +2023-12-16 2 mi 5 2 +2023-12-16 2 mi 5 2 + +-- !query3_7_before -- +2023-12-08 1 yy 1 2 +2023-12-08 1 yy 1 2 +2023-12-08 1 yy 1 2 +2023-12-08 1 yy 1 2 +2023-12-08 1 yy 1 2 +2023-12-08 1 yy 1 2 +2023-12-08 1 yy 1 2 +2023-12-08 1 yy 1 2 +2023-12-09 1 yy 1 2 +2023-12-09 1 yy 1 2 +2023-12-09 1 yy 1 2 +2023-12-09 1 yy 1 2 +2023-12-10 1 yy 3 2 +2023-12-10 1 yy 3 2 +2023-12-10 1 yy 3 2 +2023-12-10 1 yy 3 2 +2023-12-12 1 yy 3 2 +2023-12-12 1 yy 3 2 +2023-12-12 1 yy 3 2 +2023-12-12 1 yy 3 2 +2023-12-12 2 mi 5 2 +2023-12-12 2 mi 5 2 +2023-12-12 2 mi 5 2 +2023-12-12 2 mi 5 2 +2023-12-13 1 yy 3 2 +2023-12-13 1 yy 3 2 +2023-12-13 1 yy 3 2 +2023-12-13 1 yy 3 2 +2023-12-14 2 mi 5 2 +2023-12-14 2 mi 5 2 +2023-12-16 2 mi 5 2 +2023-12-16 2 mi 5 2 + +-- !query3_7_after -- +2023-12-08 1 yy 1 2 +2023-12-08 1 yy 1 2 +2023-12-08 1 yy 1 2 +2023-12-08 1 yy 1 2 +2023-12-08 1 yy 1 2 +2023-12-08 1 yy 1 2 +2023-12-08 1 yy 1 2 +2023-12-08 1 yy 1 2 +2023-12-09 1 yy 1 2 +2023-12-09 1 yy 1 2 +2023-12-09 1 yy 1 2 +2023-12-09 1 yy 1 2 +2023-12-10 1 yy 3 2 +2023-12-10 1 yy 3 2 +2023-12-10 1 yy 3 2 +2023-12-10 1 yy 3 2 +2023-12-12 1 yy 3 2 +2023-12-12 1 yy 3 2 +2023-12-12 1 yy 3 2 +2023-12-12 1 yy 3 2 +2023-12-12 2 mi 5 2 +2023-12-12 2 mi 5 2 +2023-12-12 2 mi 5 2 +2023-12-12 2 mi 5 2 +2023-12-13 1 yy 3 2 +2023-12-13 1 yy 3 2 +2023-12-13 1 yy 3 2 +2023-12-13 1 yy 3 2 +2023-12-14 2 mi 5 2 +2023-12-14 2 mi 5 2 +2023-12-16 2 mi 5 2 +2023-12-16 2 mi 5 2 + +-- !query3_8_before -- +2023-12-08 1 yy 1 2 +2023-12-08 1 yy 1 2 +2023-12-08 1 yy 1 2 +2023-12-08 1 yy 1 2 +2023-12-08 1 yy 1 2 +2023-12-08 1 yy 1 2 +2023-12-08 1 yy 1 2 +2023-12-08 1 yy 1 2 +2023-12-09 1 yy 1 2 +2023-12-09 1 yy 1 2 +2023-12-09 1 yy 1 2 +2023-12-09 1 yy 1 2 +2023-12-10 1 yy 3 2 +2023-12-10 1 yy 3 2 +2023-12-10 1 yy 3 2 +2023-12-10 1 yy 3 2 +2023-12-12 1 yy 3 2 +2023-12-12 1 yy 3 2 +2023-12-12 1 yy 3 2 +2023-12-12 1 yy 3 2 +2023-12-12 2 mi 5 2 +2023-12-12 2 mi 5 2 +2023-12-12 2 mi 5 2 +2023-12-12 2 mi 5 2 +2023-12-13 1 yy 3 2 +2023-12-13 1 yy 3 2 +2023-12-13 1 yy 3 2 +2023-12-13 1 yy 3 2 +2023-12-14 2 mi 5 2 +2023-12-14 2 mi 5 2 +2023-12-16 2 mi 5 2 +2023-12-16 2 mi 5 2 + +-- !query3_8_after -- +2023-12-08 1 yy 1 2 +2023-12-08 1 yy 1 2 +2023-12-08 1 yy 1 2 +2023-12-08 1 yy 1 2 +2023-12-08 1 yy 1 2 +2023-12-08 1 yy 1 2 +2023-12-08 1 yy 1 2 +2023-12-08 1 yy 1 2 +2023-12-09 1 yy 1 2 +2023-12-09 1 yy 1 2 +2023-12-09 1 yy 1 2 +2023-12-09 1 yy 1 2 +2023-12-10 1 yy 3 2 +2023-12-10 1 yy 3 2 +2023-12-10 1 yy 3 2 +2023-12-10 1 yy 3 2 +2023-12-12 1 yy 3 2 +2023-12-12 1 yy 3 2 +2023-12-12 1 yy 3 2 +2023-12-12 1 yy 3 2 +2023-12-12 2 mi 5 2 +2023-12-12 2 mi 5 2 +2023-12-12 2 mi 5 2 +2023-12-12 2 mi 5 2 +2023-12-13 1 yy 3 2 +2023-12-13 1 yy 3 2 +2023-12-13 1 yy 3 2 +2023-12-13 1 yy 3 2 +2023-12-14 2 mi 5 2 +2023-12-14 2 mi 5 2 +2023-12-16 2 mi 5 2 +2023-12-16 2 mi 5 2 + +-- !query3_1_before -- +2023-12-09 1 yy 1 2 +2023-12-09 1 yy 1 2 +2023-12-09 1 yy 1 2 +2023-12-09 1 yy 1 2 +2023-12-12 1 yy 3 2 +2023-12-12 1 yy 3 2 +2023-12-12 1 yy 3 2 +2023-12-12 1 yy 3 2 +2023-12-13 1 yy 3 2 +2023-12-13 1 yy 3 2 +2023-12-13 1 yy 3 2 +2023-12-13 1 yy 3 2 +2023-12-14 2 mi 5 2 +2023-12-14 2 mi 5 2 +2023-12-16 2 mi 5 2 +2023-12-16 2 mi 5 2 + +-- !query3_1_after -- +2023-12-09 1 yy 1 2 +2023-12-09 1 yy 1 2 +2023-12-09 1 yy 1 2 +2023-12-09 1 yy 1 2 +2023-12-12 1 yy 3 2 +2023-12-12 1 yy 3 2 +2023-12-12 1 yy 3 2 +2023-12-12 1 yy 3 2 +2023-12-13 1 yy 3 2 +2023-12-13 1 yy 3 2 +2023-12-13 1 yy 3 2 +2023-12-13 1 yy 3 2 +2023-12-14 2 mi 5 2 +2023-12-14 2 mi 5 2 +2023-12-16 2 mi 5 2 +2023-12-16 2 mi 5 2 + +-- !query3_2_before -- +2023-12-09 2023-12-08 yy 1 2 +2023-12-09 2023-12-08 yy 1 2 +2023-12-09 2023-12-08 yy 1 2 +2023-12-09 2023-12-08 yy 1 2 +2023-12-12 2023-12-10 yy 3 2 +2023-12-12 2023-12-10 yy 3 2 +2023-12-12 2023-12-10 yy 3 2 +2023-12-12 2023-12-10 yy 3 2 +2023-12-13 2023-12-10 yy 3 2 +2023-12-13 2023-12-10 yy 3 2 +2023-12-13 2023-12-10 yy 3 2 +2023-12-13 2023-12-10 yy 3 2 +2023-12-14 2023-12-12 mi 5 2 +2023-12-14 2023-12-12 mi 5 2 +2023-12-16 2023-12-12 mi 5 2 +2023-12-16 2023-12-12 mi 5 2 + +-- !query3_2_after -- +2023-12-09 2023-12-08 yy 1 2 +2023-12-09 2023-12-08 yy 1 2 +2023-12-09 2023-12-08 yy 1 2 +2023-12-09 2023-12-08 yy 1 2 +2023-12-12 2023-12-10 yy 3 2 +2023-12-12 2023-12-10 yy 3 2 +2023-12-12 2023-12-10 yy 3 2 +2023-12-12 2023-12-10 yy 3 2 +2023-12-13 2023-12-10 yy 3 2 +2023-12-13 2023-12-10 yy 3 2 +2023-12-13 2023-12-10 yy 3 2 +2023-12-13 2023-12-10 yy 3 2 +2023-12-14 2023-12-12 mi 5 2 +2023-12-14 2023-12-12 mi 5 2 +2023-12-16 2023-12-12 mi 5 2 +2023-12-16 2023-12-12 mi 5 2 + +-- !query3_3_before -- +1 2023-12-08 +1 2023-12-08 +1 2023-12-08 +1 2023-12-08 +2 2023-12-09 +2 2023-12-09 +2 2023-12-09 +2 2023-12-09 +3 2023-12-10 +3 2023-12-10 +3 2023-12-10 +3 2023-12-10 +5 2023-12-12 +5 2023-12-12 +5 2023-12-12 +5 2023-12-12 + +-- !query3_3_after -- +1 2023-12-08 +1 2023-12-08 +1 2023-12-08 +1 2023-12-08 +2 2023-12-09 +2 2023-12-09 +2 2023-12-09 +2 2023-12-09 +3 2023-12-10 +3 2023-12-10 +3 2023-12-10 +3 2023-12-10 +5 2023-12-12 +5 2023-12-12 +5 2023-12-12 +5 2023-12-12 + +-- !query3_4_before -- +2023-12-07 2023-12-08 yy 1 2 +2023-12-07 2023-12-08 yy 1 2 +2023-12-07 2023-12-08 yy 1 2 +2023-12-07 2023-12-08 yy 1 2 +2023-12-08 2023-12-08 yy 1 2 +2023-12-08 2023-12-08 yy 1 2 +2023-12-08 2023-12-08 yy 1 2 +2023-12-08 2023-12-08 yy 1 2 +2023-12-08 2023-12-08 yy 1 2 +2023-12-08 2023-12-08 yy 1 2 +2023-12-08 2023-12-08 yy 1 2 +2023-12-08 2023-12-08 yy 1 2 +2023-12-09 2023-12-08 yy 1 2 +2023-12-09 2023-12-08 yy 1 2 +2023-12-09 2023-12-08 yy 1 2 +2023-12-09 2023-12-08 yy 1 2 +2023-12-09 2023-12-10 yy 3 2 +2023-12-09 2023-12-10 yy 3 2 +2023-12-09 2023-12-10 yy 3 2 +2023-12-09 2023-12-10 yy 3 2 +2023-12-10 2023-12-10 yy 3 2 +2023-12-10 2023-12-10 yy 3 2 +2023-12-10 2023-12-10 yy 3 2 +2023-12-10 2023-12-10 yy 3 2 +2023-12-12 2023-12-10 yy 3 2 +2023-12-12 2023-12-10 yy 3 2 +2023-12-12 2023-12-10 yy 3 2 +2023-12-12 2023-12-10 yy 3 2 +2023-12-12 2023-12-12 mi 5 2 +2023-12-12 2023-12-12 mi 5 2 +2023-12-12 2023-12-12 mi 5 2 +2023-12-12 2023-12-12 mi 5 2 +2023-12-12 2023-12-12 mi 5 2 +2023-12-12 2023-12-12 mi 5 2 +2023-12-12 2023-12-12 mi 5 2 +2023-12-12 2023-12-12 mi 5 2 +2023-12-13 2023-12-10 yy 3 2 +2023-12-13 2023-12-10 yy 3 2 +2023-12-13 2023-12-10 yy 3 2 +2023-12-13 2023-12-10 yy 3 2 +2023-12-14 2023-12-12 mi 5 2 +2023-12-14 2023-12-12 mi 5 2 +2023-12-14 2023-12-12 mi 5 2 +2023-12-14 2023-12-12 mi 5 2 +2023-12-16 2023-12-12 mi 5 2 +2023-12-16 2023-12-12 mi 5 2 +2023-12-16 2023-12-12 mi 5 2 +2023-12-16 2023-12-12 mi 5 2 + +-- !query3_4_after -- +2023-12-07 2023-12-08 yy 1 2 +2023-12-07 2023-12-08 yy 1 2 +2023-12-07 2023-12-08 yy 1 2 +2023-12-07 2023-12-08 yy 1 2 +2023-12-08 2023-12-08 yy 1 2 +2023-12-08 2023-12-08 yy 1 2 +2023-12-08 2023-12-08 yy 1 2 +2023-12-08 2023-12-08 yy 1 2 +2023-12-08 2023-12-08 yy 1 2 +2023-12-08 2023-12-08 yy 1 2 +2023-12-08 2023-12-08 yy 1 2 +2023-12-08 2023-12-08 yy 1 2 +2023-12-09 2023-12-08 yy 1 2 +2023-12-09 2023-12-08 yy 1 2 +2023-12-09 2023-12-08 yy 1 2 +2023-12-09 2023-12-08 yy 1 2 +2023-12-09 2023-12-10 yy 3 2 +2023-12-09 2023-12-10 yy 3 2 +2023-12-09 2023-12-10 yy 3 2 +2023-12-09 2023-12-10 yy 3 2 +2023-12-10 2023-12-10 yy 3 2 +2023-12-10 2023-12-10 yy 3 2 +2023-12-10 2023-12-10 yy 3 2 +2023-12-10 2023-12-10 yy 3 2 +2023-12-12 2023-12-10 yy 3 2 +2023-12-12 2023-12-10 yy 3 2 +2023-12-12 2023-12-10 yy 3 2 +2023-12-12 2023-12-10 yy 3 2 +2023-12-12 2023-12-12 mi 5 2 +2023-12-12 2023-12-12 mi 5 2 +2023-12-12 2023-12-12 mi 5 2 +2023-12-12 2023-12-12 mi 5 2 +2023-12-12 2023-12-12 mi 5 2 +2023-12-12 2023-12-12 mi 5 2 +2023-12-12 2023-12-12 mi 5 2 +2023-12-12 2023-12-12 mi 5 2 +2023-12-13 2023-12-10 yy 3 2 +2023-12-13 2023-12-10 yy 3 2 +2023-12-13 2023-12-10 yy 3 2 +2023-12-13 2023-12-10 yy 3 2 +2023-12-14 2023-12-12 mi 5 2 +2023-12-14 2023-12-12 mi 5 2 +2023-12-14 2023-12-12 mi 5 2 +2023-12-14 2023-12-12 mi 5 2 +2023-12-16 2023-12-12 mi 5 2 +2023-12-16 2023-12-12 mi 5 2 +2023-12-16 2023-12-12 mi 5 2 +2023-12-16 2023-12-12 mi 5 2 + +-- !query3_5_before -- +2023-12-07 2023-12-08 yy 1 2 +2023-12-07 2023-12-08 yy 1 2 +2023-12-07 2023-12-08 yy 1 2 +2023-12-07 2023-12-08 yy 1 2 +2023-12-08 2023-12-08 yy 1 2 +2023-12-08 2023-12-08 yy 1 2 +2023-12-08 2023-12-08 yy 1 2 +2023-12-08 2023-12-08 yy 1 2 +2023-12-08 2023-12-08 yy 1 2 +2023-12-08 2023-12-08 yy 1 2 +2023-12-08 2023-12-08 yy 1 2 +2023-12-08 2023-12-08 yy 1 2 +2023-12-09 2023-12-08 yy 1 2 +2023-12-09 2023-12-08 yy 1 2 +2023-12-09 2023-12-08 yy 1 2 +2023-12-09 2023-12-08 yy 1 2 +2023-12-09 2023-12-10 yy 3 2 +2023-12-09 2023-12-10 yy 3 2 +2023-12-09 2023-12-10 yy 3 2 +2023-12-09 2023-12-10 yy 3 2 +2023-12-10 2023-12-10 yy 3 2 +2023-12-10 2023-12-10 yy 3 2 +2023-12-10 2023-12-10 yy 3 2 +2023-12-10 2023-12-10 yy 3 2 +2023-12-12 2023-12-10 yy 3 2 +2023-12-12 2023-12-10 yy 3 2 +2023-12-12 2023-12-10 yy 3 2 +2023-12-12 2023-12-10 yy 3 2 +2023-12-12 2023-12-12 mi 5 2 +2023-12-12 2023-12-12 mi 5 2 +2023-12-12 2023-12-12 mi 5 2 +2023-12-12 2023-12-12 mi 5 2 +2023-12-12 2023-12-12 mi 5 2 +2023-12-12 2023-12-12 mi 5 2 +2023-12-12 2023-12-12 mi 5 2 +2023-12-12 2023-12-12 mi 5 2 +2023-12-13 2023-12-10 yy 3 2 +2023-12-13 2023-12-10 yy 3 2 +2023-12-13 2023-12-10 yy 3 2 +2023-12-13 2023-12-10 yy 3 2 +2023-12-14 2023-12-12 mi 5 2 +2023-12-14 2023-12-12 mi 5 2 +2023-12-14 2023-12-12 mi 5 2 +2023-12-14 2023-12-12 mi 5 2 +2023-12-16 2023-12-12 mi 5 2 +2023-12-16 2023-12-12 mi 5 2 +2023-12-16 2023-12-12 mi 5 2 +2023-12-16 2023-12-12 mi 5 2 + +-- !query3_5_after -- +2023-12-07 2023-12-08 yy 1 2 +2023-12-07 2023-12-08 yy 1 2 +2023-12-07 2023-12-08 yy 1 2 +2023-12-07 2023-12-08 yy 1 2 +2023-12-08 2023-12-08 yy 1 2 +2023-12-08 2023-12-08 yy 1 2 +2023-12-08 2023-12-08 yy 1 2 +2023-12-08 2023-12-08 yy 1 2 +2023-12-08 2023-12-08 yy 1 2 +2023-12-08 2023-12-08 yy 1 2 +2023-12-08 2023-12-08 yy 1 2 +2023-12-08 2023-12-08 yy 1 2 +2023-12-09 2023-12-08 yy 1 2 +2023-12-09 2023-12-08 yy 1 2 +2023-12-09 2023-12-08 yy 1 2 +2023-12-09 2023-12-08 yy 1 2 +2023-12-09 2023-12-10 yy 3 2 +2023-12-09 2023-12-10 yy 3 2 +2023-12-09 2023-12-10 yy 3 2 +2023-12-09 2023-12-10 yy 3 2 +2023-12-10 2023-12-10 yy 3 2 +2023-12-10 2023-12-10 yy 3 2 +2023-12-10 2023-12-10 yy 3 2 +2023-12-10 2023-12-10 yy 3 2 +2023-12-12 2023-12-10 yy 3 2 +2023-12-12 2023-12-10 yy 3 2 +2023-12-12 2023-12-10 yy 3 2 +2023-12-12 2023-12-10 yy 3 2 +2023-12-12 2023-12-12 mi 5 2 +2023-12-12 2023-12-12 mi 5 2 +2023-12-12 2023-12-12 mi 5 2 +2023-12-12 2023-12-12 mi 5 2 +2023-12-12 2023-12-12 mi 5 2 +2023-12-12 2023-12-12 mi 5 2 +2023-12-12 2023-12-12 mi 5 2 +2023-12-12 2023-12-12 mi 5 2 +2023-12-13 2023-12-10 yy 3 2 +2023-12-13 2023-12-10 yy 3 2 +2023-12-13 2023-12-10 yy 3 2 +2023-12-13 2023-12-10 yy 3 2 +2023-12-14 2023-12-12 mi 5 2 +2023-12-14 2023-12-12 mi 5 2 +2023-12-14 2023-12-12 mi 5 2 +2023-12-14 2023-12-12 mi 5 2 +2023-12-16 2023-12-12 mi 5 2 +2023-12-16 2023-12-12 mi 5 2 +2023-12-16 2023-12-12 mi 5 2 +2023-12-16 2023-12-12 mi 5 2 + diff --git a/regression-test/data/nereids_rules_p0/mv/other_join_conjuncts/outer/other_join_conjuncts_outer.out b/regression-test/data/nereids_rules_p0/mv/other_join_conjuncts/outer/other_join_conjuncts_outer.out new file mode 100644 index 00000000000000..17bedeaa33fdea --- /dev/null +++ b/regression-test/data/nereids_rules_p0/mv/other_join_conjuncts/outer/other_join_conjuncts_outer.out @@ -0,0 +1,2545 @@ +-- This file is automatically generated. You should know what you did if you want to edit this +-- !query1_0_before -- +1 2023-12-08 +1 2023-12-08 +1 2023-12-08 +1 2023-12-08 +1 2023-12-08 +1 2023-12-08 +1 2023-12-08 +1 2023-12-08 +1 2023-12-09 +1 2023-12-09 +1 2023-12-09 +1 2023-12-09 +2 2023-12-09 +2 2023-12-09 +2 2023-12-11 +2 2023-12-11 +3 2023-12-10 +3 2023-12-10 +3 2023-12-10 +3 2023-12-10 +3 2023-12-12 +3 2023-12-12 +3 2023-12-12 +3 2023-12-12 +3 2023-12-13 +3 2023-12-13 +3 2023-12-13 +3 2023-12-13 +4 2023-12-11 +4 2023-12-11 +4 2023-12-13 +4 2023-12-13 +5 2023-12-12 +5 2023-12-12 +5 2023-12-12 +5 2023-12-12 +5 2023-12-14 +5 2023-12-14 +5 2023-12-16 +5 2023-12-16 + +-- !query1_0_after -- +1 2023-12-08 +1 2023-12-08 +1 2023-12-08 +1 2023-12-08 +1 2023-12-08 +1 2023-12-08 +1 2023-12-08 +1 2023-12-08 +1 2023-12-09 +1 2023-12-09 +1 2023-12-09 +1 2023-12-09 +2 2023-12-09 +2 2023-12-09 +2 2023-12-11 +2 2023-12-11 +3 2023-12-10 +3 2023-12-10 +3 2023-12-10 +3 2023-12-10 +3 2023-12-12 +3 2023-12-12 +3 2023-12-12 +3 2023-12-12 +3 2023-12-13 +3 2023-12-13 +3 2023-12-13 +3 2023-12-13 +4 2023-12-11 +4 2023-12-11 +4 2023-12-13 +4 2023-12-13 +5 2023-12-12 +5 2023-12-12 +5 2023-12-12 +5 2023-12-12 +5 2023-12-14 +5 2023-12-14 +5 2023-12-16 +5 2023-12-16 + +-- !query1_4_before -- +1 2023-12-08 +1 2023-12-08 +1 2023-12-08 +1 2023-12-08 +1 2023-12-08 +1 2023-12-08 +1 2023-12-08 +1 2023-12-08 +1 2023-12-09 +1 2023-12-09 +1 2023-12-09 +1 2023-12-09 +2 2023-12-09 +2 2023-12-09 +2 2023-12-11 +2 2023-12-11 +3 2023-12-10 +3 2023-12-10 +3 2023-12-10 +3 2023-12-10 +3 2023-12-12 +3 2023-12-12 +3 2023-12-12 +3 2023-12-12 +3 2023-12-13 +3 2023-12-13 +3 2023-12-13 +3 2023-12-13 +4 2023-12-11 +4 2023-12-11 +4 2023-12-13 +4 2023-12-13 +5 2023-12-12 +5 2023-12-12 +5 2023-12-12 +5 2023-12-12 +5 2023-12-14 +5 2023-12-14 +5 2023-12-16 +5 2023-12-16 + +-- !query1_4_after -- +1 2023-12-08 +1 2023-12-08 +1 2023-12-08 +1 2023-12-08 +1 2023-12-08 +1 2023-12-08 +1 2023-12-08 +1 2023-12-08 +1 2023-12-09 +1 2023-12-09 +1 2023-12-09 +1 2023-12-09 +2 2023-12-09 +2 2023-12-09 +2 2023-12-11 +2 2023-12-11 +3 2023-12-10 +3 2023-12-10 +3 2023-12-10 +3 2023-12-10 +3 2023-12-12 +3 2023-12-12 +3 2023-12-12 +3 2023-12-12 +3 2023-12-13 +3 2023-12-13 +3 2023-12-13 +3 2023-12-13 +4 2023-12-11 +4 2023-12-11 +4 2023-12-13 +4 2023-12-13 +5 2023-12-12 +5 2023-12-12 +5 2023-12-12 +5 2023-12-12 +5 2023-12-14 +5 2023-12-14 +5 2023-12-16 +5 2023-12-16 + +-- !query1_5_before -- +1 2023-12-08 +1 2023-12-08 +1 2023-12-08 +1 2023-12-08 +1 2023-12-08 +1 2023-12-08 +1 2023-12-08 +1 2023-12-08 +1 2023-12-09 +1 2023-12-09 +1 2023-12-09 +1 2023-12-09 +2 2023-12-09 +2 2023-12-09 +2 2023-12-11 +2 2023-12-11 +3 2023-12-10 +3 2023-12-10 +3 2023-12-10 +3 2023-12-10 +3 2023-12-12 +3 2023-12-12 +3 2023-12-12 +3 2023-12-12 +3 2023-12-13 +3 2023-12-13 +3 2023-12-13 +3 2023-12-13 +4 2023-12-11 +4 2023-12-11 +4 2023-12-13 +4 2023-12-13 +5 2023-12-12 +5 2023-12-12 +5 2023-12-12 +5 2023-12-12 +5 2023-12-14 +5 2023-12-14 +5 2023-12-16 +5 2023-12-16 + +-- !query1_5_after -- +1 2023-12-08 +1 2023-12-08 +1 2023-12-08 +1 2023-12-08 +1 2023-12-08 +1 2023-12-08 +1 2023-12-08 +1 2023-12-08 +1 2023-12-09 +1 2023-12-09 +1 2023-12-09 +1 2023-12-09 +2 2023-12-09 +2 2023-12-09 +2 2023-12-11 +2 2023-12-11 +3 2023-12-10 +3 2023-12-10 +3 2023-12-10 +3 2023-12-10 +3 2023-12-12 +3 2023-12-12 +3 2023-12-12 +3 2023-12-12 +3 2023-12-13 +3 2023-12-13 +3 2023-12-13 +3 2023-12-13 +4 2023-12-11 +4 2023-12-11 +4 2023-12-13 +4 2023-12-13 +5 2023-12-12 +5 2023-12-12 +5 2023-12-12 +5 2023-12-12 +5 2023-12-14 +5 2023-12-14 +5 2023-12-16 +5 2023-12-16 + +-- !query1_1_before -- +1 2023-12-09 +1 2023-12-09 +1 2023-12-09 +1 2023-12-09 +2 2023-12-11 +2 2023-12-11 +3 2023-12-12 +3 2023-12-12 +3 2023-12-12 +3 2023-12-12 +3 2023-12-13 +3 2023-12-13 +3 2023-12-13 +3 2023-12-13 +4 2023-12-13 +4 2023-12-13 +5 2023-12-14 +5 2023-12-14 +5 2023-12-16 +5 2023-12-16 + +-- !query1_1_after -- +1 2023-12-09 +1 2023-12-09 +1 2023-12-09 +1 2023-12-09 +2 2023-12-11 +2 2023-12-11 +3 2023-12-12 +3 2023-12-12 +3 2023-12-12 +3 2023-12-12 +3 2023-12-13 +3 2023-12-13 +3 2023-12-13 +3 2023-12-13 +4 2023-12-13 +4 2023-12-13 +5 2023-12-14 +5 2023-12-14 +5 2023-12-16 +5 2023-12-16 + +-- !query1_2_before -- +1 2023-12-08 2023-12-09 +1 2023-12-08 2023-12-09 +1 2023-12-08 2023-12-09 +1 2023-12-08 2023-12-09 +2 2023-12-09 2023-12-11 +2 2023-12-09 2023-12-11 +3 2023-12-10 2023-12-12 +3 2023-12-10 2023-12-12 +3 2023-12-10 2023-12-12 +3 2023-12-10 2023-12-12 +3 2023-12-10 2023-12-13 +3 2023-12-10 2023-12-13 +3 2023-12-10 2023-12-13 +3 2023-12-10 2023-12-13 +4 2023-12-11 2023-12-13 +4 2023-12-11 2023-12-13 +5 2023-12-12 2023-12-14 +5 2023-12-12 2023-12-14 +5 2023-12-12 2023-12-16 +5 2023-12-12 2023-12-16 + +-- !query1_2_after -- +1 2023-12-08 2023-12-09 +1 2023-12-08 2023-12-09 +1 2023-12-08 2023-12-09 +1 2023-12-08 2023-12-09 +2 2023-12-09 2023-12-11 +2 2023-12-09 2023-12-11 +3 2023-12-10 2023-12-12 +3 2023-12-10 2023-12-12 +3 2023-12-10 2023-12-12 +3 2023-12-10 2023-12-12 +3 2023-12-10 2023-12-13 +3 2023-12-10 2023-12-13 +3 2023-12-10 2023-12-13 +3 2023-12-10 2023-12-13 +4 2023-12-11 2023-12-13 +4 2023-12-11 2023-12-13 +5 2023-12-12 2023-12-14 +5 2023-12-12 2023-12-14 +5 2023-12-12 2023-12-16 +5 2023-12-12 2023-12-16 + +-- !query1_3_before -- +1 2023-12-08 +1 2023-12-08 +1 2023-12-08 +1 2023-12-08 +2 2023-12-09 +2 2023-12-09 +2 2023-12-09 +2 2023-12-09 +3 2023-12-10 +3 2023-12-10 +3 2023-12-10 +3 2023-12-10 +4 \N +4 \N +5 2023-12-12 +5 2023-12-12 +5 2023-12-12 +5 2023-12-12 + +-- !query1_3_after -- +1 2023-12-08 +1 2023-12-08 +1 2023-12-08 +1 2023-12-08 +2 2023-12-09 +2 2023-12-09 +2 2023-12-09 +2 2023-12-09 +3 2023-12-10 +3 2023-12-10 +3 2023-12-10 +3 2023-12-10 +4 \N +4 \N +5 2023-12-12 +5 2023-12-12 +5 2023-12-12 +5 2023-12-12 + +-- !query2_0_before -- +2023-12-08 1 yy 1 2 +2023-12-08 1 yy 1 2 +2023-12-08 1 yy 1 2 +2023-12-08 1 yy 1 2 +2023-12-08 1 yy 1 2 +2023-12-08 1 yy 1 2 +2023-12-08 1 yy 1 2 +2023-12-08 1 yy 1 2 +2023-12-09 1 yy 1 2 +2023-12-09 1 yy 1 2 +2023-12-09 1 yy 1 2 +2023-12-09 1 yy 1 2 +2023-12-10 1 yy 3 2 +2023-12-10 1 yy 3 2 +2023-12-10 1 yy 3 2 +2023-12-10 1 yy 3 2 +2023-12-12 1 yy 3 2 +2023-12-12 1 yy 3 2 +2023-12-12 1 yy 3 2 +2023-12-12 1 yy 3 2 +2023-12-12 2 mi 5 2 +2023-12-12 2 mi 5 2 +2023-12-12 2 mi 5 2 +2023-12-12 2 mi 5 2 +2023-12-13 1 yy 3 2 +2023-12-13 1 yy 3 2 +2023-12-13 1 yy 3 2 +2023-12-13 1 yy 3 2 +2023-12-14 2 mi 5 2 +2023-12-14 2 mi 5 2 +2023-12-16 2 mi 5 2 +2023-12-16 2 mi 5 2 + +-- !query2_0_after -- +2023-12-08 1 yy 1 2 +2023-12-08 1 yy 1 2 +2023-12-08 1 yy 1 2 +2023-12-08 1 yy 1 2 +2023-12-08 1 yy 1 2 +2023-12-08 1 yy 1 2 +2023-12-08 1 yy 1 2 +2023-12-08 1 yy 1 2 +2023-12-09 1 yy 1 2 +2023-12-09 1 yy 1 2 +2023-12-09 1 yy 1 2 +2023-12-09 1 yy 1 2 +2023-12-10 1 yy 3 2 +2023-12-10 1 yy 3 2 +2023-12-10 1 yy 3 2 +2023-12-10 1 yy 3 2 +2023-12-12 1 yy 3 2 +2023-12-12 1 yy 3 2 +2023-12-12 1 yy 3 2 +2023-12-12 1 yy 3 2 +2023-12-12 2 mi 5 2 +2023-12-12 2 mi 5 2 +2023-12-12 2 mi 5 2 +2023-12-12 2 mi 5 2 +2023-12-13 1 yy 3 2 +2023-12-13 1 yy 3 2 +2023-12-13 1 yy 3 2 +2023-12-13 1 yy 3 2 +2023-12-14 2 mi 5 2 +2023-12-14 2 mi 5 2 +2023-12-16 2 mi 5 2 +2023-12-16 2 mi 5 2 + +-- !query2_1_before -- +2023-12-09 1 yy 1 2 +2023-12-09 1 yy 1 2 +2023-12-09 1 yy 1 2 +2023-12-09 1 yy 1 2 +2023-12-12 1 yy 3 2 +2023-12-12 1 yy 3 2 +2023-12-12 1 yy 3 2 +2023-12-12 1 yy 3 2 +2023-12-13 1 yy 3 2 +2023-12-13 1 yy 3 2 +2023-12-13 1 yy 3 2 +2023-12-13 1 yy 3 2 +2023-12-14 2 mi 5 2 +2023-12-14 2 mi 5 2 +2023-12-16 2 mi 5 2 +2023-12-16 2 mi 5 2 + +-- !query2_1_after -- +2023-12-09 1 yy 1 2 +2023-12-09 1 yy 1 2 +2023-12-09 1 yy 1 2 +2023-12-09 1 yy 1 2 +2023-12-12 1 yy 3 2 +2023-12-12 1 yy 3 2 +2023-12-12 1 yy 3 2 +2023-12-12 1 yy 3 2 +2023-12-13 1 yy 3 2 +2023-12-13 1 yy 3 2 +2023-12-13 1 yy 3 2 +2023-12-13 1 yy 3 2 +2023-12-14 2 mi 5 2 +2023-12-14 2 mi 5 2 +2023-12-16 2 mi 5 2 +2023-12-16 2 mi 5 2 + +-- !query2_2_before -- +2023-12-09 2023-12-08 yy 1 2 +2023-12-09 2023-12-08 yy 1 2 +2023-12-09 2023-12-08 yy 1 2 +2023-12-09 2023-12-08 yy 1 2 +2023-12-12 2023-12-10 yy 3 2 +2023-12-12 2023-12-10 yy 3 2 +2023-12-12 2023-12-10 yy 3 2 +2023-12-12 2023-12-10 yy 3 2 +2023-12-13 2023-12-10 yy 3 2 +2023-12-13 2023-12-10 yy 3 2 +2023-12-13 2023-12-10 yy 3 2 +2023-12-13 2023-12-10 yy 3 2 +2023-12-14 2023-12-12 mi 5 2 +2023-12-14 2023-12-12 mi 5 2 +2023-12-16 2023-12-12 mi 5 2 +2023-12-16 2023-12-12 mi 5 2 + +-- !query2_2_after -- +2023-12-09 2023-12-08 yy 1 2 +2023-12-09 2023-12-08 yy 1 2 +2023-12-09 2023-12-08 yy 1 2 +2023-12-09 2023-12-08 yy 1 2 +2023-12-12 2023-12-10 yy 3 2 +2023-12-12 2023-12-10 yy 3 2 +2023-12-12 2023-12-10 yy 3 2 +2023-12-12 2023-12-10 yy 3 2 +2023-12-13 2023-12-10 yy 3 2 +2023-12-13 2023-12-10 yy 3 2 +2023-12-13 2023-12-10 yy 3 2 +2023-12-13 2023-12-10 yy 3 2 +2023-12-14 2023-12-12 mi 5 2 +2023-12-14 2023-12-12 mi 5 2 +2023-12-16 2023-12-12 mi 5 2 +2023-12-16 2023-12-12 mi 5 2 + +-- !query3_0_before -- +2023-12-08 1 yy 1 2 +2023-12-08 1 yy 1 2 +2023-12-08 1 yy 1 2 +2023-12-08 1 yy 1 2 +2023-12-08 1 yy 1 2 +2023-12-08 1 yy 1 2 +2023-12-08 1 yy 1 2 +2023-12-08 1 yy 1 2 +2023-12-09 1 yy 1 2 +2023-12-09 1 yy 1 2 +2023-12-09 1 yy 1 2 +2023-12-09 1 yy 1 2 +2023-12-10 1 yy 3 2 +2023-12-10 1 yy 3 2 +2023-12-10 1 yy 3 2 +2023-12-10 1 yy 3 2 +2023-12-12 1 yy 3 2 +2023-12-12 1 yy 3 2 +2023-12-12 1 yy 3 2 +2023-12-12 1 yy 3 2 +2023-12-12 2 mi 5 2 +2023-12-12 2 mi 5 2 +2023-12-12 2 mi 5 2 +2023-12-12 2 mi 5 2 +2023-12-13 1 yy 3 2 +2023-12-13 1 yy 3 2 +2023-12-13 1 yy 3 2 +2023-12-13 1 yy 3 2 +2023-12-14 2 mi 5 2 +2023-12-14 2 mi 5 2 +2023-12-16 2 mi 5 2 +2023-12-16 2 mi 5 2 + +-- !query3_0_after -- +2023-12-08 1 yy 1 2 +2023-12-08 1 yy 1 2 +2023-12-08 1 yy 1 2 +2023-12-08 1 yy 1 2 +2023-12-08 1 yy 1 2 +2023-12-08 1 yy 1 2 +2023-12-08 1 yy 1 2 +2023-12-08 1 yy 1 2 +2023-12-09 1 yy 1 2 +2023-12-09 1 yy 1 2 +2023-12-09 1 yy 1 2 +2023-12-09 1 yy 1 2 +2023-12-10 1 yy 3 2 +2023-12-10 1 yy 3 2 +2023-12-10 1 yy 3 2 +2023-12-10 1 yy 3 2 +2023-12-12 1 yy 3 2 +2023-12-12 1 yy 3 2 +2023-12-12 1 yy 3 2 +2023-12-12 1 yy 3 2 +2023-12-12 2 mi 5 2 +2023-12-12 2 mi 5 2 +2023-12-12 2 mi 5 2 +2023-12-12 2 mi 5 2 +2023-12-13 1 yy 3 2 +2023-12-13 1 yy 3 2 +2023-12-13 1 yy 3 2 +2023-12-13 1 yy 3 2 +2023-12-14 2 mi 5 2 +2023-12-14 2 mi 5 2 +2023-12-16 2 mi 5 2 +2023-12-16 2 mi 5 2 + +-- !query3_1_before -- +2023-12-09 1 yy 1 2 +2023-12-09 1 yy 1 2 +2023-12-09 1 yy 1 2 +2023-12-09 1 yy 1 2 +2023-12-12 1 yy 3 2 +2023-12-12 1 yy 3 2 +2023-12-12 1 yy 3 2 +2023-12-12 1 yy 3 2 +2023-12-13 1 yy 3 2 +2023-12-13 1 yy 3 2 +2023-12-13 1 yy 3 2 +2023-12-13 1 yy 3 2 +2023-12-14 2 mi 5 2 +2023-12-14 2 mi 5 2 +2023-12-16 2 mi 5 2 +2023-12-16 2 mi 5 2 + +-- !query3_1_after -- +2023-12-09 1 yy 1 2 +2023-12-09 1 yy 1 2 +2023-12-09 1 yy 1 2 +2023-12-09 1 yy 1 2 +2023-12-12 1 yy 3 2 +2023-12-12 1 yy 3 2 +2023-12-12 1 yy 3 2 +2023-12-12 1 yy 3 2 +2023-12-13 1 yy 3 2 +2023-12-13 1 yy 3 2 +2023-12-13 1 yy 3 2 +2023-12-13 1 yy 3 2 +2023-12-14 2 mi 5 2 +2023-12-14 2 mi 5 2 +2023-12-16 2 mi 5 2 +2023-12-16 2 mi 5 2 + +-- !query3_2_before -- +2023-12-09 2023-12-08 yy 1 2 +2023-12-09 2023-12-08 yy 1 2 +2023-12-09 2023-12-08 yy 1 2 +2023-12-09 2023-12-08 yy 1 2 +2023-12-12 2023-12-10 yy 3 2 +2023-12-12 2023-12-10 yy 3 2 +2023-12-12 2023-12-10 yy 3 2 +2023-12-12 2023-12-10 yy 3 2 +2023-12-13 2023-12-10 yy 3 2 +2023-12-13 2023-12-10 yy 3 2 +2023-12-13 2023-12-10 yy 3 2 +2023-12-13 2023-12-10 yy 3 2 +2023-12-14 2023-12-12 mi 5 2 +2023-12-14 2023-12-12 mi 5 2 +2023-12-16 2023-12-12 mi 5 2 +2023-12-16 2023-12-12 mi 5 2 + +-- !query3_2_after -- +2023-12-09 2023-12-08 yy 1 2 +2023-12-09 2023-12-08 yy 1 2 +2023-12-09 2023-12-08 yy 1 2 +2023-12-09 2023-12-08 yy 1 2 +2023-12-12 2023-12-10 yy 3 2 +2023-12-12 2023-12-10 yy 3 2 +2023-12-12 2023-12-10 yy 3 2 +2023-12-12 2023-12-10 yy 3 2 +2023-12-13 2023-12-10 yy 3 2 +2023-12-13 2023-12-10 yy 3 2 +2023-12-13 2023-12-10 yy 3 2 +2023-12-13 2023-12-10 yy 3 2 +2023-12-14 2023-12-12 mi 5 2 +2023-12-14 2023-12-12 mi 5 2 +2023-12-16 2023-12-12 mi 5 2 +2023-12-16 2023-12-12 mi 5 2 + +-- !query3_3_before -- +2023-12-07 2023-12-08 yy 1 2 +2023-12-07 2023-12-08 yy 1 2 +2023-12-07 2023-12-08 yy 1 2 +2023-12-07 2023-12-08 yy 1 2 +2023-12-08 2023-12-08 yy 1 2 +2023-12-08 2023-12-08 yy 1 2 +2023-12-08 2023-12-08 yy 1 2 +2023-12-08 2023-12-08 yy 1 2 +2023-12-08 2023-12-08 yy 1 2 +2023-12-08 2023-12-08 yy 1 2 +2023-12-08 2023-12-08 yy 1 2 +2023-12-08 2023-12-08 yy 1 2 +2023-12-08 2023-12-09 yy 2 \N +2023-12-08 2023-12-09 yy 2 \N +2023-12-09 2023-12-08 yy 1 2 +2023-12-09 2023-12-08 yy 1 2 +2023-12-09 2023-12-08 yy 1 2 +2023-12-09 2023-12-08 yy 1 2 +2023-12-09 2023-12-09 yy 2 \N +2023-12-09 2023-12-09 yy 2 \N +2023-12-09 2023-12-10 yy 3 2 +2023-12-09 2023-12-10 yy 3 2 +2023-12-09 2023-12-10 yy 3 2 +2023-12-09 2023-12-10 yy 3 2 +2023-12-10 2023-12-10 yy 3 2 +2023-12-10 2023-12-10 yy 3 2 +2023-12-10 2023-12-10 yy 3 2 +2023-12-10 2023-12-10 yy 3 2 +2023-12-10 2023-12-11 mm 4 \N +2023-12-10 2023-12-11 mm 4 \N +2023-12-11 2023-12-09 yy 2 \N +2023-12-11 2023-12-09 yy 2 \N +2023-12-11 2023-12-11 mm 4 \N +2023-12-11 2023-12-11 mm 4 \N +2023-12-12 2023-12-10 yy 3 2 +2023-12-12 2023-12-10 yy 3 2 +2023-12-12 2023-12-10 yy 3 2 +2023-12-12 2023-12-10 yy 3 2 +2023-12-12 2023-12-12 mi 5 2 +2023-12-12 2023-12-12 mi 5 2 +2023-12-12 2023-12-12 mi 5 2 +2023-12-12 2023-12-12 mi 5 2 +2023-12-12 2023-12-12 mi 5 2 +2023-12-12 2023-12-12 mi 5 2 +2023-12-12 2023-12-12 mi 5 2 +2023-12-12 2023-12-12 mi 5 2 +2023-12-13 2023-12-10 yy 3 2 +2023-12-13 2023-12-10 yy 3 2 +2023-12-13 2023-12-10 yy 3 2 +2023-12-13 2023-12-10 yy 3 2 +2023-12-13 2023-12-11 mm 4 \N +2023-12-13 2023-12-11 mm 4 \N +2023-12-14 2023-12-12 mi 5 2 +2023-12-14 2023-12-12 mi 5 2 +2023-12-14 2023-12-12 mi 5 2 +2023-12-14 2023-12-12 mi 5 2 +2023-12-16 2023-12-12 mi 5 2 +2023-12-16 2023-12-12 mi 5 2 +2023-12-16 2023-12-12 mi 5 2 +2023-12-16 2023-12-12 mi 5 2 + +-- !query3_3_after -- +2023-12-07 2023-12-08 yy 1 2 +2023-12-07 2023-12-08 yy 1 2 +2023-12-07 2023-12-08 yy 1 2 +2023-12-07 2023-12-08 yy 1 2 +2023-12-08 2023-12-08 yy 1 2 +2023-12-08 2023-12-08 yy 1 2 +2023-12-08 2023-12-08 yy 1 2 +2023-12-08 2023-12-08 yy 1 2 +2023-12-08 2023-12-08 yy 1 2 +2023-12-08 2023-12-08 yy 1 2 +2023-12-08 2023-12-08 yy 1 2 +2023-12-08 2023-12-08 yy 1 2 +2023-12-08 2023-12-09 yy 2 \N +2023-12-08 2023-12-09 yy 2 \N +2023-12-09 2023-12-08 yy 1 2 +2023-12-09 2023-12-08 yy 1 2 +2023-12-09 2023-12-08 yy 1 2 +2023-12-09 2023-12-08 yy 1 2 +2023-12-09 2023-12-09 yy 2 \N +2023-12-09 2023-12-09 yy 2 \N +2023-12-09 2023-12-10 yy 3 2 +2023-12-09 2023-12-10 yy 3 2 +2023-12-09 2023-12-10 yy 3 2 +2023-12-09 2023-12-10 yy 3 2 +2023-12-10 2023-12-10 yy 3 2 +2023-12-10 2023-12-10 yy 3 2 +2023-12-10 2023-12-10 yy 3 2 +2023-12-10 2023-12-10 yy 3 2 +2023-12-10 2023-12-11 mm 4 \N +2023-12-10 2023-12-11 mm 4 \N +2023-12-11 2023-12-09 yy 2 \N +2023-12-11 2023-12-09 yy 2 \N +2023-12-11 2023-12-11 mm 4 \N +2023-12-11 2023-12-11 mm 4 \N +2023-12-12 2023-12-10 yy 3 2 +2023-12-12 2023-12-10 yy 3 2 +2023-12-12 2023-12-10 yy 3 2 +2023-12-12 2023-12-10 yy 3 2 +2023-12-12 2023-12-12 mi 5 2 +2023-12-12 2023-12-12 mi 5 2 +2023-12-12 2023-12-12 mi 5 2 +2023-12-12 2023-12-12 mi 5 2 +2023-12-12 2023-12-12 mi 5 2 +2023-12-12 2023-12-12 mi 5 2 +2023-12-12 2023-12-12 mi 5 2 +2023-12-12 2023-12-12 mi 5 2 +2023-12-13 2023-12-10 yy 3 2 +2023-12-13 2023-12-10 yy 3 2 +2023-12-13 2023-12-10 yy 3 2 +2023-12-13 2023-12-10 yy 3 2 +2023-12-13 2023-12-11 mm 4 \N +2023-12-13 2023-12-11 mm 4 \N +2023-12-14 2023-12-12 mi 5 2 +2023-12-14 2023-12-12 mi 5 2 +2023-12-14 2023-12-12 mi 5 2 +2023-12-14 2023-12-12 mi 5 2 +2023-12-16 2023-12-12 mi 5 2 +2023-12-16 2023-12-12 mi 5 2 +2023-12-16 2023-12-12 mi 5 2 +2023-12-16 2023-12-12 mi 5 2 + +-- !query3_4_before -- +2023-12-09 2023-12-08 yy 1 2 +2023-12-09 2023-12-08 yy 1 2 +2023-12-09 2023-12-08 yy 1 2 +2023-12-09 2023-12-08 yy 1 2 +2023-12-12 2023-12-10 yy 3 2 +2023-12-12 2023-12-10 yy 3 2 +2023-12-12 2023-12-10 yy 3 2 +2023-12-12 2023-12-10 yy 3 2 +2023-12-13 2023-12-10 yy 3 2 +2023-12-13 2023-12-10 yy 3 2 +2023-12-13 2023-12-10 yy 3 2 +2023-12-13 2023-12-10 yy 3 2 +2023-12-14 2023-12-12 mi 5 2 +2023-12-14 2023-12-12 mi 5 2 +2023-12-16 2023-12-12 mi 5 2 +2023-12-16 2023-12-12 mi 5 2 + +-- !query3_4_after -- +2023-12-09 2023-12-08 yy 1 2 +2023-12-09 2023-12-08 yy 1 2 +2023-12-09 2023-12-08 yy 1 2 +2023-12-09 2023-12-08 yy 1 2 +2023-12-12 2023-12-10 yy 3 2 +2023-12-12 2023-12-10 yy 3 2 +2023-12-12 2023-12-10 yy 3 2 +2023-12-12 2023-12-10 yy 3 2 +2023-12-13 2023-12-10 yy 3 2 +2023-12-13 2023-12-10 yy 3 2 +2023-12-13 2023-12-10 yy 3 2 +2023-12-13 2023-12-10 yy 3 2 +2023-12-14 2023-12-12 mi 5 2 +2023-12-14 2023-12-12 mi 5 2 +2023-12-16 2023-12-12 mi 5 2 +2023-12-16 2023-12-12 mi 5 2 + +-- !query3_5_before -- +2023-12-08 1 yy 1 2 +2023-12-08 1 yy 1 2 +2023-12-08 1 yy 1 2 +2023-12-08 1 yy 1 2 +2023-12-08 1 yy 1 2 +2023-12-08 1 yy 1 2 +2023-12-08 1 yy 1 2 +2023-12-08 1 yy 1 2 +2023-12-09 1 yy 1 2 +2023-12-09 1 yy 1 2 +2023-12-09 1 yy 1 2 +2023-12-09 1 yy 1 2 +2023-12-10 1 yy 3 2 +2023-12-10 1 yy 3 2 +2023-12-10 1 yy 3 2 +2023-12-10 1 yy 3 2 +2023-12-12 1 yy 3 2 +2023-12-12 1 yy 3 2 +2023-12-12 1 yy 3 2 +2023-12-12 1 yy 3 2 +2023-12-12 2 mi 5 2 +2023-12-12 2 mi 5 2 +2023-12-12 2 mi 5 2 +2023-12-12 2 mi 5 2 +2023-12-13 1 yy 3 2 +2023-12-13 1 yy 3 2 +2023-12-13 1 yy 3 2 +2023-12-13 1 yy 3 2 +2023-12-14 2 mi 5 2 +2023-12-14 2 mi 5 2 +2023-12-16 2 mi 5 2 +2023-12-16 2 mi 5 2 + +-- !query3_5_after -- +2023-12-08 1 yy 1 2 +2023-12-08 1 yy 1 2 +2023-12-08 1 yy 1 2 +2023-12-08 1 yy 1 2 +2023-12-08 1 yy 1 2 +2023-12-08 1 yy 1 2 +2023-12-08 1 yy 1 2 +2023-12-08 1 yy 1 2 +2023-12-09 1 yy 1 2 +2023-12-09 1 yy 1 2 +2023-12-09 1 yy 1 2 +2023-12-09 1 yy 1 2 +2023-12-10 1 yy 3 2 +2023-12-10 1 yy 3 2 +2023-12-10 1 yy 3 2 +2023-12-10 1 yy 3 2 +2023-12-12 1 yy 3 2 +2023-12-12 1 yy 3 2 +2023-12-12 1 yy 3 2 +2023-12-12 1 yy 3 2 +2023-12-12 2 mi 5 2 +2023-12-12 2 mi 5 2 +2023-12-12 2 mi 5 2 +2023-12-12 2 mi 5 2 +2023-12-13 1 yy 3 2 +2023-12-13 1 yy 3 2 +2023-12-13 1 yy 3 2 +2023-12-13 1 yy 3 2 +2023-12-14 2 mi 5 2 +2023-12-14 2 mi 5 2 +2023-12-16 2 mi 5 2 +2023-12-16 2 mi 5 2 + +-- !query3_6_before -- +2023-12-08 1 yy 1 2 +2023-12-08 1 yy 1 2 +2023-12-08 1 yy 1 2 +2023-12-08 1 yy 1 2 +2023-12-08 1 yy 1 2 +2023-12-08 1 yy 1 2 +2023-12-08 1 yy 1 2 +2023-12-08 1 yy 1 2 +2023-12-09 1 yy 1 2 +2023-12-09 1 yy 1 2 +2023-12-09 1 yy 1 2 +2023-12-09 1 yy 1 2 +2023-12-10 1 yy 3 2 +2023-12-10 1 yy 3 2 +2023-12-10 1 yy 3 2 +2023-12-10 1 yy 3 2 +2023-12-12 1 yy 3 2 +2023-12-12 1 yy 3 2 +2023-12-12 1 yy 3 2 +2023-12-12 1 yy 3 2 +2023-12-12 2 mi 5 2 +2023-12-12 2 mi 5 2 +2023-12-12 2 mi 5 2 +2023-12-12 2 mi 5 2 +2023-12-13 1 yy 3 2 +2023-12-13 1 yy 3 2 +2023-12-13 1 yy 3 2 +2023-12-13 1 yy 3 2 +2023-12-14 2 mi 5 2 +2023-12-14 2 mi 5 2 +2023-12-16 2 mi 5 2 +2023-12-16 2 mi 5 2 + +-- !query3_6_after -- +2023-12-08 1 yy 1 2 +2023-12-08 1 yy 1 2 +2023-12-08 1 yy 1 2 +2023-12-08 1 yy 1 2 +2023-12-08 1 yy 1 2 +2023-12-08 1 yy 1 2 +2023-12-08 1 yy 1 2 +2023-12-08 1 yy 1 2 +2023-12-09 1 yy 1 2 +2023-12-09 1 yy 1 2 +2023-12-09 1 yy 1 2 +2023-12-09 1 yy 1 2 +2023-12-10 1 yy 3 2 +2023-12-10 1 yy 3 2 +2023-12-10 1 yy 3 2 +2023-12-10 1 yy 3 2 +2023-12-12 1 yy 3 2 +2023-12-12 1 yy 3 2 +2023-12-12 1 yy 3 2 +2023-12-12 1 yy 3 2 +2023-12-12 2 mi 5 2 +2023-12-12 2 mi 5 2 +2023-12-12 2 mi 5 2 +2023-12-12 2 mi 5 2 +2023-12-13 1 yy 3 2 +2023-12-13 1 yy 3 2 +2023-12-13 1 yy 3 2 +2023-12-13 1 yy 3 2 +2023-12-14 2 mi 5 2 +2023-12-14 2 mi 5 2 +2023-12-16 2 mi 5 2 +2023-12-16 2 mi 5 2 + +-- !query4_0_before -- +1 2023-12-08 +1 2023-12-08 +1 2023-12-08 +1 2023-12-08 +1 2023-12-08 +1 2023-12-08 +1 2023-12-08 +1 2023-12-08 +1 2023-12-09 +1 2023-12-09 +1 2023-12-09 +1 2023-12-09 +3 2023-12-10 +3 2023-12-10 +3 2023-12-10 +3 2023-12-10 +3 2023-12-12 +3 2023-12-12 +3 2023-12-12 +3 2023-12-12 +3 2023-12-13 +3 2023-12-13 +3 2023-12-13 +3 2023-12-13 +5 2023-12-12 +5 2023-12-12 +5 2023-12-12 +5 2023-12-12 +5 2023-12-14 +5 2023-12-14 +5 2023-12-16 +5 2023-12-16 + +-- !query4_0_after -- +1 2023-12-08 +1 2023-12-08 +1 2023-12-08 +1 2023-12-08 +1 2023-12-08 +1 2023-12-08 +1 2023-12-08 +1 2023-12-08 +1 2023-12-09 +1 2023-12-09 +1 2023-12-09 +1 2023-12-09 +3 2023-12-10 +3 2023-12-10 +3 2023-12-10 +3 2023-12-10 +3 2023-12-12 +3 2023-12-12 +3 2023-12-12 +3 2023-12-12 +3 2023-12-13 +3 2023-12-13 +3 2023-12-13 +3 2023-12-13 +5 2023-12-12 +5 2023-12-12 +5 2023-12-12 +5 2023-12-12 +5 2023-12-14 +5 2023-12-14 +5 2023-12-16 +5 2023-12-16 + +-- !query4_1_before -- +1 2023-12-09 +1 2023-12-09 +1 2023-12-09 +1 2023-12-09 +3 2023-12-12 +3 2023-12-12 +3 2023-12-12 +3 2023-12-12 +3 2023-12-13 +3 2023-12-13 +3 2023-12-13 +3 2023-12-13 +5 2023-12-14 +5 2023-12-14 +5 2023-12-16 +5 2023-12-16 + +-- !query4_1_after -- +1 2023-12-09 +1 2023-12-09 +1 2023-12-09 +1 2023-12-09 +3 2023-12-12 +3 2023-12-12 +3 2023-12-12 +3 2023-12-12 +3 2023-12-13 +3 2023-12-13 +3 2023-12-13 +3 2023-12-13 +5 2023-12-14 +5 2023-12-14 +5 2023-12-16 +5 2023-12-16 + +-- !query4_2_before -- +1 2023-12-08 2023-12-09 +1 2023-12-08 2023-12-09 +1 2023-12-08 2023-12-09 +1 2023-12-08 2023-12-09 +3 2023-12-10 2023-12-12 +3 2023-12-10 2023-12-12 +3 2023-12-10 2023-12-12 +3 2023-12-10 2023-12-12 +3 2023-12-10 2023-12-13 +3 2023-12-10 2023-12-13 +3 2023-12-10 2023-12-13 +3 2023-12-10 2023-12-13 +5 2023-12-12 2023-12-14 +5 2023-12-12 2023-12-14 +5 2023-12-12 2023-12-16 +5 2023-12-12 2023-12-16 + +-- !query4_2_after -- +1 2023-12-08 2023-12-09 +1 2023-12-08 2023-12-09 +1 2023-12-08 2023-12-09 +1 2023-12-08 2023-12-09 +3 2023-12-10 2023-12-12 +3 2023-12-10 2023-12-12 +3 2023-12-10 2023-12-12 +3 2023-12-10 2023-12-12 +3 2023-12-10 2023-12-13 +3 2023-12-10 2023-12-13 +3 2023-12-10 2023-12-13 +3 2023-12-10 2023-12-13 +5 2023-12-12 2023-12-14 +5 2023-12-12 2023-12-14 +5 2023-12-12 2023-12-16 +5 2023-12-12 2023-12-16 + +-- !query4_3_before -- +1 2023-12-08 +1 2023-12-08 +1 2023-12-08 +1 2023-12-08 +1 2023-12-08 +1 2023-12-08 +1 2023-12-08 +1 2023-12-08 +1 2023-12-09 +1 2023-12-09 +1 2023-12-09 +1 2023-12-09 +3 2023-12-10 +3 2023-12-10 +3 2023-12-10 +3 2023-12-10 +3 2023-12-12 +3 2023-12-12 +3 2023-12-12 +3 2023-12-12 +3 2023-12-13 +3 2023-12-13 +3 2023-12-13 +3 2023-12-13 +5 2023-12-12 +5 2023-12-12 +5 2023-12-12 +5 2023-12-12 +5 2023-12-14 +5 2023-12-14 +5 2023-12-16 +5 2023-12-16 + +-- !query4_3_after -- +1 2023-12-08 +1 2023-12-08 +1 2023-12-08 +1 2023-12-08 +1 2023-12-08 +1 2023-12-08 +1 2023-12-08 +1 2023-12-08 +1 2023-12-09 +1 2023-12-09 +1 2023-12-09 +1 2023-12-09 +3 2023-12-10 +3 2023-12-10 +3 2023-12-10 +3 2023-12-10 +3 2023-12-12 +3 2023-12-12 +3 2023-12-12 +3 2023-12-12 +3 2023-12-13 +3 2023-12-13 +3 2023-12-13 +3 2023-12-13 +5 2023-12-12 +5 2023-12-12 +5 2023-12-12 +5 2023-12-12 +5 2023-12-14 +5 2023-12-14 +5 2023-12-16 +5 2023-12-16 + +-- !query4_4_before -- +\N 2023-12-07 +\N 2023-12-08 +\N 2023-12-09 +\N 2023-12-10 +1 2023-12-08 +1 2023-12-08 +1 2023-12-08 +1 2023-12-08 +1 2023-12-08 +1 2023-12-08 +1 2023-12-08 +1 2023-12-08 +1 2023-12-09 +1 2023-12-09 +1 2023-12-09 +1 2023-12-09 +2 2023-12-09 +2 2023-12-09 +2 2023-12-11 +2 2023-12-11 +3 2023-12-10 +3 2023-12-10 +3 2023-12-10 +3 2023-12-10 +3 2023-12-12 +3 2023-12-12 +3 2023-12-12 +3 2023-12-12 +3 2023-12-13 +3 2023-12-13 +3 2023-12-13 +3 2023-12-13 +4 2023-12-11 +4 2023-12-11 +4 2023-12-13 +4 2023-12-13 +5 2023-12-12 +5 2023-12-12 +5 2023-12-12 +5 2023-12-12 +5 2023-12-14 +5 2023-12-14 +5 2023-12-16 +5 2023-12-16 + +-- !query4_4_after -- +\N 2023-12-07 +\N 2023-12-08 +\N 2023-12-09 +\N 2023-12-10 +1 2023-12-08 +1 2023-12-08 +1 2023-12-08 +1 2023-12-08 +1 2023-12-08 +1 2023-12-08 +1 2023-12-08 +1 2023-12-08 +1 2023-12-09 +1 2023-12-09 +1 2023-12-09 +1 2023-12-09 +2 2023-12-09 +2 2023-12-09 +2 2023-12-11 +2 2023-12-11 +3 2023-12-10 +3 2023-12-10 +3 2023-12-10 +3 2023-12-10 +3 2023-12-12 +3 2023-12-12 +3 2023-12-12 +3 2023-12-12 +3 2023-12-13 +3 2023-12-13 +3 2023-12-13 +3 2023-12-13 +4 2023-12-11 +4 2023-12-11 +4 2023-12-13 +4 2023-12-13 +5 2023-12-12 +5 2023-12-12 +5 2023-12-12 +5 2023-12-12 +5 2023-12-14 +5 2023-12-14 +5 2023-12-16 +5 2023-12-16 + +-- !query5_0_before -- +2023-12-08 1 yy 1 2 +2023-12-08 1 yy 1 2 +2023-12-08 1 yy 1 2 +2023-12-08 1 yy 1 2 +2023-12-08 1 yy 1 2 +2023-12-08 1 yy 1 2 +2023-12-08 1 yy 1 2 +2023-12-08 1 yy 1 2 +2023-12-09 1 yy 1 2 +2023-12-09 1 yy 1 2 +2023-12-09 1 yy 1 2 +2023-12-09 1 yy 1 2 +2023-12-10 1 yy 3 2 +2023-12-10 1 yy 3 2 +2023-12-10 1 yy 3 2 +2023-12-10 1 yy 3 2 +2023-12-12 1 yy 3 2 +2023-12-12 1 yy 3 2 +2023-12-12 1 yy 3 2 +2023-12-12 1 yy 3 2 +2023-12-12 2 mi 5 2 +2023-12-12 2 mi 5 2 +2023-12-12 2 mi 5 2 +2023-12-12 2 mi 5 2 +2023-12-13 1 yy 3 2 +2023-12-13 1 yy 3 2 +2023-12-13 1 yy 3 2 +2023-12-13 1 yy 3 2 +2023-12-14 2 mi 5 2 +2023-12-14 2 mi 5 2 +2023-12-16 2 mi 5 2 +2023-12-16 2 mi 5 2 + +-- !query5_0_after -- +2023-12-08 1 yy 1 2 +2023-12-08 1 yy 1 2 +2023-12-08 1 yy 1 2 +2023-12-08 1 yy 1 2 +2023-12-08 1 yy 1 2 +2023-12-08 1 yy 1 2 +2023-12-08 1 yy 1 2 +2023-12-08 1 yy 1 2 +2023-12-09 1 yy 1 2 +2023-12-09 1 yy 1 2 +2023-12-09 1 yy 1 2 +2023-12-09 1 yy 1 2 +2023-12-10 1 yy 3 2 +2023-12-10 1 yy 3 2 +2023-12-10 1 yy 3 2 +2023-12-10 1 yy 3 2 +2023-12-12 1 yy 3 2 +2023-12-12 1 yy 3 2 +2023-12-12 1 yy 3 2 +2023-12-12 1 yy 3 2 +2023-12-12 2 mi 5 2 +2023-12-12 2 mi 5 2 +2023-12-12 2 mi 5 2 +2023-12-12 2 mi 5 2 +2023-12-13 1 yy 3 2 +2023-12-13 1 yy 3 2 +2023-12-13 1 yy 3 2 +2023-12-13 1 yy 3 2 +2023-12-14 2 mi 5 2 +2023-12-14 2 mi 5 2 +2023-12-16 2 mi 5 2 +2023-12-16 2 mi 5 2 + +-- !query5_1_before -- +2023-12-09 1 yy 1 2 +2023-12-09 1 yy 1 2 +2023-12-09 1 yy 1 2 +2023-12-09 1 yy 1 2 +2023-12-12 1 yy 3 2 +2023-12-12 1 yy 3 2 +2023-12-12 1 yy 3 2 +2023-12-12 1 yy 3 2 +2023-12-13 1 yy 3 2 +2023-12-13 1 yy 3 2 +2023-12-13 1 yy 3 2 +2023-12-13 1 yy 3 2 +2023-12-14 2 mi 5 2 +2023-12-14 2 mi 5 2 +2023-12-16 2 mi 5 2 +2023-12-16 2 mi 5 2 + +-- !query5_1_after -- +2023-12-09 1 yy 1 2 +2023-12-09 1 yy 1 2 +2023-12-09 1 yy 1 2 +2023-12-09 1 yy 1 2 +2023-12-12 1 yy 3 2 +2023-12-12 1 yy 3 2 +2023-12-12 1 yy 3 2 +2023-12-12 1 yy 3 2 +2023-12-13 1 yy 3 2 +2023-12-13 1 yy 3 2 +2023-12-13 1 yy 3 2 +2023-12-13 1 yy 3 2 +2023-12-14 2 mi 5 2 +2023-12-14 2 mi 5 2 +2023-12-16 2 mi 5 2 +2023-12-16 2 mi 5 2 + +-- !query_5_2_before -- +2023-12-09 2023-12-08 yy 1 2 +2023-12-09 2023-12-08 yy 1 2 +2023-12-09 2023-12-08 yy 1 2 +2023-12-09 2023-12-08 yy 1 2 +2023-12-12 2023-12-10 yy 3 2 +2023-12-12 2023-12-10 yy 3 2 +2023-12-12 2023-12-10 yy 3 2 +2023-12-12 2023-12-10 yy 3 2 +2023-12-13 2023-12-10 yy 3 2 +2023-12-13 2023-12-10 yy 3 2 +2023-12-13 2023-12-10 yy 3 2 +2023-12-13 2023-12-10 yy 3 2 +2023-12-14 2023-12-12 mi 5 2 +2023-12-14 2023-12-12 mi 5 2 +2023-12-16 2023-12-12 mi 5 2 +2023-12-16 2023-12-12 mi 5 2 + +-- !query5_2_after -- +2023-12-09 2023-12-08 yy 1 2 +2023-12-09 2023-12-08 yy 1 2 +2023-12-09 2023-12-08 yy 1 2 +2023-12-09 2023-12-08 yy 1 2 +2023-12-12 2023-12-10 yy 3 2 +2023-12-12 2023-12-10 yy 3 2 +2023-12-12 2023-12-10 yy 3 2 +2023-12-12 2023-12-10 yy 3 2 +2023-12-13 2023-12-10 yy 3 2 +2023-12-13 2023-12-10 yy 3 2 +2023-12-13 2023-12-10 yy 3 2 +2023-12-13 2023-12-10 yy 3 2 +2023-12-14 2023-12-12 mi 5 2 +2023-12-14 2023-12-12 mi 5 2 +2023-12-16 2023-12-12 mi 5 2 +2023-12-16 2023-12-12 mi 5 2 + +-- !query5_3_before -- +1 2023-12-08 +1 2023-12-08 +1 2023-12-08 +1 2023-12-08 +2 2023-12-09 +2 2023-12-09 +2 2023-12-09 +2 2023-12-09 +3 2023-12-10 +3 2023-12-10 +3 2023-12-10 +3 2023-12-10 +5 2023-12-12 +5 2023-12-12 +5 2023-12-12 +5 2023-12-12 + +-- !query5_3_after -- +1 2023-12-08 +1 2023-12-08 +1 2023-12-08 +1 2023-12-08 +2 2023-12-09 +2 2023-12-09 +2 2023-12-09 +2 2023-12-09 +3 2023-12-10 +3 2023-12-10 +3 2023-12-10 +3 2023-12-10 +5 2023-12-12 +5 2023-12-12 +5 2023-12-12 +5 2023-12-12 + +-- !query6_0_before -- +2023-12-08 1 yy 1 2 +2023-12-08 1 yy 1 2 +2023-12-08 1 yy 1 2 +2023-12-08 1 yy 1 2 +2023-12-08 1 yy 1 2 +2023-12-08 1 yy 1 2 +2023-12-08 1 yy 1 2 +2023-12-08 1 yy 1 2 +2023-12-09 1 yy 1 2 +2023-12-09 1 yy 1 2 +2023-12-09 1 yy 1 2 +2023-12-09 1 yy 1 2 +2023-12-10 1 yy 3 2 +2023-12-10 1 yy 3 2 +2023-12-10 1 yy 3 2 +2023-12-10 1 yy 3 2 +2023-12-12 1 yy 3 2 +2023-12-12 1 yy 3 2 +2023-12-12 1 yy 3 2 +2023-12-12 1 yy 3 2 +2023-12-12 2 mi 5 2 +2023-12-12 2 mi 5 2 +2023-12-12 2 mi 5 2 +2023-12-12 2 mi 5 2 +2023-12-13 1 yy 3 2 +2023-12-13 1 yy 3 2 +2023-12-13 1 yy 3 2 +2023-12-13 1 yy 3 2 +2023-12-14 2 mi 5 2 +2023-12-14 2 mi 5 2 +2023-12-16 2 mi 5 2 +2023-12-16 2 mi 5 2 + +-- !query6_0_after -- +2023-12-08 1 yy 1 2 +2023-12-08 1 yy 1 2 +2023-12-08 1 yy 1 2 +2023-12-08 1 yy 1 2 +2023-12-08 1 yy 1 2 +2023-12-08 1 yy 1 2 +2023-12-08 1 yy 1 2 +2023-12-08 1 yy 1 2 +2023-12-09 1 yy 1 2 +2023-12-09 1 yy 1 2 +2023-12-09 1 yy 1 2 +2023-12-09 1 yy 1 2 +2023-12-10 1 yy 3 2 +2023-12-10 1 yy 3 2 +2023-12-10 1 yy 3 2 +2023-12-10 1 yy 3 2 +2023-12-12 1 yy 3 2 +2023-12-12 1 yy 3 2 +2023-12-12 1 yy 3 2 +2023-12-12 1 yy 3 2 +2023-12-12 2 mi 5 2 +2023-12-12 2 mi 5 2 +2023-12-12 2 mi 5 2 +2023-12-12 2 mi 5 2 +2023-12-13 1 yy 3 2 +2023-12-13 1 yy 3 2 +2023-12-13 1 yy 3 2 +2023-12-13 1 yy 3 2 +2023-12-14 2 mi 5 2 +2023-12-14 2 mi 5 2 +2023-12-16 2 mi 5 2 +2023-12-16 2 mi 5 2 + +-- !query6_1_before -- +2023-12-09 1 yy 1 2 +2023-12-09 1 yy 1 2 +2023-12-09 1 yy 1 2 +2023-12-09 1 yy 1 2 +2023-12-12 1 yy 3 2 +2023-12-12 1 yy 3 2 +2023-12-12 1 yy 3 2 +2023-12-12 1 yy 3 2 +2023-12-13 1 yy 3 2 +2023-12-13 1 yy 3 2 +2023-12-13 1 yy 3 2 +2023-12-13 1 yy 3 2 +2023-12-14 2 mi 5 2 +2023-12-14 2 mi 5 2 +2023-12-16 2 mi 5 2 +2023-12-16 2 mi 5 2 + +-- !query6_1_after -- +2023-12-09 1 yy 1 2 +2023-12-09 1 yy 1 2 +2023-12-09 1 yy 1 2 +2023-12-09 1 yy 1 2 +2023-12-12 1 yy 3 2 +2023-12-12 1 yy 3 2 +2023-12-12 1 yy 3 2 +2023-12-12 1 yy 3 2 +2023-12-13 1 yy 3 2 +2023-12-13 1 yy 3 2 +2023-12-13 1 yy 3 2 +2023-12-13 1 yy 3 2 +2023-12-14 2 mi 5 2 +2023-12-14 2 mi 5 2 +2023-12-16 2 mi 5 2 +2023-12-16 2 mi 5 2 + +-- !query6_2_before -- +2023-12-09 2023-12-08 yy 1 2 +2023-12-09 2023-12-08 yy 1 2 +2023-12-09 2023-12-08 yy 1 2 +2023-12-09 2023-12-08 yy 1 2 +2023-12-12 2023-12-10 yy 3 2 +2023-12-12 2023-12-10 yy 3 2 +2023-12-12 2023-12-10 yy 3 2 +2023-12-12 2023-12-10 yy 3 2 +2023-12-13 2023-12-10 yy 3 2 +2023-12-13 2023-12-10 yy 3 2 +2023-12-13 2023-12-10 yy 3 2 +2023-12-13 2023-12-10 yy 3 2 +2023-12-14 2023-12-12 mi 5 2 +2023-12-14 2023-12-12 mi 5 2 +2023-12-16 2023-12-12 mi 5 2 +2023-12-16 2023-12-12 mi 5 2 + +-- !query6_2_after -- +2023-12-09 2023-12-08 yy 1 2 +2023-12-09 2023-12-08 yy 1 2 +2023-12-09 2023-12-08 yy 1 2 +2023-12-09 2023-12-08 yy 1 2 +2023-12-12 2023-12-10 yy 3 2 +2023-12-12 2023-12-10 yy 3 2 +2023-12-12 2023-12-10 yy 3 2 +2023-12-12 2023-12-10 yy 3 2 +2023-12-13 2023-12-10 yy 3 2 +2023-12-13 2023-12-10 yy 3 2 +2023-12-13 2023-12-10 yy 3 2 +2023-12-13 2023-12-10 yy 3 2 +2023-12-14 2023-12-12 mi 5 2 +2023-12-14 2023-12-12 mi 5 2 +2023-12-16 2023-12-12 mi 5 2 +2023-12-16 2023-12-12 mi 5 2 + +-- !query6_3_before -- +2023-12-07 2023-12-08 yy 1 2 +2023-12-07 2023-12-08 yy 1 2 +2023-12-07 2023-12-08 yy 1 2 +2023-12-07 2023-12-08 yy 1 2 +2023-12-08 2023-12-08 yy 1 2 +2023-12-08 2023-12-08 yy 1 2 +2023-12-08 2023-12-08 yy 1 2 +2023-12-08 2023-12-08 yy 1 2 +2023-12-08 2023-12-08 yy 1 2 +2023-12-08 2023-12-08 yy 1 2 +2023-12-08 2023-12-08 yy 1 2 +2023-12-08 2023-12-08 yy 1 2 +2023-12-09 2023-12-08 yy 1 2 +2023-12-09 2023-12-08 yy 1 2 +2023-12-09 2023-12-08 yy 1 2 +2023-12-09 2023-12-08 yy 1 2 +2023-12-09 2023-12-10 yy 3 2 +2023-12-09 2023-12-10 yy 3 2 +2023-12-09 2023-12-10 yy 3 2 +2023-12-09 2023-12-10 yy 3 2 +2023-12-10 2023-12-10 yy 3 2 +2023-12-10 2023-12-10 yy 3 2 +2023-12-10 2023-12-10 yy 3 2 +2023-12-10 2023-12-10 yy 3 2 +2023-12-12 2023-12-10 yy 3 2 +2023-12-12 2023-12-10 yy 3 2 +2023-12-12 2023-12-10 yy 3 2 +2023-12-12 2023-12-10 yy 3 2 +2023-12-12 2023-12-12 mi 5 2 +2023-12-12 2023-12-12 mi 5 2 +2023-12-12 2023-12-12 mi 5 2 +2023-12-12 2023-12-12 mi 5 2 +2023-12-12 2023-12-12 mi 5 2 +2023-12-12 2023-12-12 mi 5 2 +2023-12-12 2023-12-12 mi 5 2 +2023-12-12 2023-12-12 mi 5 2 +2023-12-13 2023-12-10 yy 3 2 +2023-12-13 2023-12-10 yy 3 2 +2023-12-13 2023-12-10 yy 3 2 +2023-12-13 2023-12-10 yy 3 2 +2023-12-14 2023-12-12 mi 5 2 +2023-12-14 2023-12-12 mi 5 2 +2023-12-14 2023-12-12 mi 5 2 +2023-12-14 2023-12-12 mi 5 2 +2023-12-16 2023-12-12 mi 5 2 +2023-12-16 2023-12-12 mi 5 2 +2023-12-16 2023-12-12 mi 5 2 +2023-12-16 2023-12-12 mi 5 2 + +-- !query6_3_after -- +2023-12-07 2023-12-08 yy 1 2 +2023-12-07 2023-12-08 yy 1 2 +2023-12-07 2023-12-08 yy 1 2 +2023-12-07 2023-12-08 yy 1 2 +2023-12-08 2023-12-08 yy 1 2 +2023-12-08 2023-12-08 yy 1 2 +2023-12-08 2023-12-08 yy 1 2 +2023-12-08 2023-12-08 yy 1 2 +2023-12-08 2023-12-08 yy 1 2 +2023-12-08 2023-12-08 yy 1 2 +2023-12-08 2023-12-08 yy 1 2 +2023-12-08 2023-12-08 yy 1 2 +2023-12-09 2023-12-08 yy 1 2 +2023-12-09 2023-12-08 yy 1 2 +2023-12-09 2023-12-08 yy 1 2 +2023-12-09 2023-12-08 yy 1 2 +2023-12-09 2023-12-10 yy 3 2 +2023-12-09 2023-12-10 yy 3 2 +2023-12-09 2023-12-10 yy 3 2 +2023-12-09 2023-12-10 yy 3 2 +2023-12-10 2023-12-10 yy 3 2 +2023-12-10 2023-12-10 yy 3 2 +2023-12-10 2023-12-10 yy 3 2 +2023-12-10 2023-12-10 yy 3 2 +2023-12-12 2023-12-10 yy 3 2 +2023-12-12 2023-12-10 yy 3 2 +2023-12-12 2023-12-10 yy 3 2 +2023-12-12 2023-12-10 yy 3 2 +2023-12-12 2023-12-12 mi 5 2 +2023-12-12 2023-12-12 mi 5 2 +2023-12-12 2023-12-12 mi 5 2 +2023-12-12 2023-12-12 mi 5 2 +2023-12-12 2023-12-12 mi 5 2 +2023-12-12 2023-12-12 mi 5 2 +2023-12-12 2023-12-12 mi 5 2 +2023-12-12 2023-12-12 mi 5 2 +2023-12-13 2023-12-10 yy 3 2 +2023-12-13 2023-12-10 yy 3 2 +2023-12-13 2023-12-10 yy 3 2 +2023-12-13 2023-12-10 yy 3 2 +2023-12-14 2023-12-12 mi 5 2 +2023-12-14 2023-12-12 mi 5 2 +2023-12-14 2023-12-12 mi 5 2 +2023-12-14 2023-12-12 mi 5 2 +2023-12-16 2023-12-12 mi 5 2 +2023-12-16 2023-12-12 mi 5 2 +2023-12-16 2023-12-12 mi 5 2 +2023-12-16 2023-12-12 mi 5 2 + +-- !query6_4_before -- +2023-12-09 2023-12-08 yy 1 2 +2023-12-09 2023-12-08 yy 1 2 +2023-12-09 2023-12-08 yy 1 2 +2023-12-09 2023-12-08 yy 1 2 +2023-12-12 2023-12-10 yy 3 2 +2023-12-12 2023-12-10 yy 3 2 +2023-12-12 2023-12-10 yy 3 2 +2023-12-12 2023-12-10 yy 3 2 +2023-12-13 2023-12-10 yy 3 2 +2023-12-13 2023-12-10 yy 3 2 +2023-12-13 2023-12-10 yy 3 2 +2023-12-13 2023-12-10 yy 3 2 +2023-12-14 2023-12-12 mi 5 2 +2023-12-14 2023-12-12 mi 5 2 +2023-12-16 2023-12-12 mi 5 2 +2023-12-16 2023-12-12 mi 5 2 + +-- !query6_4_after -- +2023-12-09 2023-12-08 yy 1 2 +2023-12-09 2023-12-08 yy 1 2 +2023-12-09 2023-12-08 yy 1 2 +2023-12-09 2023-12-08 yy 1 2 +2023-12-12 2023-12-10 yy 3 2 +2023-12-12 2023-12-10 yy 3 2 +2023-12-12 2023-12-10 yy 3 2 +2023-12-12 2023-12-10 yy 3 2 +2023-12-13 2023-12-10 yy 3 2 +2023-12-13 2023-12-10 yy 3 2 +2023-12-13 2023-12-10 yy 3 2 +2023-12-13 2023-12-10 yy 3 2 +2023-12-14 2023-12-12 mi 5 2 +2023-12-14 2023-12-12 mi 5 2 +2023-12-16 2023-12-12 mi 5 2 +2023-12-16 2023-12-12 mi 5 2 + +-- !query7_0_before -- +\N 2023-12-07 +\N 2023-12-08 +\N 2023-12-09 +\N 2023-12-10 +1 2023-12-08 +1 2023-12-08 +1 2023-12-08 +1 2023-12-08 +1 2023-12-08 +1 2023-12-08 +1 2023-12-08 +1 2023-12-08 +1 2023-12-09 +1 2023-12-09 +1 2023-12-09 +1 2023-12-09 +2 2023-12-09 +2 2023-12-09 +2 2023-12-11 +2 2023-12-11 +3 2023-12-10 +3 2023-12-10 +3 2023-12-10 +3 2023-12-10 +3 2023-12-12 +3 2023-12-12 +3 2023-12-12 +3 2023-12-12 +3 2023-12-13 +3 2023-12-13 +3 2023-12-13 +3 2023-12-13 +4 2023-12-11 +4 2023-12-11 +4 2023-12-13 +4 2023-12-13 +5 2023-12-12 +5 2023-12-12 +5 2023-12-12 +5 2023-12-12 +5 2023-12-14 +5 2023-12-14 +5 2023-12-16 +5 2023-12-16 + +-- !query7_0_after -- +\N 2023-12-07 +\N 2023-12-08 +\N 2023-12-09 +\N 2023-12-10 +1 2023-12-08 +1 2023-12-08 +1 2023-12-08 +1 2023-12-08 +1 2023-12-08 +1 2023-12-08 +1 2023-12-08 +1 2023-12-08 +1 2023-12-09 +1 2023-12-09 +1 2023-12-09 +1 2023-12-09 +2 2023-12-09 +2 2023-12-09 +2 2023-12-11 +2 2023-12-11 +3 2023-12-10 +3 2023-12-10 +3 2023-12-10 +3 2023-12-10 +3 2023-12-12 +3 2023-12-12 +3 2023-12-12 +3 2023-12-12 +3 2023-12-13 +3 2023-12-13 +3 2023-12-13 +3 2023-12-13 +4 2023-12-11 +4 2023-12-11 +4 2023-12-13 +4 2023-12-13 +5 2023-12-12 +5 2023-12-12 +5 2023-12-12 +5 2023-12-12 +5 2023-12-14 +5 2023-12-14 +5 2023-12-16 +5 2023-12-16 + +-- !query7_7_before -- +\N 2023-12-07 +\N 2023-12-08 +\N 2023-12-08 +\N 2023-12-08 +\N 2023-12-09 +\N 2023-12-09 +\N 2023-12-10 +\N 2023-12-10 +\N 2023-12-11 +\N 2023-12-12 +\N 2023-12-12 +1 2023-12-09 +1 2023-12-09 +1 2023-12-09 +1 2023-12-09 +2 2023-12-11 +2 2023-12-11 +3 2023-12-12 +3 2023-12-12 +3 2023-12-12 +3 2023-12-12 +3 2023-12-13 +3 2023-12-13 +3 2023-12-13 +3 2023-12-13 +4 2023-12-13 +4 2023-12-13 +5 2023-12-14 +5 2023-12-14 +5 2023-12-16 +5 2023-12-16 + +-- !query7_7_after -- +\N 2023-12-07 +\N 2023-12-08 +\N 2023-12-08 +\N 2023-12-08 +\N 2023-12-09 +\N 2023-12-09 +\N 2023-12-10 +\N 2023-12-10 +\N 2023-12-11 +\N 2023-12-12 +\N 2023-12-12 +1 2023-12-09 +1 2023-12-09 +1 2023-12-09 +1 2023-12-09 +2 2023-12-11 +2 2023-12-11 +3 2023-12-12 +3 2023-12-12 +3 2023-12-12 +3 2023-12-12 +3 2023-12-13 +3 2023-12-13 +3 2023-12-13 +3 2023-12-13 +4 2023-12-13 +4 2023-12-13 +5 2023-12-14 +5 2023-12-14 +5 2023-12-16 +5 2023-12-16 + +-- !query7_2_before -- +\N \N 2023-12-07 +\N \N 2023-12-08 +\N \N 2023-12-08 +\N \N 2023-12-08 +\N \N 2023-12-09 +\N \N 2023-12-09 +\N \N 2023-12-10 +\N \N 2023-12-10 +\N \N 2023-12-11 +\N \N 2023-12-12 +\N \N 2023-12-12 +1 2023-12-08 2023-12-09 +1 2023-12-08 2023-12-09 +1 2023-12-08 2023-12-09 +1 2023-12-08 2023-12-09 +2 2023-12-09 2023-12-11 +2 2023-12-09 2023-12-11 +3 2023-12-10 2023-12-12 +3 2023-12-10 2023-12-12 +3 2023-12-10 2023-12-12 +3 2023-12-10 2023-12-12 +3 2023-12-10 2023-12-13 +3 2023-12-10 2023-12-13 +3 2023-12-10 2023-12-13 +3 2023-12-10 2023-12-13 +4 2023-12-11 2023-12-13 +4 2023-12-11 2023-12-13 +5 2023-12-12 2023-12-14 +5 2023-12-12 2023-12-14 +5 2023-12-12 2023-12-16 +5 2023-12-12 2023-12-16 + +-- !query7_2_after -- +\N \N 2023-12-07 +\N \N 2023-12-08 +\N \N 2023-12-08 +\N \N 2023-12-08 +\N \N 2023-12-09 +\N \N 2023-12-09 +\N \N 2023-12-10 +\N \N 2023-12-10 +\N \N 2023-12-11 +\N \N 2023-12-12 +\N \N 2023-12-12 +1 2023-12-08 2023-12-09 +1 2023-12-08 2023-12-09 +1 2023-12-08 2023-12-09 +1 2023-12-08 2023-12-09 +2 2023-12-09 2023-12-11 +2 2023-12-09 2023-12-11 +3 2023-12-10 2023-12-12 +3 2023-12-10 2023-12-12 +3 2023-12-10 2023-12-12 +3 2023-12-10 2023-12-12 +3 2023-12-10 2023-12-13 +3 2023-12-10 2023-12-13 +3 2023-12-10 2023-12-13 +3 2023-12-10 2023-12-13 +4 2023-12-11 2023-12-13 +4 2023-12-11 2023-12-13 +5 2023-12-12 2023-12-14 +5 2023-12-12 2023-12-14 +5 2023-12-12 2023-12-16 +5 2023-12-12 2023-12-16 + +-- !query8_0_before -- +2023-12-08 1 yy 1 2 +2023-12-08 1 yy 1 2 +2023-12-08 1 yy 1 2 +2023-12-08 1 yy 1 2 +2023-12-08 1 yy 1 2 +2023-12-08 1 yy 1 2 +2023-12-08 1 yy 1 2 +2023-12-08 1 yy 1 2 +2023-12-09 1 yy 1 2 +2023-12-09 1 yy 1 2 +2023-12-09 1 yy 1 2 +2023-12-09 1 yy 1 2 +2023-12-10 1 yy 3 2 +2023-12-10 1 yy 3 2 +2023-12-10 1 yy 3 2 +2023-12-10 1 yy 3 2 +2023-12-12 1 yy 3 2 +2023-12-12 1 yy 3 2 +2023-12-12 1 yy 3 2 +2023-12-12 1 yy 3 2 +2023-12-12 2 mi 5 2 +2023-12-12 2 mi 5 2 +2023-12-12 2 mi 5 2 +2023-12-12 2 mi 5 2 +2023-12-13 1 yy 3 2 +2023-12-13 1 yy 3 2 +2023-12-13 1 yy 3 2 +2023-12-13 1 yy 3 2 +2023-12-14 2 mi 5 2 +2023-12-14 2 mi 5 2 +2023-12-16 2 mi 5 2 +2023-12-16 2 mi 5 2 + +-- !query8_0_after -- +2023-12-08 1 yy 1 2 +2023-12-08 1 yy 1 2 +2023-12-08 1 yy 1 2 +2023-12-08 1 yy 1 2 +2023-12-08 1 yy 1 2 +2023-12-08 1 yy 1 2 +2023-12-08 1 yy 1 2 +2023-12-08 1 yy 1 2 +2023-12-09 1 yy 1 2 +2023-12-09 1 yy 1 2 +2023-12-09 1 yy 1 2 +2023-12-09 1 yy 1 2 +2023-12-10 1 yy 3 2 +2023-12-10 1 yy 3 2 +2023-12-10 1 yy 3 2 +2023-12-10 1 yy 3 2 +2023-12-12 1 yy 3 2 +2023-12-12 1 yy 3 2 +2023-12-12 1 yy 3 2 +2023-12-12 1 yy 3 2 +2023-12-12 2 mi 5 2 +2023-12-12 2 mi 5 2 +2023-12-12 2 mi 5 2 +2023-12-12 2 mi 5 2 +2023-12-13 1 yy 3 2 +2023-12-13 1 yy 3 2 +2023-12-13 1 yy 3 2 +2023-12-13 1 yy 3 2 +2023-12-14 2 mi 5 2 +2023-12-14 2 mi 5 2 +2023-12-16 2 mi 5 2 +2023-12-16 2 mi 5 2 + +-- !query8_1_before -- +2023-12-09 1 yy 1 2 +2023-12-09 1 yy 1 2 +2023-12-09 1 yy 1 2 +2023-12-09 1 yy 1 2 +2023-12-12 1 yy 3 2 +2023-12-12 1 yy 3 2 +2023-12-12 1 yy 3 2 +2023-12-12 1 yy 3 2 +2023-12-13 1 yy 3 2 +2023-12-13 1 yy 3 2 +2023-12-13 1 yy 3 2 +2023-12-13 1 yy 3 2 +2023-12-14 2 mi 5 2 +2023-12-14 2 mi 5 2 +2023-12-16 2 mi 5 2 +2023-12-16 2 mi 5 2 + +-- !query8_1_after -- +2023-12-09 1 yy 1 2 +2023-12-09 1 yy 1 2 +2023-12-09 1 yy 1 2 +2023-12-09 1 yy 1 2 +2023-12-12 1 yy 3 2 +2023-12-12 1 yy 3 2 +2023-12-12 1 yy 3 2 +2023-12-12 1 yy 3 2 +2023-12-13 1 yy 3 2 +2023-12-13 1 yy 3 2 +2023-12-13 1 yy 3 2 +2023-12-13 1 yy 3 2 +2023-12-14 2 mi 5 2 +2023-12-14 2 mi 5 2 +2023-12-16 2 mi 5 2 +2023-12-16 2 mi 5 2 + +-- !query8_2_before -- +2023-12-09 2023-12-08 yy 1 2 +2023-12-09 2023-12-08 yy 1 2 +2023-12-09 2023-12-08 yy 1 2 +2023-12-09 2023-12-08 yy 1 2 +2023-12-12 2023-12-10 yy 3 2 +2023-12-12 2023-12-10 yy 3 2 +2023-12-12 2023-12-10 yy 3 2 +2023-12-12 2023-12-10 yy 3 2 +2023-12-13 2023-12-10 yy 3 2 +2023-12-13 2023-12-10 yy 3 2 +2023-12-13 2023-12-10 yy 3 2 +2023-12-13 2023-12-10 yy 3 2 +2023-12-14 2023-12-12 mi 5 2 +2023-12-14 2023-12-12 mi 5 2 +2023-12-16 2023-12-12 mi 5 2 +2023-12-16 2023-12-12 mi 5 2 + +-- !query8_2_after -- +2023-12-09 2023-12-08 yy 1 2 +2023-12-09 2023-12-08 yy 1 2 +2023-12-09 2023-12-08 yy 1 2 +2023-12-09 2023-12-08 yy 1 2 +2023-12-12 2023-12-10 yy 3 2 +2023-12-12 2023-12-10 yy 3 2 +2023-12-12 2023-12-10 yy 3 2 +2023-12-12 2023-12-10 yy 3 2 +2023-12-13 2023-12-10 yy 3 2 +2023-12-13 2023-12-10 yy 3 2 +2023-12-13 2023-12-10 yy 3 2 +2023-12-13 2023-12-10 yy 3 2 +2023-12-14 2023-12-12 mi 5 2 +2023-12-14 2023-12-12 mi 5 2 +2023-12-16 2023-12-12 mi 5 2 +2023-12-16 2023-12-12 mi 5 2 + +-- !query9_0_before -- +2023-12-08 1 yy 1 2 +2023-12-08 1 yy 1 2 +2023-12-08 1 yy 1 2 +2023-12-08 1 yy 1 2 +2023-12-08 1 yy 1 2 +2023-12-08 1 yy 1 2 +2023-12-08 1 yy 1 2 +2023-12-08 1 yy 1 2 +2023-12-09 1 yy 1 2 +2023-12-09 1 yy 1 2 +2023-12-09 1 yy 1 2 +2023-12-09 1 yy 1 2 +2023-12-10 1 yy 3 2 +2023-12-10 1 yy 3 2 +2023-12-10 1 yy 3 2 +2023-12-10 1 yy 3 2 +2023-12-12 1 yy 3 2 +2023-12-12 1 yy 3 2 +2023-12-12 1 yy 3 2 +2023-12-12 1 yy 3 2 +2023-12-12 2 mi 5 2 +2023-12-12 2 mi 5 2 +2023-12-12 2 mi 5 2 +2023-12-12 2 mi 5 2 +2023-12-13 1 yy 3 2 +2023-12-13 1 yy 3 2 +2023-12-13 1 yy 3 2 +2023-12-13 1 yy 3 2 +2023-12-14 2 mi 5 2 +2023-12-14 2 mi 5 2 +2023-12-16 2 mi 5 2 +2023-12-16 2 mi 5 2 + +-- !query9_0_after -- +2023-12-08 1 yy 1 2 +2023-12-08 1 yy 1 2 +2023-12-08 1 yy 1 2 +2023-12-08 1 yy 1 2 +2023-12-08 1 yy 1 2 +2023-12-08 1 yy 1 2 +2023-12-08 1 yy 1 2 +2023-12-08 1 yy 1 2 +2023-12-09 1 yy 1 2 +2023-12-09 1 yy 1 2 +2023-12-09 1 yy 1 2 +2023-12-09 1 yy 1 2 +2023-12-10 1 yy 3 2 +2023-12-10 1 yy 3 2 +2023-12-10 1 yy 3 2 +2023-12-10 1 yy 3 2 +2023-12-12 1 yy 3 2 +2023-12-12 1 yy 3 2 +2023-12-12 1 yy 3 2 +2023-12-12 1 yy 3 2 +2023-12-12 2 mi 5 2 +2023-12-12 2 mi 5 2 +2023-12-12 2 mi 5 2 +2023-12-12 2 mi 5 2 +2023-12-13 1 yy 3 2 +2023-12-13 1 yy 3 2 +2023-12-13 1 yy 3 2 +2023-12-13 1 yy 3 2 +2023-12-14 2 mi 5 2 +2023-12-14 2 mi 5 2 +2023-12-16 2 mi 5 2 +2023-12-16 2 mi 5 2 + +-- !query9_1_before -- +2023-12-09 1 yy 1 2 +2023-12-09 1 yy 1 2 +2023-12-09 1 yy 1 2 +2023-12-09 1 yy 1 2 +2023-12-12 1 yy 3 2 +2023-12-12 1 yy 3 2 +2023-12-12 1 yy 3 2 +2023-12-12 1 yy 3 2 +2023-12-13 1 yy 3 2 +2023-12-13 1 yy 3 2 +2023-12-13 1 yy 3 2 +2023-12-13 1 yy 3 2 +2023-12-14 2 mi 5 2 +2023-12-14 2 mi 5 2 +2023-12-16 2 mi 5 2 +2023-12-16 2 mi 5 2 + +-- !query9_1_after -- +2023-12-09 1 yy 1 2 +2023-12-09 1 yy 1 2 +2023-12-09 1 yy 1 2 +2023-12-09 1 yy 1 2 +2023-12-12 1 yy 3 2 +2023-12-12 1 yy 3 2 +2023-12-12 1 yy 3 2 +2023-12-12 1 yy 3 2 +2023-12-13 1 yy 3 2 +2023-12-13 1 yy 3 2 +2023-12-13 1 yy 3 2 +2023-12-13 1 yy 3 2 +2023-12-14 2 mi 5 2 +2023-12-14 2 mi 5 2 +2023-12-16 2 mi 5 2 +2023-12-16 2 mi 5 2 + +-- !query9_2_before -- +2023-12-09 2023-12-08 yy 1 2 +2023-12-09 2023-12-08 yy 1 2 +2023-12-09 2023-12-08 yy 1 2 +2023-12-09 2023-12-08 yy 1 2 +2023-12-12 2023-12-10 yy 3 2 +2023-12-12 2023-12-10 yy 3 2 +2023-12-12 2023-12-10 yy 3 2 +2023-12-12 2023-12-10 yy 3 2 +2023-12-13 2023-12-10 yy 3 2 +2023-12-13 2023-12-10 yy 3 2 +2023-12-13 2023-12-10 yy 3 2 +2023-12-13 2023-12-10 yy 3 2 +2023-12-14 2023-12-12 mi 5 2 +2023-12-14 2023-12-12 mi 5 2 +2023-12-16 2023-12-12 mi 5 2 +2023-12-16 2023-12-12 mi 5 2 + +-- !query9_2_after -- +2023-12-09 2023-12-08 yy 1 2 +2023-12-09 2023-12-08 yy 1 2 +2023-12-09 2023-12-08 yy 1 2 +2023-12-09 2023-12-08 yy 1 2 +2023-12-12 2023-12-10 yy 3 2 +2023-12-12 2023-12-10 yy 3 2 +2023-12-12 2023-12-10 yy 3 2 +2023-12-12 2023-12-10 yy 3 2 +2023-12-13 2023-12-10 yy 3 2 +2023-12-13 2023-12-10 yy 3 2 +2023-12-13 2023-12-10 yy 3 2 +2023-12-13 2023-12-10 yy 3 2 +2023-12-14 2023-12-12 mi 5 2 +2023-12-14 2023-12-12 mi 5 2 +2023-12-16 2023-12-12 mi 5 2 +2023-12-16 2023-12-12 mi 5 2 + +-- !query9_3_before -- +1 2023-12-08 +1 2023-12-08 +1 2023-12-08 +1 2023-12-08 +2 2023-12-09 +2 2023-12-09 +2 2023-12-09 +2 2023-12-09 +3 2023-12-10 +3 2023-12-10 +3 2023-12-10 +3 2023-12-10 +5 2023-12-12 +5 2023-12-12 +5 2023-12-12 +5 2023-12-12 + +-- !query9_3_after -- +1 2023-12-08 +1 2023-12-08 +1 2023-12-08 +1 2023-12-08 +2 2023-12-09 +2 2023-12-09 +2 2023-12-09 +2 2023-12-09 +3 2023-12-10 +3 2023-12-10 +3 2023-12-10 +3 2023-12-10 +5 2023-12-12 +5 2023-12-12 +5 2023-12-12 +5 2023-12-12 + +-- !query9_4_before -- +2023-12-07 2023-12-08 yy 1 2 +2023-12-07 2023-12-08 yy 1 2 +2023-12-07 2023-12-08 yy 1 2 +2023-12-07 2023-12-08 yy 1 2 +2023-12-08 2023-12-08 yy 1 2 +2023-12-08 2023-12-08 yy 1 2 +2023-12-08 2023-12-08 yy 1 2 +2023-12-08 2023-12-08 yy 1 2 +2023-12-08 2023-12-08 yy 1 2 +2023-12-08 2023-12-08 yy 1 2 +2023-12-08 2023-12-08 yy 1 2 +2023-12-08 2023-12-08 yy 1 2 +2023-12-08 2023-12-09 yy 2 \N +2023-12-08 2023-12-09 yy 2 \N +2023-12-09 2023-12-08 yy 1 2 +2023-12-09 2023-12-08 yy 1 2 +2023-12-09 2023-12-08 yy 1 2 +2023-12-09 2023-12-08 yy 1 2 +2023-12-09 2023-12-09 yy 2 \N +2023-12-09 2023-12-09 yy 2 \N +2023-12-09 2023-12-10 yy 3 2 +2023-12-09 2023-12-10 yy 3 2 +2023-12-09 2023-12-10 yy 3 2 +2023-12-09 2023-12-10 yy 3 2 +2023-12-10 2023-12-10 yy 3 2 +2023-12-10 2023-12-10 yy 3 2 +2023-12-10 2023-12-10 yy 3 2 +2023-12-10 2023-12-10 yy 3 2 +2023-12-10 2023-12-11 mm 4 \N +2023-12-10 2023-12-11 mm 4 \N +2023-12-11 2023-12-09 yy 2 \N +2023-12-11 2023-12-09 yy 2 \N +2023-12-11 2023-12-11 mm 4 \N +2023-12-11 2023-12-11 mm 4 \N +2023-12-12 2023-12-10 yy 3 2 +2023-12-12 2023-12-10 yy 3 2 +2023-12-12 2023-12-10 yy 3 2 +2023-12-12 2023-12-10 yy 3 2 +2023-12-12 2023-12-12 mi 5 2 +2023-12-12 2023-12-12 mi 5 2 +2023-12-12 2023-12-12 mi 5 2 +2023-12-12 2023-12-12 mi 5 2 +2023-12-12 2023-12-12 mi 5 2 +2023-12-12 2023-12-12 mi 5 2 +2023-12-12 2023-12-12 mi 5 2 +2023-12-12 2023-12-12 mi 5 2 +2023-12-13 2023-12-10 yy 3 2 +2023-12-13 2023-12-10 yy 3 2 +2023-12-13 2023-12-10 yy 3 2 +2023-12-13 2023-12-10 yy 3 2 +2023-12-13 2023-12-11 mm 4 \N +2023-12-13 2023-12-11 mm 4 \N +2023-12-14 2023-12-12 mi 5 2 +2023-12-14 2023-12-12 mi 5 2 +2023-12-14 2023-12-12 mi 5 2 +2023-12-14 2023-12-12 mi 5 2 +2023-12-16 2023-12-12 mi 5 2 +2023-12-16 2023-12-12 mi 5 2 +2023-12-16 2023-12-12 mi 5 2 +2023-12-16 2023-12-12 mi 5 2 + +-- !query9_4_after -- +2023-12-07 2023-12-08 yy 1 2 +2023-12-07 2023-12-08 yy 1 2 +2023-12-07 2023-12-08 yy 1 2 +2023-12-07 2023-12-08 yy 1 2 +2023-12-08 2023-12-08 yy 1 2 +2023-12-08 2023-12-08 yy 1 2 +2023-12-08 2023-12-08 yy 1 2 +2023-12-08 2023-12-08 yy 1 2 +2023-12-08 2023-12-08 yy 1 2 +2023-12-08 2023-12-08 yy 1 2 +2023-12-08 2023-12-08 yy 1 2 +2023-12-08 2023-12-08 yy 1 2 +2023-12-08 2023-12-09 yy 2 \N +2023-12-08 2023-12-09 yy 2 \N +2023-12-09 2023-12-08 yy 1 2 +2023-12-09 2023-12-08 yy 1 2 +2023-12-09 2023-12-08 yy 1 2 +2023-12-09 2023-12-08 yy 1 2 +2023-12-09 2023-12-09 yy 2 \N +2023-12-09 2023-12-09 yy 2 \N +2023-12-09 2023-12-10 yy 3 2 +2023-12-09 2023-12-10 yy 3 2 +2023-12-09 2023-12-10 yy 3 2 +2023-12-09 2023-12-10 yy 3 2 +2023-12-10 2023-12-10 yy 3 2 +2023-12-10 2023-12-10 yy 3 2 +2023-12-10 2023-12-10 yy 3 2 +2023-12-10 2023-12-10 yy 3 2 +2023-12-10 2023-12-11 mm 4 \N +2023-12-10 2023-12-11 mm 4 \N +2023-12-11 2023-12-09 yy 2 \N +2023-12-11 2023-12-09 yy 2 \N +2023-12-11 2023-12-11 mm 4 \N +2023-12-11 2023-12-11 mm 4 \N +2023-12-12 2023-12-10 yy 3 2 +2023-12-12 2023-12-10 yy 3 2 +2023-12-12 2023-12-10 yy 3 2 +2023-12-12 2023-12-10 yy 3 2 +2023-12-12 2023-12-12 mi 5 2 +2023-12-12 2023-12-12 mi 5 2 +2023-12-12 2023-12-12 mi 5 2 +2023-12-12 2023-12-12 mi 5 2 +2023-12-12 2023-12-12 mi 5 2 +2023-12-12 2023-12-12 mi 5 2 +2023-12-12 2023-12-12 mi 5 2 +2023-12-12 2023-12-12 mi 5 2 +2023-12-13 2023-12-10 yy 3 2 +2023-12-13 2023-12-10 yy 3 2 +2023-12-13 2023-12-10 yy 3 2 +2023-12-13 2023-12-10 yy 3 2 +2023-12-13 2023-12-11 mm 4 \N +2023-12-13 2023-12-11 mm 4 \N +2023-12-14 2023-12-12 mi 5 2 +2023-12-14 2023-12-12 mi 5 2 +2023-12-14 2023-12-12 mi 5 2 +2023-12-14 2023-12-12 mi 5 2 +2023-12-16 2023-12-12 mi 5 2 +2023-12-16 2023-12-12 mi 5 2 +2023-12-16 2023-12-12 mi 5 2 +2023-12-16 2023-12-12 mi 5 2 + +-- !query9_5_before -- +2023-12-09 2023-12-08 yy 1 2 +2023-12-09 2023-12-08 yy 1 2 +2023-12-09 2023-12-08 yy 1 2 +2023-12-09 2023-12-08 yy 1 2 +2023-12-12 2023-12-10 yy 3 2 +2023-12-12 2023-12-10 yy 3 2 +2023-12-12 2023-12-10 yy 3 2 +2023-12-12 2023-12-10 yy 3 2 +2023-12-13 2023-12-10 yy 3 2 +2023-12-13 2023-12-10 yy 3 2 +2023-12-13 2023-12-10 yy 3 2 +2023-12-13 2023-12-10 yy 3 2 +2023-12-14 2023-12-12 mi 5 2 +2023-12-14 2023-12-12 mi 5 2 +2023-12-16 2023-12-12 mi 5 2 +2023-12-16 2023-12-12 mi 5 2 + +-- !query9_5_after -- +2023-12-09 2023-12-08 yy 1 2 +2023-12-09 2023-12-08 yy 1 2 +2023-12-09 2023-12-08 yy 1 2 +2023-12-09 2023-12-08 yy 1 2 +2023-12-12 2023-12-10 yy 3 2 +2023-12-12 2023-12-10 yy 3 2 +2023-12-12 2023-12-10 yy 3 2 +2023-12-12 2023-12-10 yy 3 2 +2023-12-13 2023-12-10 yy 3 2 +2023-12-13 2023-12-10 yy 3 2 +2023-12-13 2023-12-10 yy 3 2 +2023-12-13 2023-12-10 yy 3 2 +2023-12-14 2023-12-12 mi 5 2 +2023-12-14 2023-12-12 mi 5 2 +2023-12-16 2023-12-12 mi 5 2 +2023-12-16 2023-12-12 mi 5 2 + +-- !query9_6_before -- +2023-12-08 1 yy 1 2 +2023-12-08 1 yy 1 2 +2023-12-08 1 yy 1 2 +2023-12-08 1 yy 1 2 +2023-12-08 1 yy 1 2 +2023-12-08 1 yy 1 2 +2023-12-08 1 yy 1 2 +2023-12-08 1 yy 1 2 +2023-12-09 1 yy 1 2 +2023-12-09 1 yy 1 2 +2023-12-09 1 yy 1 2 +2023-12-09 1 yy 1 2 +2023-12-10 1 yy 3 2 +2023-12-10 1 yy 3 2 +2023-12-10 1 yy 3 2 +2023-12-10 1 yy 3 2 +2023-12-12 1 yy 3 2 +2023-12-12 1 yy 3 2 +2023-12-12 1 yy 3 2 +2023-12-12 1 yy 3 2 +2023-12-12 2 mi 5 2 +2023-12-12 2 mi 5 2 +2023-12-12 2 mi 5 2 +2023-12-12 2 mi 5 2 +2023-12-13 1 yy 3 2 +2023-12-13 1 yy 3 2 +2023-12-13 1 yy 3 2 +2023-12-13 1 yy 3 2 +2023-12-14 2 mi 5 2 +2023-12-14 2 mi 5 2 +2023-12-16 2 mi 5 2 +2023-12-16 2 mi 5 2 + +-- !query9_6_after -- +2023-12-08 1 yy 1 2 +2023-12-08 1 yy 1 2 +2023-12-08 1 yy 1 2 +2023-12-08 1 yy 1 2 +2023-12-08 1 yy 1 2 +2023-12-08 1 yy 1 2 +2023-12-08 1 yy 1 2 +2023-12-08 1 yy 1 2 +2023-12-09 1 yy 1 2 +2023-12-09 1 yy 1 2 +2023-12-09 1 yy 1 2 +2023-12-09 1 yy 1 2 +2023-12-10 1 yy 3 2 +2023-12-10 1 yy 3 2 +2023-12-10 1 yy 3 2 +2023-12-10 1 yy 3 2 +2023-12-12 1 yy 3 2 +2023-12-12 1 yy 3 2 +2023-12-12 1 yy 3 2 +2023-12-12 1 yy 3 2 +2023-12-12 2 mi 5 2 +2023-12-12 2 mi 5 2 +2023-12-12 2 mi 5 2 +2023-12-12 2 mi 5 2 +2023-12-13 1 yy 3 2 +2023-12-13 1 yy 3 2 +2023-12-13 1 yy 3 2 +2023-12-13 1 yy 3 2 +2023-12-14 2 mi 5 2 +2023-12-14 2 mi 5 2 +2023-12-16 2 mi 5 2 +2023-12-16 2 mi 5 2 + +-- !query9_7_before -- +2023-12-08 1 yy 1 2 +2023-12-08 1 yy 1 2 +2023-12-08 1 yy 1 2 +2023-12-08 1 yy 1 2 +2023-12-08 1 yy 1 2 +2023-12-08 1 yy 1 2 +2023-12-08 1 yy 1 2 +2023-12-08 1 yy 1 2 +2023-12-09 1 yy 1 2 +2023-12-09 1 yy 1 2 +2023-12-09 1 yy 1 2 +2023-12-09 1 yy 1 2 +2023-12-10 1 yy 3 2 +2023-12-10 1 yy 3 2 +2023-12-10 1 yy 3 2 +2023-12-10 1 yy 3 2 +2023-12-12 1 yy 3 2 +2023-12-12 1 yy 3 2 +2023-12-12 1 yy 3 2 +2023-12-12 1 yy 3 2 +2023-12-12 2 mi 5 2 +2023-12-12 2 mi 5 2 +2023-12-12 2 mi 5 2 +2023-12-12 2 mi 5 2 +2023-12-13 1 yy 3 2 +2023-12-13 1 yy 3 2 +2023-12-13 1 yy 3 2 +2023-12-13 1 yy 3 2 +2023-12-14 2 mi 5 2 +2023-12-14 2 mi 5 2 +2023-12-16 2 mi 5 2 +2023-12-16 2 mi 5 2 + +-- !query9_7_after -- +2023-12-08 1 yy 1 2 +2023-12-08 1 yy 1 2 +2023-12-08 1 yy 1 2 +2023-12-08 1 yy 1 2 +2023-12-08 1 yy 1 2 +2023-12-08 1 yy 1 2 +2023-12-08 1 yy 1 2 +2023-12-08 1 yy 1 2 +2023-12-09 1 yy 1 2 +2023-12-09 1 yy 1 2 +2023-12-09 1 yy 1 2 +2023-12-09 1 yy 1 2 +2023-12-10 1 yy 3 2 +2023-12-10 1 yy 3 2 +2023-12-10 1 yy 3 2 +2023-12-10 1 yy 3 2 +2023-12-12 1 yy 3 2 +2023-12-12 1 yy 3 2 +2023-12-12 1 yy 3 2 +2023-12-12 1 yy 3 2 +2023-12-12 2 mi 5 2 +2023-12-12 2 mi 5 2 +2023-12-12 2 mi 5 2 +2023-12-12 2 mi 5 2 +2023-12-13 1 yy 3 2 +2023-12-13 1 yy 3 2 +2023-12-13 1 yy 3 2 +2023-12-13 1 yy 3 2 +2023-12-14 2 mi 5 2 +2023-12-14 2 mi 5 2 +2023-12-16 2 mi 5 2 +2023-12-16 2 mi 5 2 + diff --git a/regression-test/data/nereids_rules_p0/mv/other_join_conjuncts/semi/other_join_conjuncts_semi.out b/regression-test/data/nereids_rules_p0/mv/other_join_conjuncts/semi/other_join_conjuncts_semi.out new file mode 100644 index 00000000000000..b3111bed5f74a5 --- /dev/null +++ b/regression-test/data/nereids_rules_p0/mv/other_join_conjuncts/semi/other_join_conjuncts_semi.out @@ -0,0 +1,281 @@ +-- This file is automatically generated. You should know what you did if you want to edit this +-- !query1_0_before -- +1 +1 +2 +2 +3 +3 +5 +5 + +-- !query1_0_after -- +1 +1 +2 +2 +3 +3 +5 +5 + +-- !query2_0_before -- +1 +1 +2 +2 +3 +3 +5 +5 + +-- !query2_0_after -- +1 +1 +2 +2 +3 +3 +5 +5 + +-- !query3_0_before -- +1 +1 +3 +3 +5 +5 + +-- !query3_0_after -- +1 +1 +3 +3 +5 +5 + +-- !query3_4_before -- +1 +1 +3 +3 +5 +5 + +-- !query3_4_after -- +1 +1 +3 +3 +5 +5 + +-- !query3_5_before -- +1 +1 +3 +3 +5 +5 + +-- !query3_5_after -- +1 +1 +3 +3 +5 +5 + +-- !query3_1_before -- +1 +1 +3 +3 +5 +5 + +-- !query3_1_after -- +1 +1 +3 +3 +5 +5 + +-- !query3_2_before -- +1 +1 +3 +3 +5 +5 + +-- !query3_2_after -- +1 +1 +3 +3 +5 +5 + +-- !query3_3_before -- +1 +1 +3 +3 +5 +5 + +-- !query3_3_after -- +1 +1 +3 +3 +5 +5 + +-- !query4_0_before -- +1 +1 +2 +2 +3 +3 +4 +4 +5 +5 + +-- !query4_0_after -- +1 +1 +2 +2 +3 +3 +4 +4 +5 +5 + +-- !query4_1_before -- +1 +1 +2 +2 +3 +3 +4 +4 +5 +5 + +-- !query4_1_after -- +1 +1 +2 +2 +3 +3 +4 +4 +5 +5 + +-- !query4_2_before -- +1 +1 +2 +2 +3 +3 +4 +4 +5 +5 + +-- !query4_2_after -- +1 +1 +2 +2 +3 +3 +4 +4 +5 +5 + +-- !query4_3_before -- +1 +1 +2 +2 +3 +3 +4 +4 +5 +5 + +-- !query4_3_after -- +1 +1 +2 +2 +3 +3 +4 +4 +5 +5 + +-- !query4_4_before -- +1 +1 +2 +2 +3 +3 +4 +4 +5 +5 + +-- !query4_4_after -- +1 +1 +2 +2 +3 +3 +4 +4 +5 +5 + +-- !query4_5_before -- +1 +1 +2 +2 +3 +3 +4 +4 +5 +5 + +-- !query4_5_after -- +1 +1 +2 +2 +3 +3 +4 +4 +5 +5 + diff --git a/regression-test/data/nereids_rules_p0/mv/tpch/mv_tpch_test.out b/regression-test/data/nereids_rules_p0/mv/tpch/mv_tpch_test.out index 9ee82d64d28285..9bc3d0a99baf68 100644 --- a/regression-test/data/nereids_rules_p0/mv/tpch/mv_tpch_test.out +++ b/regression-test/data/nereids_rules_p0/mv/tpch/mv_tpch_test.out @@ -127,6 +127,30 @@ R F 3785523.00 5337950526.47 5071818532.9420 5274405503.049367 25.5259 35994.029 573861 351238.2770 1995-03-09 0 584291 354494.7318 1995-02-21 0 +-- !query3_1_before -- +108514 314967.0754 1995-02-20 0 +121604 318576.4154 1995-03-07 0 +178727 309728.9306 1995-02-25 0 +223140 355369.0698 1995-03-14 0 +405063 353125.4577 1995-03-03 0 +462502 312604.5420 1995-03-08 0 +506021 321075.5810 1995-03-10 0 +554757 349181.7426 1995-03-14 0 +573861 351238.2770 1995-03-09 0 +584291 354494.7318 1995-02-21 0 + +-- !query3_1_after -- +108514 314967.0754 1995-02-20 0 +121604 318576.4154 1995-03-07 0 +178727 309728.9306 1995-02-25 0 +223140 355369.0698 1995-03-14 0 +405063 353125.4577 1995-03-03 0 +462502 312604.5420 1995-03-08 0 +506021 321075.5810 1995-03-10 0 +554757 349181.7426 1995-03-14 0 +573861 351238.2770 1995-03-09 0 +584291 354494.7318 1995-02-21 0 + -- !query4_before -- 1-URGENT 999 2-HIGH 997 @@ -579,6 +603,50 @@ VIETNAM 1998 1924313.4862 9151 Customer#000009151 396562.0295 5691.95 IRAQ 7gIdRdaxB91EVdyx8DyPjShpMD 21-834-147-4906 ajole fluffily. furiously regular accounts are special, silent account 961 Customer#000000961 401198.1737 6963.68 JAPAN 5,81YDLFuRR47KKzv8GXdmi3zyP37PlPn 22-989-463-6089 e final requests: busily final accounts believe a +-- !query10_1_before -- +11026 Customer#000011026 417913.4142 7738.76 ALGERIA XorIktoJOAEJkpNNMx 10-184-163-4632 ly even dolphins eat along the blithely even instructions. express attainments cajole slyly. busy dolphins in +11032 Customer#000011032 512500.9641 8496.93 UNITED KINGDOM WIKHC7K3Cn7156iNOyfVG3cZ7YqkgsR,Ly 33-102-772-3533 posits-- furiously ironic accounts are again +12106 Customer#000012106 479414.2133 5342.11 UNITED STATES wth3twOmu6vy 34-905-346-4472 ly after the blithely regular foxes. accounts haggle carefully alongside of the blithely even ideas. +12595 Customer#000012595 401402.2391 -6.92 INDIA LmeaX5cR,w9NqKugl yRm98 18-186-132-3352 o the busy accounts. blithely special gifts maintain a +13478 Customer#000013478 395513.1358 -778.11 KENYA 9VIsvIeZrJpC6OOdYheMC2vdtq8Ai0Rt 24-983-202-8240 r theodolites. slyly unusual pinto beans sleep fluffily against the asymptotes. quickly r +13984 Customer#000013984 446316.5104 3482.28 IRAN qZXwuapCHvxbX 20-981-264-2952 y unusual courts could wake furiously +14299 Customer#000014299 400968.3751 6595.97 RUSSIA 7lFczTya0iM1bhEWT 32-156-618-1224 carefully regular requests. quickly ironic accounts against the ru +14398 Customer#000014398 408575.3600 -602.24 UNITED STATES GWRCgIPHajtU21vICVvbJJerFu2cUk 34-814-111-5424 s. blithely even accounts cajole blithely. even foxes doubt-- +1465 Customer#000001465 405055.3457 9365.93 INDIA tDRaTC7UgFbBX7VF6cVXYQA0 18-807-487-1074 s lose blithely ironic, regular packages. regular, final foxes haggle c +14819 Customer#000014819 396271.1036 7308.39 FRANCE w8StIbymUXmLCcUag6sx6LUIp8E3pA,Ux 16-769-398-7926 ss, final asymptotes use furiously slyly ironic dependencies. special, express dugouts according to the dep +1565 Customer#000001565 412506.0062 1820.03 BRAZIL EWQO5Ck,nMuHVQimqL8dLrixRP6QKveXcz9QgorW 12-402-178-2007 ously regular accounts wake slyly ironic idea +1966 Customer#000001966 444059.0382 1937.72 ALGERIA jPv1 UHra5JLALR5Isci5u0636RoAu7t vH 10-973-269-8886 the blithely even accounts. final deposits cajole around the blithely final packages. +2455 Customer#000002455 481592.4053 2070.99 GERMANY RVn1ZSRtLqPlJLIZxvpmsbgC02 17-946-225-9977 al asymptotes. finally ironic accounts cajole furiously. permanently unusual theodolites aro +623 Customer#000000623 399883.4257 7887.60 INDONESIA HXiFb9oWlgqZXrJPUCEJ6zZIPxAM4m6 19-113-202-7085 requests. dolphins above the busily regular dependencies cajole after +7714 Customer#000007714 557400.3053 9799.98 IRAN SnnIGB,SkmnWpX3 20-922-418-6024 arhorses according to the blithely express re +8242 Customer#000008242 622786.7297 6322.09 ETHIOPIA P2n4nJhy,UqSo2s43YfSvYJDZ6lk 15-792-676-1184 slyly regular packages haggle carefully ironic ideas. courts are furiously. furiously unusual theodolites cajole. i +8501 Customer#000008501 412797.5100 6906.70 ARGENTINA 776af4rOa mZ66hczs 11-317-552-5840 y final deposits after the fluffily even accounts are slyly final, regular +8530 Customer#000008530 457855.9467 9734.95 MOROCCO GMQyte94oDM7eD7exnkj 4hH9yq3 25-736-932-5850 slyly asymptotes. quickly final deposits in +9151 Customer#000009151 396562.0295 5691.95 IRAQ 7gIdRdaxB91EVdyx8DyPjShpMD 21-834-147-4906 ajole fluffily. furiously regular accounts are special, silent account +961 Customer#000000961 401198.1737 6963.68 JAPAN 5,81YDLFuRR47KKzv8GXdmi3zyP37PlPn 22-989-463-6089 e final requests: busily final accounts believe a + +-- !query10_1_after -- +11026 Customer#000011026 417913.4142 7738.76 ALGERIA XorIktoJOAEJkpNNMx 10-184-163-4632 ly even dolphins eat along the blithely even instructions. express attainments cajole slyly. busy dolphins in +11032 Customer#000011032 512500.9641 8496.93 UNITED KINGDOM WIKHC7K3Cn7156iNOyfVG3cZ7YqkgsR,Ly 33-102-772-3533 posits-- furiously ironic accounts are again +12106 Customer#000012106 479414.2133 5342.11 UNITED STATES wth3twOmu6vy 34-905-346-4472 ly after the blithely regular foxes. accounts haggle carefully alongside of the blithely even ideas. +12595 Customer#000012595 401402.2391 -6.92 INDIA LmeaX5cR,w9NqKugl yRm98 18-186-132-3352 o the busy accounts. blithely special gifts maintain a +13478 Customer#000013478 395513.1358 -778.11 KENYA 9VIsvIeZrJpC6OOdYheMC2vdtq8Ai0Rt 24-983-202-8240 r theodolites. slyly unusual pinto beans sleep fluffily against the asymptotes. quickly r +13984 Customer#000013984 446316.5104 3482.28 IRAN qZXwuapCHvxbX 20-981-264-2952 y unusual courts could wake furiously +14299 Customer#000014299 400968.3751 6595.97 RUSSIA 7lFczTya0iM1bhEWT 32-156-618-1224 carefully regular requests. quickly ironic accounts against the ru +14398 Customer#000014398 408575.3600 -602.24 UNITED STATES GWRCgIPHajtU21vICVvbJJerFu2cUk 34-814-111-5424 s. blithely even accounts cajole blithely. even foxes doubt-- +1465 Customer#000001465 405055.3457 9365.93 INDIA tDRaTC7UgFbBX7VF6cVXYQA0 18-807-487-1074 s lose blithely ironic, regular packages. regular, final foxes haggle c +14819 Customer#000014819 396271.1036 7308.39 FRANCE w8StIbymUXmLCcUag6sx6LUIp8E3pA,Ux 16-769-398-7926 ss, final asymptotes use furiously slyly ironic dependencies. special, express dugouts according to the dep +1565 Customer#000001565 412506.0062 1820.03 BRAZIL EWQO5Ck,nMuHVQimqL8dLrixRP6QKveXcz9QgorW 12-402-178-2007 ously regular accounts wake slyly ironic idea +1966 Customer#000001966 444059.0382 1937.72 ALGERIA jPv1 UHra5JLALR5Isci5u0636RoAu7t vH 10-973-269-8886 the blithely even accounts. final deposits cajole around the blithely final packages. +2455 Customer#000002455 481592.4053 2070.99 GERMANY RVn1ZSRtLqPlJLIZxvpmsbgC02 17-946-225-9977 al asymptotes. finally ironic accounts cajole furiously. permanently unusual theodolites aro +623 Customer#000000623 399883.4257 7887.60 INDONESIA HXiFb9oWlgqZXrJPUCEJ6zZIPxAM4m6 19-113-202-7085 requests. dolphins above the busily regular dependencies cajole after +7714 Customer#000007714 557400.3053 9799.98 IRAN SnnIGB,SkmnWpX3 20-922-418-6024 arhorses according to the blithely express re +8242 Customer#000008242 622786.7297 6322.09 ETHIOPIA P2n4nJhy,UqSo2s43YfSvYJDZ6lk 15-792-676-1184 slyly regular packages haggle carefully ironic ideas. courts are furiously. furiously unusual theodolites cajole. i +8501 Customer#000008501 412797.5100 6906.70 ARGENTINA 776af4rOa mZ66hczs 11-317-552-5840 y final deposits after the fluffily even accounts are slyly final, regular +8530 Customer#000008530 457855.9467 9734.95 MOROCCO GMQyte94oDM7eD7exnkj 4hH9yq3 25-736-932-5850 slyly asymptotes. quickly final deposits in +9151 Customer#000009151 396562.0295 5691.95 IRAQ 7gIdRdaxB91EVdyx8DyPjShpMD 21-834-147-4906 ajole fluffily. furiously regular accounts are special, silent account +961 Customer#000000961 401198.1737 6963.68 JAPAN 5,81YDLFuRR47KKzv8GXdmi3zyP37PlPn 22-989-463-6089 e final requests: busily final accounts believe a + -- !query11_before -- 10012 4223841.21 1002 1323418.65 @@ -11305,6 +11373,20 @@ Customer#000006655 6655 29158 1995-10-21 452805.02 305.00 Customer#000011459 11459 551136 1993-05-19 386812.74 308.00 Customer#000014110 14110 565574 1995-09-24 425099.85 301.00 +-- !query18_1_before -- +Customer#000001639 1639 502886 1994-04-12 456423.88 312.00 +Customer#000001775 1775 6882 1997-04-09 408368.10 303.00 +Customer#000006655 6655 29158 1995-10-21 452805.02 305.00 +Customer#000011459 11459 551136 1993-05-19 386812.74 308.00 +Customer#000014110 14110 565574 1995-09-24 425099.85 301.00 + +-- !query18_1_after -- +Customer#000001639 1639 502886 1994-04-12 456423.88 312.00 +Customer#000001775 1775 6882 1997-04-09 408368.10 303.00 +Customer#000006655 6655 29158 1995-10-21 452805.02 305.00 +Customer#000011459 11459 551136 1993-05-19 386812.74 308.00 +Customer#000014110 14110 565574 1995-09-24 425099.85 301.00 + -- !query19_before -- 168597.2860 @@ -11431,6 +11513,104 @@ Supplier#000000920 4 Supplier#000000929 11 Supplier#000000977 13 +-- !query21_1_before -- +Supplier#000000074 8 +Supplier#000000114 6 +Supplier#000000144 12 +Supplier#000000167 9 +Supplier#000000188 12 +Supplier#000000262 10 +Supplier#000000357 14 +Supplier#000000379 6 +Supplier#000000380 11 +Supplier#000000399 14 +Supplier#000000415 12 +Supplier#000000427 7 +Supplier#000000436 6 +Supplier#000000445 16 +Supplier#000000460 10 +Supplier#000000472 12 +Supplier#000000486 10 +Supplier#000000496 14 +Supplier#000000500 6 +Supplier#000000503 7 +Supplier#000000565 8 +Supplier#000000578 9 +Supplier#000000602 11 +Supplier#000000610 7 +Supplier#000000633 12 +Supplier#000000648 8 +Supplier#000000659 11 +Supplier#000000660 6 +Supplier#000000669 10 +Supplier#000000670 7 +Supplier#000000673 9 +Supplier#000000687 9 +Supplier#000000708 12 +Supplier#000000709 15 +Supplier#000000718 10 +Supplier#000000762 15 +Supplier#000000778 10 +Supplier#000000788 6 +Supplier#000000811 7 +Supplier#000000821 11 +Supplier#000000825 16 +Supplier#000000846 6 +Supplier#000000889 12 +Supplier#000000918 8 +Supplier#000000920 4 +Supplier#000000929 11 +Supplier#000000977 13 + +-- !query21_1_after -- +Supplier#000000074 8 +Supplier#000000114 6 +Supplier#000000144 12 +Supplier#000000167 9 +Supplier#000000188 12 +Supplier#000000262 10 +Supplier#000000357 14 +Supplier#000000379 6 +Supplier#000000380 11 +Supplier#000000399 14 +Supplier#000000415 12 +Supplier#000000427 7 +Supplier#000000436 6 +Supplier#000000445 16 +Supplier#000000460 10 +Supplier#000000472 12 +Supplier#000000486 10 +Supplier#000000496 14 +Supplier#000000500 6 +Supplier#000000503 7 +Supplier#000000565 8 +Supplier#000000578 9 +Supplier#000000602 11 +Supplier#000000610 7 +Supplier#000000633 12 +Supplier#000000648 8 +Supplier#000000659 11 +Supplier#000000660 6 +Supplier#000000669 10 +Supplier#000000670 7 +Supplier#000000673 9 +Supplier#000000687 9 +Supplier#000000708 12 +Supplier#000000709 15 +Supplier#000000718 10 +Supplier#000000762 15 +Supplier#000000778 10 +Supplier#000000788 6 +Supplier#000000811 7 +Supplier#000000821 11 +Supplier#000000825 16 +Supplier#000000846 6 +Supplier#000000889 12 +Supplier#000000918 8 +Supplier#000000920 4 +Supplier#000000929 11 +Supplier#000000977 13 + -- !query22_before -- 13 94 714035.05 17 96 722560.15 diff --git a/regression-test/data/nereids_syntax_p1/mv/aggregate/agg_sync_mv.out b/regression-test/data/nereids_syntax_p1/mv/aggregate/agg_sync_mv.out index fee553ed3d091d..848d637c916a93 100644 --- a/regression-test/data/nereids_syntax_p1/mv/aggregate/agg_sync_mv.out +++ b/regression-test/data/nereids_syntax_p1/mv/aggregate/agg_sync_mv.out @@ -90,34 +90,34 @@ 11 [12] -- !select_collect_list -- -\N [1, 1, 1, 1, 1] -0 [1, 1, 1, 1, 1, 1, 1, 1, 1, 1] -1 [2, 2, 2, 2, 2, 2, 2, 2, 2, 2] -2 [3, 3, 3, 3, 3, 3, 3, 3, 3, 3] -3 [4, 4, 4, 4, 4, 4, 4, 4, 4, 4] -4 [5, 5, 5, 5, 5, 5, 5, 5, 5, 5] -5 [6, 6, 6, 6, 6, 6, 6, 6, 6, 6] -6 [7, 7, 7, 7, 7, 7, 7, 7, 7, 7] -7 [8, 8, 8, 8, 8, 8, 8, 8, 8, 8] -8 [9, 9, 9, 9, 9, 9, 9, 9, 9, 9] -9 [10, 10, 10, 10, 10, 10, 10, 10, 10, 10] -10 [11, 11, 11, 11, 11, 11, 11, 11, 11, 11] -11 [12, 12, 12, 12, 12, 12, 12, 12, 12, 12] +\N [1] +0 [1, 1] +1 [2, 2] +2 [3, 3] +3 [4, 4] +4 [5, 5] +5 [6, 6] +6 [7, 7] +7 [8, 8] +8 [9, 9] +9 [10, 10] +10 [11, 11] +11 [12, 12] -- !select_collect_list_mv -- -\N [1, 1, 1, 1, 1] -0 [1, 1, 1, 1, 1, 1, 1, 1, 1, 1] -1 [2, 2, 2, 2, 2, 2, 2, 2, 2, 2] -2 [3, 3, 3, 3, 3, 3, 3, 3, 3, 3] -3 [4, 4, 4, 4, 4, 4, 4, 4, 4, 4] -4 [5, 5, 5, 5, 5, 5, 5, 5, 5, 5] -5 [6, 6, 6, 6, 6, 6, 6, 6, 6, 6] -6 [7, 7, 7, 7, 7, 7, 7, 7, 7, 7] -7 [8, 8, 8, 8, 8, 8, 8, 8, 8, 8] -8 [9, 9, 9, 9, 9, 9, 9, 9, 9, 9] -9 [10, 10, 10, 10, 10, 10, 10, 10, 10, 10] -10 [11, 11, 11, 11, 11, 11, 11, 11, 11, 11] -11 [12, 12, 12, 12, 12, 12, 12, 12, 12, 12] +\N [1] +0 [1, 1] +1 [2, 2] +2 [3, 3] +3 [4, 4] +4 [5, 5] +5 [6, 6] +6 [7, 7] +7 [8, 8] +8 [9, 9] +9 [10, 10] +10 [11, 11] +11 [12, 12] -- !select_corr -- \N 0.0 @@ -210,34 +210,34 @@ 11 \N -- !select_count_by_enum -- -\N [{"cbe":{"string1":5,"null":10},"notnull":15,"null":0,"all":15}] -0 [{"cbe":{"string1":10},"notnull":10,"null":0,"all":10}] -1 [{"cbe":{"string2":10},"notnull":10,"null":0,"all":10}] -2 [{"cbe":{"string3":10},"notnull":10,"null":0,"all":10}] -3 [{"cbe":{"string1":10},"notnull":10,"null":0,"all":10}] -4 [{"cbe":{"string2":10},"notnull":10,"null":0,"all":10}] -5 [{"cbe":{"string3":10},"notnull":10,"null":0,"all":10}] -6 [{"cbe":{"string1":10},"notnull":10,"null":0,"all":10}] -7 [{"cbe":{"string2":10},"notnull":10,"null":0,"all":10}] -8 [{"cbe":{"string3":10},"notnull":10,"null":0,"all":10}] -9 [{"cbe":{"string1":10},"notnull":10,"null":0,"all":10}] -10 [{"cbe":{"string2":10},"notnull":10,"null":0,"all":10}] -11 [{"cbe":{"string3":10},"notnull":10,"null":0,"all":10}] +\N [{"cbe":{"string1":1,"null":2},"notnull":3,"null":0,"all":3}] +0 [{"cbe":{"string1":2},"notnull":2,"null":0,"all":2}] +1 [{"cbe":{"string2":2},"notnull":2,"null":0,"all":2}] +2 [{"cbe":{"string3":2},"notnull":2,"null":0,"all":2}] +3 [{"cbe":{"string1":2},"notnull":2,"null":0,"all":2}] +4 [{"cbe":{"string2":2},"notnull":2,"null":0,"all":2}] +5 [{"cbe":{"string3":2},"notnull":2,"null":0,"all":2}] +6 [{"cbe":{"string1":2},"notnull":2,"null":0,"all":2}] +7 [{"cbe":{"string2":2},"notnull":2,"null":0,"all":2}] +8 [{"cbe":{"string3":2},"notnull":2,"null":0,"all":2}] +9 [{"cbe":{"string1":2},"notnull":2,"null":0,"all":2}] +10 [{"cbe":{"string2":2},"notnull":2,"null":0,"all":2}] +11 [{"cbe":{"string3":2},"notnull":2,"null":0,"all":2}] -- !select_count_by_enum_mv -- -\N [{"cbe":{"string1":5,"null":10},"notnull":15,"null":0,"all":15}] -0 [{"cbe":{"string1":10},"notnull":10,"null":0,"all":10}] -1 [{"cbe":{"string2":10},"notnull":10,"null":0,"all":10}] -2 [{"cbe":{"string3":10},"notnull":10,"null":0,"all":10}] -3 [{"cbe":{"string1":10},"notnull":10,"null":0,"all":10}] -4 [{"cbe":{"string2":10},"notnull":10,"null":0,"all":10}] -5 [{"cbe":{"string3":10},"notnull":10,"null":0,"all":10}] -6 [{"cbe":{"string1":10},"notnull":10,"null":0,"all":10}] -7 [{"cbe":{"string2":10},"notnull":10,"null":0,"all":10}] -8 [{"cbe":{"string3":10},"notnull":10,"null":0,"all":10}] -9 [{"cbe":{"string1":10},"notnull":10,"null":0,"all":10}] -10 [{"cbe":{"string2":10},"notnull":10,"null":0,"all":10}] -11 [{"cbe":{"string3":10},"notnull":10,"null":0,"all":10}] +\N [{"cbe":{"string1":1,"null":2},"notnull":3,"null":0,"all":3}] +0 [{"cbe":{"string1":2},"notnull":2,"null":0,"all":2}] +1 [{"cbe":{"string2":2},"notnull":2,"null":0,"all":2}] +2 [{"cbe":{"string3":2},"notnull":2,"null":0,"all":2}] +3 [{"cbe":{"string1":2},"notnull":2,"null":0,"all":2}] +4 [{"cbe":{"string2":2},"notnull":2,"null":0,"all":2}] +5 [{"cbe":{"string3":2},"notnull":2,"null":0,"all":2}] +6 [{"cbe":{"string1":2},"notnull":2,"null":0,"all":2}] +7 [{"cbe":{"string2":2},"notnull":2,"null":0,"all":2}] +8 [{"cbe":{"string3":2},"notnull":2,"null":0,"all":2}] +9 [{"cbe":{"string1":2},"notnull":2,"null":0,"all":2}] +10 [{"cbe":{"string2":2},"notnull":2,"null":0,"all":2}] +11 [{"cbe":{"string3":2},"notnull":2,"null":0,"all":2}] -- !select_avg_weighted -- \N 1.0 @@ -247,11 +247,11 @@ 3 4.0 4 5.0 5 6.0 -6 6.999999999999999 +6 7.0 7 8.0 8 9.0 9 10.0 -10 11.000000000000002 +10 11.0 11 12.0 -- !select_avg_weighted_mv -- @@ -262,11 +262,11 @@ 3 4.0 4 5.0 5 6.0 -6 6.999999999999999 +6 7.0 7 8.0 8 9.0 9 10.0 -10 11.000000000000002 +10 11.0 11 12.0 -- !select_bitmap_intersect -- @@ -660,34 +660,34 @@ 11 0 -- !select_group_concat -- -\N 1,1,1,1,1 -0 1,1,1,1,1,1,1,1,1,1 -1 2,2,2,2,2,2,2,2,2,2 -2 3,3,3,3,3,3,3,3,3,3 -3 4,4,4,4,4,4,4,4,4,4 -4 5,5,5,5,5,5,5,5,5,5 -5 6,6,6,6,6,6,6,6,6,6 -6 7,7,7,7,7,7,7,7,7,7 -7 8,8,8,8,8,8,8,8,8,8 -8 9,9,9,9,9,9,9,9,9,9 -9 10,10,10,10,10,10,10,10,10,10 -10 11,11,11,11,11,11,11,11,11,11 -11 12,12,12,12,12,12,12,12,12,12 +\N 1 +0 1,1 +1 2,2 +2 3,3 +3 4,4 +4 5,5 +5 6,6 +6 7,7 +7 8,8 +8 9,9 +9 10,10 +10 11,11 +11 12,12 -- !select_group_concat_mv -- -\N 1,1,1,1,1 -0 1,1,1,1,1,1,1,1,1,1 -1 2,2,2,2,2,2,2,2,2,2 -2 3,3,3,3,3,3,3,3,3,3 -3 4,4,4,4,4,4,4,4,4,4 -4 5,5,5,5,5,5,5,5,5,5 -5 6,6,6,6,6,6,6,6,6,6 -6 7,7,7,7,7,7,7,7,7,7 -7 8,8,8,8,8,8,8,8,8,8 -8 9,9,9,9,9,9,9,9,9,9 -9 10,10,10,10,10,10,10,10,10,10 -10 11,11,11,11,11,11,11,11,11,11 -11 12,12,12,12,12,12,12,12,12,12 +\N 1 +0 1,1 +1 2,2 +2 3,3 +3 4,4 +4 5,5 +5 6,6 +6 7,7 +7 8,8 +8 9,9 +9 10,10 +10 11,11 +11 12,12 -- !select_multi_distinct_group_concat -- \N 1 @@ -780,34 +780,34 @@ 11 12 -- !select_histogram -- -\N {"num_buckets":1,"buckets":[{"lower":"1","upper":"1","ndv":1,"count":5,"pre_sum":0}]} -0 {"num_buckets":1,"buckets":[{"lower":"1","upper":"1","ndv":1,"count":10,"pre_sum":0}]} -1 {"num_buckets":1,"buckets":[{"lower":"2","upper":"2","ndv":1,"count":10,"pre_sum":0}]} -2 {"num_buckets":1,"buckets":[{"lower":"3","upper":"3","ndv":1,"count":10,"pre_sum":0}]} -3 {"num_buckets":1,"buckets":[{"lower":"4","upper":"4","ndv":1,"count":10,"pre_sum":0}]} -4 {"num_buckets":1,"buckets":[{"lower":"5","upper":"5","ndv":1,"count":10,"pre_sum":0}]} -5 {"num_buckets":1,"buckets":[{"lower":"6","upper":"6","ndv":1,"count":10,"pre_sum":0}]} -6 {"num_buckets":1,"buckets":[{"lower":"7","upper":"7","ndv":1,"count":10,"pre_sum":0}]} -7 {"num_buckets":1,"buckets":[{"lower":"8","upper":"8","ndv":1,"count":10,"pre_sum":0}]} -8 {"num_buckets":1,"buckets":[{"lower":"9","upper":"9","ndv":1,"count":10,"pre_sum":0}]} -9 {"num_buckets":1,"buckets":[{"lower":"10","upper":"10","ndv":1,"count":10,"pre_sum":0}]} -10 {"num_buckets":1,"buckets":[{"lower":"11","upper":"11","ndv":1,"count":10,"pre_sum":0}]} -11 {"num_buckets":1,"buckets":[{"lower":"12","upper":"12","ndv":1,"count":10,"pre_sum":0}]} +\N {"num_buckets":1,"buckets":[{"lower":"1","upper":"1","ndv":1,"count":1,"pre_sum":0}]} +0 {"num_buckets":1,"buckets":[{"lower":"1","upper":"1","ndv":1,"count":2,"pre_sum":0}]} +1 {"num_buckets":1,"buckets":[{"lower":"2","upper":"2","ndv":1,"count":2,"pre_sum":0}]} +2 {"num_buckets":1,"buckets":[{"lower":"3","upper":"3","ndv":1,"count":2,"pre_sum":0}]} +3 {"num_buckets":1,"buckets":[{"lower":"4","upper":"4","ndv":1,"count":2,"pre_sum":0}]} +4 {"num_buckets":1,"buckets":[{"lower":"5","upper":"5","ndv":1,"count":2,"pre_sum":0}]} +5 {"num_buckets":1,"buckets":[{"lower":"6","upper":"6","ndv":1,"count":2,"pre_sum":0}]} +6 {"num_buckets":1,"buckets":[{"lower":"7","upper":"7","ndv":1,"count":2,"pre_sum":0}]} +7 {"num_buckets":1,"buckets":[{"lower":"8","upper":"8","ndv":1,"count":2,"pre_sum":0}]} +8 {"num_buckets":1,"buckets":[{"lower":"9","upper":"9","ndv":1,"count":2,"pre_sum":0}]} +9 {"num_buckets":1,"buckets":[{"lower":"10","upper":"10","ndv":1,"count":2,"pre_sum":0}]} +10 {"num_buckets":1,"buckets":[{"lower":"11","upper":"11","ndv":1,"count":2,"pre_sum":0}]} +11 {"num_buckets":1,"buckets":[{"lower":"12","upper":"12","ndv":1,"count":2,"pre_sum":0}]} -- !select_histogram_mv -- -\N {"num_buckets":1,"buckets":[{"lower":"1","upper":"1","ndv":1,"count":5,"pre_sum":0}]} -0 {"num_buckets":1,"buckets":[{"lower":"1","upper":"1","ndv":1,"count":10,"pre_sum":0}]} -1 {"num_buckets":1,"buckets":[{"lower":"2","upper":"2","ndv":1,"count":10,"pre_sum":0}]} -2 {"num_buckets":1,"buckets":[{"lower":"3","upper":"3","ndv":1,"count":10,"pre_sum":0}]} -3 {"num_buckets":1,"buckets":[{"lower":"4","upper":"4","ndv":1,"count":10,"pre_sum":0}]} -4 {"num_buckets":1,"buckets":[{"lower":"5","upper":"5","ndv":1,"count":10,"pre_sum":0}]} -5 {"num_buckets":1,"buckets":[{"lower":"6","upper":"6","ndv":1,"count":10,"pre_sum":0}]} -6 {"num_buckets":1,"buckets":[{"lower":"7","upper":"7","ndv":1,"count":10,"pre_sum":0}]} -7 {"num_buckets":1,"buckets":[{"lower":"8","upper":"8","ndv":1,"count":10,"pre_sum":0}]} -8 {"num_buckets":1,"buckets":[{"lower":"9","upper":"9","ndv":1,"count":10,"pre_sum":0}]} -9 {"num_buckets":1,"buckets":[{"lower":"10","upper":"10","ndv":1,"count":10,"pre_sum":0}]} -10 {"num_buckets":1,"buckets":[{"lower":"11","upper":"11","ndv":1,"count":10,"pre_sum":0}]} -11 {"num_buckets":1,"buckets":[{"lower":"12","upper":"12","ndv":1,"count":10,"pre_sum":0}]} +\N {"num_buckets":1,"buckets":[{"lower":"1","upper":"1","ndv":1,"count":1,"pre_sum":0}]} +0 {"num_buckets":1,"buckets":[{"lower":"1","upper":"1","ndv":1,"count":2,"pre_sum":0}]} +1 {"num_buckets":1,"buckets":[{"lower":"2","upper":"2","ndv":1,"count":2,"pre_sum":0}]} +2 {"num_buckets":1,"buckets":[{"lower":"3","upper":"3","ndv":1,"count":2,"pre_sum":0}]} +3 {"num_buckets":1,"buckets":[{"lower":"4","upper":"4","ndv":1,"count":2,"pre_sum":0}]} +4 {"num_buckets":1,"buckets":[{"lower":"5","upper":"5","ndv":1,"count":2,"pre_sum":0}]} +5 {"num_buckets":1,"buckets":[{"lower":"6","upper":"6","ndv":1,"count":2,"pre_sum":0}]} +6 {"num_buckets":1,"buckets":[{"lower":"7","upper":"7","ndv":1,"count":2,"pre_sum":0}]} +7 {"num_buckets":1,"buckets":[{"lower":"8","upper":"8","ndv":1,"count":2,"pre_sum":0}]} +8 {"num_buckets":1,"buckets":[{"lower":"9","upper":"9","ndv":1,"count":2,"pre_sum":0}]} +9 {"num_buckets":1,"buckets":[{"lower":"10","upper":"10","ndv":1,"count":2,"pre_sum":0}]} +10 {"num_buckets":1,"buckets":[{"lower":"11","upper":"11","ndv":1,"count":2,"pre_sum":0}]} +11 {"num_buckets":1,"buckets":[{"lower":"12","upper":"12","ndv":1,"count":2,"pre_sum":0}]} -- !select_max_by -- \N 1 @@ -1200,64 +1200,64 @@ 11 0.0 -- !select_sum0 -- -\N 5 -0 10 -1 20 -2 30 -3 40 -4 50 -5 60 -6 70 -7 80 -8 90 -9 100 -10 110 -11 120 +\N 1 +0 2 +1 4 +2 6 +3 8 +4 10 +5 12 +6 14 +7 16 +8 18 +9 20 +10 22 +11 24 -- !select_sum0_mv -- -\N 5 -0 10 -1 20 -2 30 -3 40 -4 50 -5 60 -6 70 -7 80 -8 90 -9 100 -10 110 -11 120 +\N 1 +0 2 +1 4 +2 6 +3 8 +4 10 +5 12 +6 14 +7 16 +8 18 +9 20 +10 22 +11 24 -- !select_topn -- -\N {"null":10,"varchar11":5} -0 {"varchar11":10} -1 {"varchar12":10} -2 {"varchar13":10} -3 {"varchar11":10} -4 {"varchar12":10} -5 {"varchar13":10} -6 {"varchar11":10} -7 {"varchar12":10} -8 {"varchar13":10} -9 {"varchar11":10} -10 {"varchar12":10} -11 {"varchar13":10} +\N {"null":2,"varchar11":1} +0 {"varchar11":2} +1 {"varchar12":2} +2 {"varchar13":2} +3 {"varchar11":2} +4 {"varchar12":2} +5 {"varchar13":2} +6 {"varchar11":2} +7 {"varchar12":2} +8 {"varchar13":2} +9 {"varchar11":2} +10 {"varchar12":2} +11 {"varchar13":2} -- !select_topn_mv -- -\N {"null":10,"varchar11":5} -0 {"varchar11":10} -1 {"varchar12":10} -2 {"varchar13":10} -3 {"varchar11":10} -4 {"varchar12":10} -5 {"varchar13":10} -6 {"varchar11":10} -7 {"varchar12":10} -8 {"varchar13":10} -9 {"varchar11":10} -10 {"varchar12":10} -11 {"varchar13":10} +\N {"null":2,"varchar11":1} +0 {"varchar11":2} +1 {"varchar12":2} +2 {"varchar13":2} +3 {"varchar11":2} +4 {"varchar12":2} +5 {"varchar13":2} +6 {"varchar11":2} +7 {"varchar12":2} +8 {"varchar13":2} +9 {"varchar11":2} +10 {"varchar12":2} +11 {"varchar13":2} -- !select_topn_array -- \N ["null", "varchar11"] diff --git a/regression-test/framework/src/main/groovy/org/apache/doris/regression/suite/Suite.groovy b/regression-test/framework/src/main/groovy/org/apache/doris/regression/suite/Suite.groovy index 671586c02daef2..650e949da8598b 100644 --- a/regression-test/framework/src/main/groovy/org/apache/doris/regression/suite/Suite.groovy +++ b/regression-test/framework/src/main/groovy/org/apache/doris/regression/suite/Suite.groovy @@ -1520,8 +1520,8 @@ class Suite implements GroovyInterceptable { } } - def getMVJobState = { tableName, rollUpName -> - def jobStateResult = sql """ SHOW ALTER TABLE ROLLUP WHERE TableName='${tableName}' and IndexName = '${rollUpName}' ORDER BY CreateTime DESC limit 1""" + def getMVJobState = { tableName -> + def jobStateResult = sql """ SHOW ALTER TABLE ROLLUP WHERE TableName='${tableName}' ORDER BY CreateTime DESC limit 1""" if (jobStateResult == null || jobStateResult.isEmpty()) { logger.info("show alter table roll is empty" + jobStateResult) return "NOT_READY" @@ -1532,14 +1532,14 @@ class Suite implements GroovyInterceptable { } return "FINISHED"; } - def waitForRollUpJob = (tbName, rollUpName, timeoutMillisecond) -> { + def waitForRollUpJob = (tbName, timeoutMillisecond) -> { long startTime = System.currentTimeMillis() long timeoutTimestamp = startTime + timeoutMillisecond String result while (timeoutTimestamp > System.currentTimeMillis()){ - result = getMVJobState(tbName, rollUpName) + result = getMVJobState(tbName) if (result == "FINISHED") { sleep(200) return @@ -1815,8 +1815,17 @@ class Suite implements GroovyInterceptable { } // mv not part in rewrite process - def mv_not_part_in = { query_sql, mv_name -> - logger.info("query_sql = " + query_sql + ", mv_names = " + mv_name) + void mv_not_part_in(query_sql, mv_name, sync_cbo_rewrite = enable_sync_mv_cost_based_rewrite()) { + logger.info("query_sql = " + query_sql + ", mv_names = " + mv_name + ", sync_cbo_rewrite = " + sync_cbo_rewrite) + if (!sync_cbo_rewrite) { + explain { + sql("${query_sql}") + check { result -> + boolean isContain = result.contains("${mv_name}") + Assert.assertFalse(isContain) + } + } + } explain { sql(" memo plan ${query_sql}") check { result -> @@ -1828,8 +1837,20 @@ class Suite implements GroovyInterceptable { } // multi mv all not part in rewrite process - def mv_all_not_part_in = { query_sql, mv_names -> - logger.info("query_sql = " + query_sql + ", mv_names = " + mv_names) + void mv_all_not_part_in(query_sql, mv_names, sync_cbo_rewrite = enable_sync_mv_cost_based_rewrite()) { + logger.info("query_sql = " + query_sql + ", mv_names = " + mv_names + ", sync_cbo_rewrite = " + sync_cbo_rewrite) + if (!sync_cbo_rewrite) { + explain { + sql("${query_sql}") + check { result -> + boolean isContain = false; + for (String mv_name : mv_names) { + isContain = isContain || result.contains("${mv_name}") + } + Assert.assertFalse(isContain) + } + } + } explain { sql(" memo plan ${query_sql}") check { result -> diff --git a/regression-test/suites/ddl_p0/test_create_table_like_nereids.groovy b/regression-test/suites/ddl_p0/test_create_table_like_nereids.groovy index a371f5ac051ea8..24e5170ebd3df6 100644 --- a/regression-test/suites/ddl_p0/test_create_table_like_nereids.groovy +++ b/regression-test/suites/ddl_p0/test_create_table_like_nereids.groovy @@ -46,40 +46,37 @@ suite("test_create_table_like_nereids") { // with all rollup sql "drop table if exists table_like_with_roll_up" sql "CREATE TABLE table_like_with_roll_up LIKE mal_test_create_table_like with rollup;" - waitForRollUpJob("mal_test_create_table_like", "r1", 60000) - waitForRollUpJob("mal_test_create_table_like", "r2", 60000) - explain { - sql ("select sum(a) from table_like_with_roll_up group by a") - contains "ru1" - } ; - explain { - sql ("select sum(b) from table_like_with_roll_up group by b,pk ;") - contains "ru2" - } ; + + sql """insert into table_like_with_roll_up values(2,1,3),(1,1,2),(3,5,6),(6,null,6),(4,5,6),(2,1,4),(2,3,5),(1,1,4) + ,(3,5,6),(3,5,null),(6,7,1),(2,1,7),(2,4,2),(2,3,9),(1,3,6),(3,5,8),(3,2,8);""" + + def desc_table_like_with_roll_up = sql """desc table_like_with_roll_up all;""" + logger.info("table_like_with_roll_up desc all is " + desc_table_like_with_roll_up) + + mv_rewrite_success_without_check_chosen("select sum(a) from table_like_with_roll_up group by a", "ru1") + mv_rewrite_success_without_check_chosen("select sum(b) from table_like_with_roll_up group by b,pk ;", "ru2") // with partial rollup sql "drop table if exists table_like_with_partial_roll_up;" sql "CREATE TABLE table_like_with_partial_roll_up LIKE mal_test_create_table_like with rollup (ru1);" - waitForRollUpJob("mal_test_create_table_like", "r1", 60000) - sql "select * from table_like_with_partial_roll_up order by pk, a, b" - explain { - sql("select sum(a) from table_like_with_partial_roll_up group by a") - contains("ru1") - } ; - explain { - sql ("select sum(b) from table_like_with_partial_roll_up group by b,pk ;") - notContains "ru2" - } ; + sql """insert into table_like_with_partial_roll_up values(2,1,3),(1,1,2),(3,5,6),(6,null,6),(4,5,6),(2,1,4),(2,3,5),(1,1,4) ,(3,5,6),(3,5,null),(6,7,1),(2,1,7),(2,4,2),(2,3,9),(1,3,6),(3,5,8),(3,2,8);""" - sleep(2000) + + sql "select * from table_like_with_partial_roll_up order by pk, a, b" + + def desc_table_like_with_partial_roll_up = sql """desc table_like_with_partial_roll_up all;""" + logger.info("desc_table_like_with_partial_roll_up desc all is " + desc_table_like_with_partial_roll_up) + + mv_rewrite_success_without_check_chosen("select sum(a) from table_like_with_partial_roll_up group by a", "ru1") + mv_not_part_in("select sum(b) from table_like_with_partial_roll_up group by b,pk ;", "ru2") + sql "select sum(a) from table_like_with_partial_roll_up group by a order by 1" // test if not exists sql "drop table if exists table_like_with_partial_roll_up_exists" sql """CREATE TABLE if not exists table_like_with_partial_roll_up_exists LIKE mal_test_create_table_like with rollup (ru1);""" - waitForRollUpJob("mal_test_create_table_like", "r1", 60000) sql "drop table if exists test_create_table_like_char_255" sql """ diff --git a/regression-test/suites/mtmv_p0/test_alter_distribution_type_mtmv.groovy b/regression-test/suites/mtmv_p0/test_alter_distribution_type_mtmv.groovy index 2db7e95c2e6e30..19a858602663a5 100644 --- a/regression-test/suites/mtmv_p0/test_alter_distribution_type_mtmv.groovy +++ b/regression-test/suites/mtmv_p0/test_alter_distribution_type_mtmv.groovy @@ -18,7 +18,7 @@ import org.junit.Assert; suite("test_alter_distribution_type_mtmv","mtmv") { - String suiteName = "test_light_schema_change_mtmv" + String suiteName = "test_alter_distribution_type_mtmv" String tableName = "${suiteName}_table" String mvName = "${suiteName}_mv" diff --git a/regression-test/suites/nereids_rules_p0/mv/agg_on_none_agg/agg_on_none_agg.groovy b/regression-test/suites/nereids_rules_p0/mv/agg_on_none_agg/agg_on_none_agg.groovy index 6fba64f06084f3..d10498705f60c6 100644 --- a/regression-test/suites/nereids_rules_p0/mv/agg_on_none_agg/agg_on_none_agg.groovy +++ b/regression-test/suites/nereids_rules_p0/mv/agg_on_none_agg/agg_on_none_agg.groovy @@ -124,6 +124,11 @@ suite("agg_on_none_agg") { sql """analyze table lineitem with sync;""" sql """analyze table partsupp with sync;""" + // inject column statistic + sql """alter table orders modify column o_orderkey set stats ('row_count'='8')""" + sql """alter table lineitem modify column l_orderkey set stats ('row_count'='5')""" + sql """alter table partsupp modify column ps_partkey set stats ('row_count'='2')""" + // query used expression is in mv def mv1_0 = """ select case when o_shippriority > 1 and o_orderkey IN (4, 5) then o_custkey else o_shippriority end, diff --git a/regression-test/suites/nereids_rules_p0/mv/join/left_outer/outer_join.groovy b/regression-test/suites/nereids_rules_p0/mv/join/left_outer/outer_join.groovy index f31a1a77978cb4..faa2c747a837c5 100644 --- a/regression-test/suites/nereids_rules_p0/mv/join/left_outer/outer_join.groovy +++ b/regression-test/suites/nereids_rules_p0/mv/join/left_outer/outer_join.groovy @@ -759,4 +759,53 @@ suite("outer_join") { async_mv_rewrite_success(db, mv11_0, query11_0, "mv11_0") order_qt_query11_0_after "${query11_0}" sql """ DROP MATERIALIZED VIEW IF EXISTS mv11_0""" + + + def mv12_0 = """ + select + o_orderdate, + o_shippriority, + o_comment, + o.o_code as o_o_code, + l_orderkey, + l_partkey, + l.o_code as l_o_code + from + orders_same_col o left + join lineitem_same_col l on l_orderkey = o_orderkey + left join partsupp on ps_partkey = l_partkey and l_suppkey = ps_suppkey; + """ + + def query12_0 = """ + select + o_orderdate, + o_shippriority, + o_comment, + o.o_code + l_orderkey, + l_partkey + from + orders_same_col o left + join lineitem_same_col l on l_orderkey = o_orderkey + left join partsupp on ps_partkey = l_partkey and l_suppkey = ps_suppkey + where l.o_code <> '91' + union all + select + o_orderdate, + o_shippriority, + o_comment, + o.o_code + l_orderkey, + l_partkey + from + orders_same_col o left + join lineitem_same_col l on l_orderkey = o_orderkey + left join partsupp on ps_partkey = l_partkey and l_suppkey = ps_suppkey + where l.o_code = '92'; + """ + + order_qt_query12_0_before "${query12_0}" + async_mv_rewrite_success(db, mv12_0, query12_0, "mv12_0") + order_qt_query12_0_after "${query12_0}" + sql """ DROP MATERIALIZED VIEW IF EXISTS mv12_0""" } diff --git a/regression-test/suites/nereids_rules_p0/mv/negative/negative_test.groovy b/regression-test/suites/nereids_rules_p0/mv/negative/negative_test.groovy index 03ddf46fdf1d3b..ba23c29ab9abc4 100644 --- a/regression-test/suites/nereids_rules_p0/mv/negative/negative_test.groovy +++ b/regression-test/suites/nereids_rules_p0/mv/negative/negative_test.groovy @@ -471,7 +471,7 @@ suite("negative_partition_mv_rewrite") { on lineitem_1.l_orderkey > orders_1.o_orderkey group by l_shipdate, o_orderdate, l_partkey """ - mv_rewrite_fail(query_sql, mv_name) + mv_rewrite_success(query_sql, mv_name) // mtmv exists join but not exists agg, query exists agg mtmv_sql = """ diff --git a/regression-test/suites/nereids_rules_p0/mv/other_join_conjuncts/anti/other_join_conjuncts_anti.groovy b/regression-test/suites/nereids_rules_p0/mv/other_join_conjuncts/anti/other_join_conjuncts_anti.groovy new file mode 100644 index 00000000000000..68337b00d09da8 --- /dev/null +++ b/regression-test/suites/nereids_rules_p0/mv/other_join_conjuncts/anti/other_join_conjuncts_anti.groovy @@ -0,0 +1,459 @@ +// Licensed to the Apache Software Foundation (ASF) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The ASF licenses this file +// to you under the Apache License, Version 2.0 (the +// "License"); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. + +suite("other_join_conjuncts_anti") { + String db = context.config.getDbNameByFile(context.file) + sql "use ${db}" + sql "set runtime_filter_mode=OFF"; + sql "SET ignore_shape_nodes='PhysicalDistribute,PhysicalProject'" + + sql """ + drop table if exists orders + """ + + sql """ + CREATE TABLE IF NOT EXISTS orders ( + o_orderkey INTEGER NOT NULL, + o_custkey INTEGER NOT NULL, + o_orderstatus CHAR(1) NOT NULL, + o_totalprice DECIMALV3(15,2) NOT NULL, + o_orderdate DATE NOT NULL, + o_orderpriority CHAR(15) NOT NULL, + o_clerk CHAR(15) NOT NULL, + o_shippriority INTEGER NOT NULL, + O_COMMENT VARCHAR(79) NOT NULL, + lo_orderdate DATE NOT NULL + ) + DUPLICATE KEY(o_orderkey, o_custkey) + DISTRIBUTED BY HASH(o_orderkey) BUCKETS 3 + PROPERTIES ( + "replication_num" = "1" + ); + """ + + sql """ + drop table if exists lineitem + """ + + sql""" + CREATE TABLE IF NOT EXISTS lineitem ( + l_orderkey INTEGER NOT NULL, + l_partkey INTEGER NOT NULL, + l_suppkey INTEGER NOT NULL, + l_linenumber INTEGER NOT NULL, + l_quantity DECIMALV3(15,2) NOT NULL, + l_extendedprice DECIMALV3(15,2) NOT NULL, + l_discount DECIMALV3(15,2) NOT NULL, + l_tax DECIMALV3(15,2) NOT NULL, + l_returnflag CHAR(1) NOT NULL, + l_linestatus CHAR(1) NOT NULL, + l_shipdate DATE NOT NULL, + l_commitdate DATE NOT NULL, + l_receiptdate DATE NOT NULL, + l_shipinstruct CHAR(25) NOT NULL, + l_shipmode CHAR(10) NOT NULL, + l_comment VARCHAR(44) NOT NULL, + lo_orderdate DATE NOT NULL + ) + DUPLICATE KEY(l_orderkey, l_partkey, l_suppkey, l_linenumber) + DISTRIBUTED BY HASH(l_orderkey) BUCKETS 3 + PROPERTIES ( + "replication_num" = "1" + ) + """ + + sql """ + drop table if exists partsupp + """ + + sql """ + CREATE TABLE IF NOT EXISTS partsupp ( + ps_partkey INTEGER NOT NULL, + ps_suppkey INTEGER NOT NULL, + ps_availqty INTEGER NOT NULL, + ps_supplycost DECIMALV3(15,2) NOT NULL, + ps_comment VARCHAR(199) NOT NULL + ) + DUPLICATE KEY(ps_partkey, ps_suppkey) + DISTRIBUTED BY HASH(ps_partkey) BUCKETS 3 + PROPERTIES ( + "replication_num" = "1" + ) + """ + + sql """ insert into lineitem values + (1, 2, 3, 4, 5.5, 6.5, 7.5, 8.5, 'o', 'k', '2023-12-08', '2023-12-09', '2023-12-10', 'a', 'b', 'yyyyyyyyy' ,'2023-12-08'), + (1, 2, 3, 4, 5.5, 6.5, 7.6, 8.5, 'o', 'k', '2023-12-08', '2023-12-09', '2023-12-10', 'a', 'b', 'yyyyyyyyy' ,'2023-12-08'), + (2, 4, 3, 4, 5.5, 6.5, 7.5, 8.5, 'o', 'k', '2023-12-09', '2023-12-09', '2023-12-10', 'a', 'b', 'yyyyyyyyy' ,'2023-12-09'), + (2, 4, 3, 4, 5.5, 6.5, 7.6, 8.5, 'o', 'k', '2023-12-09', '2023-12-09', '2023-12-10', 'a', 'b', 'yyyyyyyyy' ,'2023-12-09'), + (3, 2, 4, 4, 5.5, 6.5, 7.5, 8.5, 'o', 'k', '2023-12-10', '2023-12-09', '2023-12-10', 'a', 'b', 'yyyyyyyyy' ,'2023-12-10'), + (3, 2, 4, 4, 5.5, 6.6, 7.5, 8.5, 'o', 'k', '2023-12-10', '2023-12-09', '2023-12-10', 'a', 'b', 'yyyyyyyyy' ,'2023-12-10'), + (4, 3, 3, 4, 5.5, 6.5, 7.5, 8.5, 'o', 'k', '2023-12-11', '2023-12-09', '2023-12-10', 'a', 'b', 'yyyyyyyyy' ,'2023-12-11'), + (4, 3, 3, 4, 5.5, 6.6, 7.5, 8.5, 'o', 'k', '2023-12-11', '2023-12-09', '2023-12-10', 'a', 'b', 'yyyyyyyyy' ,'2023-12-11'), + (5, 2, 3, 6, 7.5, 8.5, 9.5, 10.5, 'k', 'o', '2023-12-12', '2023-12-12', '2023-12-13', 'c', 'd', 'xxxxxxxxx', '2023-12-12'), + (5, 2, 3, 6, 7.6, 8.5, 9.5, 10.5, 'k', 'o', '2023-12-12', '2023-12-12', '2023-12-13', 'c', 'd', 'xxxxxxxxx', '2023-12-12'); + """ + + sql """ + insert into orders values + (1, 1, 'o', 9.5, '2023-12-08', 'a', 'b', 1, 'yy','2023-12-08'), + (1, 1, 'o', 10.5, '2023-12-09', 'a', 'b', 1, 'yy','2023-12-09'), + (1, 1, 'o', 10.5, '2023-12-07', 'a', 'b', 1, 'yy','2023-12-07'), + (1, 1, 'o', 10.5, '2023-12-08', 'a', 'b', 1, 'yy','2023-12-08'), + (2, 1, 'o', 11.5, '2023-12-09', 'a', 'b', 1, 'yy','2023-12-09'), + (2, 1, 'o', 11.5, '2023-12-08', 'a', 'b', 1, 'yy','2023-12-08'), + (2, 1, 'o', 11.5, '2023-12-11', 'a', 'b', 1, 'yy','2023-12-11'), + (3, 1, 'o', 12.5, '2023-12-10', 'a', 'b', 1, 'yy','2023-12-10'), + (3, 1, 'o', 12.5, '2023-12-09', 'a', 'b', 1, 'yy','2023-12-09'), + (3, 1, 'o', 12.5, '2023-12-12', 'a', 'b', 1, 'yy','2023-12-12'), + (3, 1, 'o', 33.5, '2023-12-13', 'a', 'b', 1, 'yy','2023-12-13'), + (4, 2, 'o', 43.2, '2023-12-10', 'c','d',2, 'mm' ,'2023-12-10'), + (4, 2, 'o', 43.2, '2023-12-11', 'c','d',2, 'mm' ,'2023-12-11'), + (4, 2, 'o', 43.2, '2023-12-13', 'c','d',2, 'mm' ,'2023-12-13'), + (5, 2, 'o', 56.2, '2023-12-12', 'c','d',2, 'mi' ,'2023-12-12'), + (5, 2, 'o', 56.2, '2023-12-14', 'c','d',2, 'mi' ,'2023-12-14'), + (5, 2, 'o', 56.2, '2023-12-16', 'c','d',2, 'mi' ,'2023-12-16'), + (5, 2, 'o', 1.2, '2023-12-12', 'c','d',2, 'mi' ,'2023-12-12'); + """ + + sql """ + insert into partsupp values + (2, 3, 9, 10.01, 'supply1'), + (2, 3, 10, 11.01, 'supply2'); + """ + + sql """analyze table partsupp with sync""" + sql """analyze table lineitem with sync""" + sql """analyze table orders with sync""" + + // =, !=, >, <, <=, >= + // left anti join other conjuncts in join condition + def mv1_0 = + """ + select l_orderkey + from + lineitem + left anti join + orders on l_orderkey = o_orderkey and l_shipdate <= o_orderdate + left anti join partsupp on ps_partkey = l_partkey and l_orderkey != ps_availqty; + """ + def query1_0 = + """ + select l_orderkey + from + lineitem + left anti join + orders on l_orderkey = o_orderkey and l_shipdate <= o_orderdate + left anti join partsupp on ps_partkey = l_partkey and l_orderkey != ps_availqty; + """ + order_qt_query1_0_before "${query1_0}" + async_mv_rewrite_success_without_check_chosen(db, mv1_0, query1_0, "mv1_0") + order_qt_query1_0_after "${query1_0}" + sql """ DROP MATERIALIZED VIEW IF EXISTS mv1_0""" + + + def mv1_4 = + """ + select l_orderkey + from + lineitem + left anti join + orders on l_shipdate <= o_orderdate and l_orderkey = o_orderkey + left anti join partsupp on l_orderkey != ps_availqty and ps_partkey = l_partkey; + """ + def query1_4 = + """ + select l_orderkey + from + lineitem + left anti join + orders on l_shipdate <= o_orderdate and l_orderkey = o_orderkey + left anti join partsupp on l_orderkey != ps_availqty and ps_partkey = l_partkey; + """ + order_qt_query1_4_before "${query1_4}" + // other conjuncts is before equal conjuncts, should success + async_mv_rewrite_success_without_check_chosen(db, mv1_4, query1_4, "mv1_4") + order_qt_query1_4_after "${query1_4}" + sql """ DROP MATERIALIZED VIEW IF EXISTS mv1_4""" + + + + def mv1_5 = + """ + select l_orderkey + from + lineitem + left anti join + orders on l_shipdate <= o_orderdate and l_orderkey = o_orderkey and lineitem.lo_orderdate <= orders.lo_orderdate + left anti join partsupp on l_orderkey != ps_availqty and ps_partkey = l_partkey; + """ + def query1_5 = + """ + select l_orderkey + from + lineitem + left anti join + orders on l_shipdate <= o_orderdate and l_orderkey = o_orderkey and lineitem.lo_orderdate <= orders.lo_orderdate + left anti join partsupp on l_orderkey != ps_availqty and ps_partkey = l_partkey; + """ + order_qt_query1_5_before "${query1_5}" + // other conjuncts has the same column name + async_mv_rewrite_success_without_check_chosen(db, mv1_5, query1_5, "mv1_5") + order_qt_query1_5_after "${query1_5}" + sql """ DROP MATERIALIZED VIEW IF EXISTS mv1_5""" + + + def mv1_1 = + """ + select l_orderkey + from + lineitem + left anti join + orders on l_orderkey = o_orderkey and l_shipdate <= o_orderdate + left anti join partsupp on ps_partkey = l_partkey and l_orderkey != ps_availqty; + """ + def query1_1 = + """ + select l_orderkey + from + lineitem + left anti join + orders on l_orderkey = o_orderkey and l_shipdate < o_orderdate + left anti join partsupp on ps_partkey = l_partkey and l_orderkey != ps_availqty; + """ + order_qt_query1_1_before "${query1_1}" + async_mv_rewrite_fail(db, mv1_1, query1_1, "mv1_1") + order_qt_query1_1_after "${query1_1}" + sql """ DROP MATERIALIZED VIEW IF EXISTS mv1_1""" + + def mv1_2 = + """ + select l_orderkey + from + lineitem + left anti join + orders on l_orderkey = o_orderkey and l_shipdate <= o_orderdate + left anti join partsupp on ps_partkey = l_partkey and l_orderkey != ps_availqty; + """ + def query1_2 = + """ + select l_orderkey + from + lineitem + left anti join + orders on l_orderkey = o_orderkey + left anti join partsupp on ps_partkey = l_partkey; + """ + order_qt_query1_2_before "${query1_2}" + // mv has other conjuncts but query not + async_mv_rewrite_fail(db, mv1_2, query1_2, "mv1_2") + order_qt_query1_2_after "${query1_2}" + sql """ DROP MATERIALIZED VIEW IF EXISTS mv1_2""" + + def mv1_3 = + """ + select l_orderkey + from + lineitem + left anti join + orders on l_orderkey = o_orderkey + left anti join partsupp on ps_partkey = l_partkey; + """ + def query1_3 = + """ + select l_orderkey + from + lineitem + left anti join + orders on l_orderkey = o_orderkey and l_shipdate < o_orderdate + left anti join partsupp on ps_partkey = l_partkey and l_orderkey != ps_availqty; + """ + order_qt_query1_3_before "${query1_3}" + // query has other conjuncts but mv not + async_mv_rewrite_fail(db, mv1_3, query1_3, "mv1_3") + order_qt_query1_3_after "${query1_3}" + sql """ DROP MATERIALIZED VIEW IF EXISTS mv1_3""" + + // right anti join other conjuncts in join condition + def mv2_0 = + """ + select l_orderkey + from + orders + right anti join lineitem on l_orderkey = o_orderkey and l_shipdate <= o_orderdate; + """ + def query2_0 = + """ + select l_orderkey + from + orders + right anti join lineitem on l_orderkey = o_orderkey and l_shipdate <= o_orderdate; + """ + order_qt_query2_0_before "${query2_0}" + async_mv_rewrite_success_without_check_chosen(db, mv2_0, query2_0, "mv2_0") + order_qt_query2_0_after "${query2_0}" + sql """ DROP MATERIALIZED VIEW IF EXISTS mv2_0""" + + + def mv2_1 = + """ + select l_orderkey + from + orders + right anti join lineitem on l_orderkey = o_orderkey and l_shipdate <= o_orderdate; + """ + def query2_1 = + """ + select l_orderkey + from + orders + right anti join lineitem on l_orderkey = o_orderkey and l_shipdate < o_orderdate; + """ + order_qt_query2_1_before "${query2_1}" + async_mv_rewrite_fail(db, mv2_1, query2_1, "mv2_1") + order_qt_query2_1_after "${query2_1}" + sql """ DROP MATERIALIZED VIEW IF EXISTS mv2_1""" + + def mv2_2 = + """ + select l_orderkey + from + orders + right anti join lineitem on l_orderkey = o_orderkey and l_shipdate <= o_orderdate; + """ + def query2_2 = + """ + select l_orderkey + from + orders + right anti join lineitem on l_orderkey = o_orderkey; + """ + order_qt_query2_2_before "${query2_2}" + // mv has other conjuncts but query not + async_mv_rewrite_fail(db, mv2_2, query2_2, "mv2_2") + order_qt_query2_2_after "${query2_2}" + sql """ DROP MATERIALIZED VIEW IF EXISTS mv2_2""" + + + def mv2_3 = + """ + select l_orderkey + from + orders + right anti join lineitem on l_orderkey = o_orderkey; + """ + def query2_3 = + """ + select l_orderkey + from + orders + right anti join lineitem on l_orderkey = o_orderkey and l_shipdate < o_orderdate; + """ + order_qt_query2_3_before "${query2_3}" + // query has other conjuncts but mv not + async_mv_rewrite_fail(db, mv2_3, query2_3, "mv2_3") + order_qt_query2_3_after "${query2_3}" + sql """ DROP MATERIALIZED VIEW IF EXISTS mv2_3""" + + + def mv2_4 = + """ + select L_orderkeY + from + orders + right anti join lineitem on l_orderkey = o_orderkey and l_shipdatE <= o_orderdatE; + """ + def query2_4 = + """ + select l_orderkey + from + orders + right anti join lineitem on l_orderkey = o_orderkey and l_shipdate <= o_orderdate; + """ + order_qt_query2_4_before "${query2_4}" + // Case sensitivity of column names in query and mv, should success + async_mv_rewrite_success_without_check_chosen(db, mv2_4, query2_4, "mv2_4") + order_qt_query2_4_after "${query2_4}" + sql """ DROP MATERIALIZED VIEW IF EXISTS mv2_4""" + + + def mv2_5 = + """ + select L_orderkeY + from + orders + right anti join lineitem on l_orderkey = o_orderkey and date_trunc(l_shipdatE, 'day') <= o_orderdatE; + """ + def query2_5 = + """ + select l_orderkey + from + orders + right anti join lineitem on l_orderkey = o_orderkey and date_trunc(l_shipdate, 'day') <= o_orderdate; + """ + order_qt_query2_5_before "${query2_5}" + // Complex expressions + async_mv_rewrite_success_without_check_chosen(db, mv2_5, query2_5, "mv2_5") + order_qt_query2_5_after "${query2_5}" + sql """ DROP MATERIALIZED VIEW IF EXISTS mv2_5""" + + + // left self join + def mv3_0 = + """ + select l1.l_orderkey + from + lineitem l1 + left anti join + lineitem l2 on l1.l_orderkey = l2.l_orderkey and l1.l_shipdate <= l2.l_receiptdate and l1.l_extendedprice != l2.l_discount + """ + def query3_0 = + """ + select l1.l_orderkey + from + lineitem l1 + left anti join + lineitem l2 on l1.l_orderkey = l2.l_orderkey and l1.l_shipdate <= l2.l_receiptdate and l1.l_extendedprice != l2.l_discount; + """ + order_qt_query3_0_before "${query3_0}" + async_mv_rewrite_success(db, mv3_0, query3_0, "mv3_0") + order_qt_query3_0_after "${query3_0}" + sql """ DROP MATERIALIZED VIEW IF EXISTS mv3_0""" + + // right self join + def mv4_0 = + """ + select l2.l_orderkey + from + lineitem l1 + right anti join + lineitem l2 on l1.l_orderkey = l2.l_orderkey and l1.l_shipdate <= l2.l_receiptdate and l1.l_extendedprice != l2.l_discount + """ + def query4_0 = + """ + select l2.l_orderkey + from + lineitem l1 + right anti join + lineitem l2 on l1.l_orderkey = l2.l_orderkey and l1.l_shipdate <= l2.l_receiptdate and l1.l_extendedprice != l2.l_discount; + """ + order_qt_query4_0_before "${query4_0}" + async_mv_rewrite_success(db, mv4_0, query4_0, "mv4_0") + order_qt_query4_0_after "${query4_0}" + sql """ DROP MATERIALIZED VIEW IF EXISTS mv4_0""" + +} diff --git a/regression-test/suites/nereids_rules_p0/mv/other_join_conjuncts/inner/other_join_conjuncts_inner.groovy b/regression-test/suites/nereids_rules_p0/mv/other_join_conjuncts/inner/other_join_conjuncts_inner.groovy new file mode 100644 index 00000000000000..b79e5808932044 --- /dev/null +++ b/regression-test/suites/nereids_rules_p0/mv/other_join_conjuncts/inner/other_join_conjuncts_inner.groovy @@ -0,0 +1,873 @@ +// Licensed to the Apache Software Foundation (ASF) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The ASF licenses this file +// to you under the Apache License, Version 2.0 (the +// "License"); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. + +suite("other_join_conjuncts_inner") { + String db = context.config.getDbNameByFile(context.file) + sql "use ${db}" + sql "set runtime_filter_mode=OFF"; + sql "SET ignore_shape_nodes='PhysicalDistribute,PhysicalProject'" + + sql """ + drop table if exists orders + """ + + sql """ + CREATE TABLE IF NOT EXISTS orders ( + o_orderkey INTEGER NOT NULL, + o_custkey INTEGER NOT NULL, + o_orderstatus CHAR(1) NOT NULL, + o_totalprice DECIMALV3(15,2) NOT NULL, + o_orderdate DATE NOT NULL, + o_orderpriority CHAR(15) NOT NULL, + o_clerk CHAR(15) NOT NULL, + o_shippriority INTEGER NOT NULL, + O_COMMENT VARCHAR(79) NOT NULL, + lo_orderdate DATE NOT NULL + ) + DUPLICATE KEY(o_orderkey, o_custkey) + DISTRIBUTED BY HASH(o_orderkey) BUCKETS 3 + PROPERTIES ( + "replication_num" = "1" + ); + """ + + sql """ + drop table if exists lineitem + """ + + sql""" + CREATE TABLE IF NOT EXISTS lineitem ( + l_orderkey INTEGER NOT NULL, + l_partkey INTEGER NOT NULL, + l_suppkey INTEGER NOT NULL, + l_linenumber INTEGER NOT NULL, + l_quantity DECIMALV3(15,2) NOT NULL, + l_extendedprice DECIMALV3(15,2) NOT NULL, + l_discount DECIMALV3(15,2) NOT NULL, + l_tax DECIMALV3(15,2) NOT NULL, + l_returnflag CHAR(1) NOT NULL, + l_linestatus CHAR(1) NOT NULL, + l_shipdate DATE NOT NULL, + l_commitdate DATE NOT NULL, + l_receiptdate DATE NOT NULL, + l_shipinstruct CHAR(25) NOT NULL, + l_shipmode CHAR(10) NOT NULL, + l_comment VARCHAR(44) NOT NULL, + lo_orderdate DATE NOT NULL + ) + DUPLICATE KEY(l_orderkey, l_partkey, l_suppkey, l_linenumber) + DISTRIBUTED BY HASH(l_orderkey) BUCKETS 3 + PROPERTIES ( + "replication_num" = "1" + ) + """ + + sql """ + drop table if exists partsupp + """ + + sql """ + CREATE TABLE IF NOT EXISTS partsupp ( + ps_partkey INTEGER NOT NULL, + ps_suppkey INTEGER NOT NULL, + ps_availqty INTEGER NOT NULL, + ps_supplycost DECIMALV3(15,2) NOT NULL, + ps_comment VARCHAR(199) NOT NULL + ) + DUPLICATE KEY(ps_partkey, ps_suppkey) + DISTRIBUTED BY HASH(ps_partkey) BUCKETS 3 + PROPERTIES ( + "replication_num" = "1" + ) + """ + + sql """ insert into lineitem values + (1, 2, 3, 4, 5.5, 6.5, 7.5, 8.5, 'o', 'k', '2023-12-08', '2023-12-09', '2023-12-10', 'a', 'b', 'yyyyyyyyy' ,'2023-12-08'), + (1, 2, 3, 4, 5.5, 6.5, 7.6, 8.5, 'o', 'k', '2023-12-08', '2023-12-09', '2023-12-10', 'a', 'b', 'yyyyyyyyy' ,'2023-12-08'), + (2, 4, 3, 4, 5.5, 6.5, 7.5, 8.5, 'o', 'k', '2023-12-09', '2023-12-09', '2023-12-10', 'a', 'b', 'yyyyyyyyy' ,'2023-12-09'), + (2, 4, 3, 4, 5.5, 6.5, 7.6, 8.5, 'o', 'k', '2023-12-09', '2023-12-09', '2023-12-10', 'a', 'b', 'yyyyyyyyy' ,'2023-12-09'), + (3, 2, 4, 4, 5.5, 6.5, 7.5, 8.5, 'o', 'k', '2023-12-10', '2023-12-09', '2023-12-10', 'a', 'b', 'yyyyyyyyy' ,'2023-12-10'), + (3, 2, 4, 4, 5.5, 6.6, 7.5, 8.5, 'o', 'k', '2023-12-10', '2023-12-09', '2023-12-10', 'a', 'b', 'yyyyyyyyy' ,'2023-12-10'), + (4, 3, 3, 4, 5.5, 6.5, 7.5, 8.5, 'o', 'k', '2023-12-11', '2023-12-09', '2023-12-10', 'a', 'b', 'yyyyyyyyy' ,'2023-12-11'), + (4, 3, 3, 4, 5.5, 6.6, 7.5, 8.5, 'o', 'k', '2023-12-11', '2023-12-09', '2023-12-10', 'a', 'b', 'yyyyyyyyy' ,'2023-12-11'), + (5, 2, 3, 6, 7.5, 8.5, 9.5, 10.5, 'k', 'o', '2023-12-12', '2023-12-12', '2023-12-13', 'c', 'd', 'xxxxxxxxx', '2023-12-12'), + (5, 2, 3, 6, 7.6, 8.5, 9.5, 10.5, 'k', 'o', '2023-12-12', '2023-12-12', '2023-12-13', 'c', 'd', 'xxxxxxxxx', '2023-12-12'); + """ + + sql """ + insert into orders values + (1, 1, 'o', 9.5, '2023-12-08', 'a', 'b', 1, 'yy','2023-12-08'), + (1, 1, 'o', 10.5, '2023-12-09', 'a', 'b', 1, 'yy','2023-12-09'), + (1, 1, 'o', 10.5, '2023-12-07', 'a', 'b', 1, 'yy','2023-12-07'), + (1, 1, 'o', 10.5, '2023-12-08', 'a', 'b', 1, 'yy','2023-12-08'), + (2, 1, 'o', 11.5, '2023-12-09', 'a', 'b', 1, 'yy','2023-12-09'), + (2, 1, 'o', 11.5, '2023-12-08', 'a', 'b', 1, 'yy','2023-12-08'), + (2, 1, 'o', 11.5, '2023-12-11', 'a', 'b', 1, 'yy','2023-12-11'), + (3, 1, 'o', 12.5, '2023-12-10', 'a', 'b', 1, 'yy','2023-12-10'), + (3, 1, 'o', 12.5, '2023-12-09', 'a', 'b', 1, 'yy','2023-12-09'), + (3, 1, 'o', 12.5, '2023-12-12', 'a', 'b', 1, 'yy','2023-12-12'), + (3, 1, 'o', 33.5, '2023-12-13', 'a', 'b', 1, 'yy','2023-12-13'), + (4, 2, 'o', 43.2, '2023-12-10', 'c','d',2, 'mm' ,'2023-12-10'), + (4, 2, 'o', 43.2, '2023-12-11', 'c','d',2, 'mm' ,'2023-12-11'), + (4, 2, 'o', 43.2, '2023-12-13', 'c','d',2, 'mm' ,'2023-12-13'), + (5, 2, 'o', 56.2, '2023-12-12', 'c','d',2, 'mi' ,'2023-12-12'), + (5, 2, 'o', 56.2, '2023-12-14', 'c','d',2, 'mi' ,'2023-12-14'), + (5, 2, 'o', 56.2, '2023-12-16', 'c','d',2, 'mi' ,'2023-12-16'), + (5, 2, 'o', 1.2, '2023-12-12', 'c','d',2, 'mi' ,'2023-12-12'); + """ + + sql """ + insert into partsupp values + (2, 3, 9, 10.01, 'supply1'), + (2, 3, 10, 11.01, 'supply2'); + """ + + sql """analyze table partsupp with sync""" + sql """analyze table lineitem with sync""" + sql """analyze table orders with sync""" + + // =, !=, >, <, <=, >= + // other conjuncts in join condition + def mv1_0 = + """ + select l_orderkey, o_orderdate + from + lineitem + inner join + orders on l_orderkey = o_orderkey and l_shipdate <= o_orderdate + inner join partsupp on ps_partkey = l_partkey and l_orderkey + o_orderkey != ps_availqty; + """ + def query1_0 = + """ + select l_orderkey, o_orderdate + from + lineitem + inner join + orders on l_orderkey = o_orderkey and l_shipdate <= o_orderdate + inner join partsupp on ps_partkey = l_partkey and l_orderkey + o_orderkey != ps_availqty; + """ + order_qt_query1_0_before "${query1_0}" + async_mv_rewrite_success(db, mv1_0, query1_0, "mv1_0") + order_qt_query1_0_after "${query1_0}" + sql """ DROP MATERIALIZED VIEW IF EXISTS mv1_0""" + + def mv1_6 = + """ + select l_orderkey, o_orderdate + from + lineitem + inner join + orders on l_shipdate <= o_orderdate and l_orderkey = o_orderkey + inner join partsupp on l_orderkey + o_orderkey != ps_availqty and ps_partkey = l_partkey; + """ + def query1_6 = + """ + select l_orderkey, o_orderdate + from + lineitem + inner join + orders on l_shipdate <= o_orderdate and l_orderkey = o_orderkey + inner join partsupp on l_orderkey + o_orderkey != ps_availqty and ps_partkey = l_partkey; + """ + order_qt_query1_6_before "${query1_6}" + // other conjuncts is before equal conjuncts, should success + async_mv_rewrite_success(db, mv1_6, query1_6, "mv1_6") + order_qt_query1_6_after "${query1_6}" + sql """ DROP MATERIALIZED VIEW IF EXISTS mv1_6""" + + + def mv1_7 = + """ + select l_orderkey, o_orderdate + from + lineitem + inner join + orders on l_shipdate <= o_orderdate and l_orderkey = o_orderkey and lineitem.lo_orderdate <= orders.lo_orderdate + inner join partsupp on l_orderkey + o_orderkey != ps_availqty and ps_partkey = l_partkey; + """ + def query1_7 = + """ + select l_orderkey, o_orderdate + from + lineitem + inner join + orders on l_shipdate <= o_orderdate and l_orderkey = o_orderkey and lineitem.lo_orderdate <= orders.lo_orderdate + inner join partsupp on l_orderkey + o_orderkey != ps_availqty and ps_partkey = l_partkey; + """ + order_qt_query1_7_before "${query1_7}" + // other conjuncts has the same column name + async_mv_rewrite_success(db, mv1_7, query1_7, "mv1_7") + order_qt_query1_7_after "${query1_7}" + sql """ DROP MATERIALIZED VIEW IF EXISTS mv1_7""" + + def mv1_1 = + """ + select l_orderkey, o_orderdate + from + lineitem + inner join + orders on l_orderkey = o_orderkey and l_shipdate <= o_orderdate + inner join partsupp on ps_partkey = l_partkey and l_orderkey + o_orderkey != ps_availqty; + """ + def query1_1 = + """ + select l_orderkey, o_orderdate + from + lineitem + inner join + orders on l_orderkey = o_orderkey and l_shipdate < o_orderdate + inner join partsupp on ps_partkey = l_partkey and l_orderkey + o_orderkey != ps_availqty; + """ + order_qt_query1_1_before "${query1_1}" + // query other conjucts is different from mv + async_mv_rewrite_fail(db, mv1_1, query1_1, "mv1_1") + order_qt_query1_1_after "${query1_1}" + sql """ DROP MATERIALIZED VIEW IF EXISTS mv1_1""" + + + def mv1_2 = + """ + select l_orderkey, l_shipdate, o_orderdate + from + lineitem + inner join + orders on l_orderkey = o_orderkey and l_shipdate <= o_orderdate + inner join partsupp on ps_partkey = l_partkey and l_orderkey + o_orderkey != ps_availqty; + """ + def query1_2 = + """ + select l_orderkey, l_shipdate, o_orderdate + from + lineitem + inner join + orders on l_orderkey = o_orderkey and l_shipdate < o_orderdate + inner join partsupp on ps_partkey = l_partkey and l_orderkey + o_orderkey != ps_availqty; + """ + order_qt_query1_2_before "${query1_2}" + // though select has the compensate filter column, should fail + async_mv_rewrite_fail(db, mv1_2, query1_2, "mv1_2") + order_qt_query1_2_after "${query1_2}" + sql """ DROP MATERIALIZED VIEW IF EXISTS mv1_2""" + + // self join + def mv1_3 = + """ + select l1.l_orderkey, l2.l_shipdate + from + lineitem l1 + inner join + lineitem l2 on l1.l_orderkey = l2.l_orderkey and l1.l_shipdate <= l2.l_receiptdate and l1.l_extendedprice != l2.l_discount; + """ + def query1_3 = + """ + select l1.l_orderkey, l2.l_shipdate + from + lineitem l1 + inner join + lineitem l2 on l1.l_orderkey = l2.l_orderkey and l1.l_shipdate <= l2.l_receiptdate and l1.l_extendedprice != l2.l_discount; + """ + order_qt_query1_3_before "${query1_3}" + async_mv_rewrite_success(db, mv1_3, query1_3, "mv1_3") + order_qt_query1_3_after "${query1_3}" + sql """ DROP MATERIALIZED VIEW IF EXISTS mv1_3""" + + + def mv1_4 = + """ + select l_orderkey, l_shipdate, o_orderdate + from + lineitem + inner join + orders on l_orderkey = o_orderkey and l_shipdate <= o_orderdate + inner join partsupp on ps_partkey = l_partkey and l_orderkey + o_orderkey != ps_availqty; + """ + def query1_4 = + """ + select l_orderkey, l_shipdate, o_orderdate + from + lineitem + inner join + orders on l_orderkey = o_orderkey + inner join partsupp on ps_partkey; + """ + order_qt_query1_4_before "${query1_4}" + // mv has the other conjuncts but query not + async_mv_rewrite_fail(db, mv1_4, query1_4, "mv1_4") + order_qt_query1_4_after "${query1_4}" + sql """ DROP MATERIALIZED VIEW IF EXISTS mv1_4""" + + + def mv1_5 = + """ + select l_orderkey, l_shipdate, o_orderdate + from + lineitem + inner join + orders on l_orderkey = o_orderkey + inner join partsupp on ps_partkey = l_partkey; + """ + def query1_5 = + """ + select l_orderkey, l_shipdate, o_orderdate + from + lineitem + inner join + orders on l_orderkey = o_orderkey and l_shipdate < o_orderdate + inner join partsupp on ps_partkey = l_partkey and l_orderkey + o_orderkey != ps_availqty; + """ + order_qt_query1_5_before "${query1_5}" + // query has other the conjuncts but mv not + async_mv_rewrite_fail(db, mv1_5, query1_5, "mv1_5") + order_qt_query1_5_after "${query1_5}" + sql """ DROP MATERIALIZED VIEW IF EXISTS mv1_5""" + + + // other conjuncts above join + def mv2_0 = + """ + select + o_orderdate, + o_shippriority, + o_comment, + l_orderkey, + ps_partkey + from + orders + inner join lineitem on l_orderkey = o_orderkey + inner join partsupp on ps_partkey = l_partkey + where l_orderkey + o_orderkey != ps_availqty and l_shipdate <= o_orderdate; + """ + def query2_0 = + """ + select + o_orderdate, + o_shippriority, + o_comment, + l_orderkey, + ps_partkey + from + orders + inner join lineitem on l_orderkey = o_orderkey + inner join partsupp on ps_partkey = l_partkey + where l_orderkey + o_orderkey != ps_availqty and l_shipdate <= o_orderdate; + """ + order_qt_query2_0_before "${query2_0}" + async_mv_rewrite_success(db, mv2_0, query2_0, "mv2_0") + order_qt_query2_0_after "${query2_0}" + sql """ DROP MATERIALIZED VIEW IF EXISTS mv2_0""" + + + def mv2_1 = + """ + select + o_orderdate, + o_shippriority, + o_comment, + l_orderkey, + ps_partkey + from + orders + inner join lineitem on l_orderkey = o_orderkey + inner join partsupp on ps_partkey = l_partkey + where l_orderkey + o_orderkey != ps_availqty and l_shipdate <= o_orderdate; + """ + def query2_1 = + """ + select + o_orderdate, + o_shippriority, + o_comment, + l_orderkey, + ps_partkey + from + orders + inner join lineitem on l_orderkey = o_orderkey + inner join partsupp on ps_partkey = l_partkey + where l_orderkey + o_orderkey != ps_availqty and l_shipdate < o_orderdate; + """ + order_qt_query2_1_before "${query2_1}" + // query other conjucts is different from mv + async_mv_rewrite_fail(db, mv2_1, query2_1, "mv2_1") + order_qt_query2_1_after "${query2_1}" + sql """ DROP MATERIALIZED VIEW IF EXISTS mv2_1""" + + + def mv2_2 = + """ + select + o_orderdate, + l_shipdate, + o_comment, + l_orderkey, + ps_partkey + from + orders + inner join lineitem on l_orderkey = o_orderkey + inner join partsupp on ps_partkey = l_partkey + where l_orderkey + o_orderkey != ps_availqty and l_shipdate <= o_orderdate; + """ + def query2_2 = + """ + select + o_orderdate, + l_shipdate, + o_comment, + l_orderkey, + ps_partkey + from + orders + inner join lineitem on l_orderkey = o_orderkey + inner join partsupp on ps_partkey = l_partkey + where l_orderkey + o_orderkey != ps_availqty and l_shipdate < o_orderdate; + """ + order_qt_query2_2_before "${query2_2}" + // though select has the compensate filter column, should fail + async_mv_rewrite_fail(db, mv2_2, query2_2, "mv2_2") + order_qt_query2_2_after "${query2_2}" + sql """ DROP MATERIALIZED VIEW IF EXISTS mv2_2""" + + + // self join + def mv2_3 = + """ + select l1.l_orderkey, l2.l_shipdate + from + lineitem l1 + inner join + lineitem l2 on l1.l_orderkey = l2.l_orderkey + where l1.l_shipdate <= l2.l_receiptdate and l1.l_extendedprice != l2.l_discount; + """ + def query2_3 = + """ + select l1.l_orderkey, l2.l_shipdate + from + lineitem l1 + inner join + lineitem l2 on l1.l_orderkey = l2.l_orderkey + where l1.l_shipdate <= l2.l_receiptdate and l1.l_extendedprice != l2.l_discount; + """ + order_qt_query2_3_before "${query2_3}" + async_mv_rewrite_success(db, mv2_3, query2_3, "mv2_3") + order_qt_query2_3_after "${query2_3}" + sql """ DROP MATERIALIZED VIEW IF EXISTS mv2_3""" + + + def mv2_4 = + """ + select + o_orderdate, + l_shipdate, + o_comment, + l_orderkey, + ps_partkey + from + orders + inner join lineitem on l_orderkey = o_orderkey + inner join partsupp on ps_partkey = l_partkey + where l_orderkey + o_orderkey != ps_availqty and l_shipdate <= o_orderdate; + """ + def query2_4 = + """ + select + o_orderdate, + l_shipdate, + o_comment, + l_orderkey, + ps_partkey + from + orders + inner join lineitem on l_orderkey = o_orderkey + inner join partsupp on ps_partkey = l_partkey; + """ + order_qt_query2_4_before "${query2_4}" + // mv has other conjuncts but query not + async_mv_rewrite_fail(db, mv2_4, query2_4, "mv2_4") + order_qt_query2_4_after "${query2_4}" + sql """ DROP MATERIALIZED VIEW IF EXISTS mv2_4""" + + + def mv2_5 = + """ + select + o_orderdate, + l_shipdate, + o_comment, + l_orderkey, + ps_partkey + from + orders + inner join lineitem on l_orderkey = o_orderkey + inner join partsupp on ps_partkey = l_partkey; + """ + def query2_5 = + """ + select + o_orderdate, + l_shipdate, + o_comment, + l_orderkey, + ps_partkey + from + orders + inner join lineitem on l_orderkey = o_orderkey + inner join partsupp on ps_partkey = l_partkey + where l_orderkey + o_orderkey != ps_availqty and l_shipdate <= o_orderdate; + """ + order_qt_query2_5_before "${query2_5}" + // query has other conjuncts but mv not + async_mv_rewrite_fail(db, mv2_5, query2_5, "mv2_5") + order_qt_query2_5_after "${query2_5}" + sql """ DROP MATERIALIZED VIEW IF EXISTS mv2_5""" + + + def mv2_6 = + """ + select + o_ordeRdatE, + o_shippriority, + o_commenT, + l_orderkey, + ps_partkey + from + orders + inner join lineitem on l_orderkey = o_orderkey + inner join partsupp on ps_partkey = l_partkey + where l_orderkey + o_orderkey != ps_availqty and l_shipdatE <= o_orderdatE; + """ + def query2_6 = + """ + select + o_orderdate, + o_shippriority, + o_comment, + l_orderkey, + ps_partkey + from + orders + inner join lineitem on l_orderkey = o_orderkey + inner join partsupp on ps_partkey = l_partkey + where l_orderkey + o_orderkey != ps_availqty and l_shipdate <= o_orderdate; + """ + order_qt_query2_6_before "${query2_6}" + // Case sensitivity of column names in query and mv, should success + async_mv_rewrite_success(db, mv2_6, query2_6, "mv2_6") + order_qt_query2_6_after "${query2_6}" + sql """ DROP MATERIALIZED VIEW IF EXISTS mv2_6""" + + + // other conjuncts both above join and in join other conjuncts + def mv3_0 = + """ + select + o_orderdate, + o_shippriority, + o_comment, + l_orderkey, + ps_partkey + from + orders + inner join lineitem on l_orderkey = o_orderkey and l_shipdate <= o_orderdate + inner join partsupp on ps_partkey = l_partkey + where l_orderkey + o_orderkey != ps_availqty; + """ + def query3_0 = + """ + select + o_orderdate, + o_shippriority, + o_comment, + l_orderkey, + ps_partkey + from + orders + inner join lineitem on l_orderkey = o_orderkey and l_shipdate <= o_orderdate + inner join partsupp on ps_partkey = l_partkey + where l_orderkey + o_orderkey != ps_availqty; + """ + order_qt_query3_0_before "${query3_0}" + async_mv_rewrite_success(db, mv3_0, query3_0, "mv3_0") + order_qt_query3_0_after "${query3_0}" + sql """ DROP MATERIALIZED VIEW IF EXISTS mv3_0""" + + + def mv3_6 = + """ + select + o_orderdate, + o_shippriority, + o_comment, + l_orderkey, + ps_partkey + from + orders + left outer join lineitem on l_orderkey = o_orderkey and l_shipdate <= o_orderdate + inner join partsupp on ps_partkey = l_partkey + where l_orderkey + o_orderkey != ps_availqty; + """ + def query3_6 = + """ + select + o_orderdate, + o_shippriority, + o_comment, + l_orderkey, + ps_partkey + from + orders + left outer join lineitem on l_orderkey = o_orderkey and l_shipdate <= o_orderdate + inner join partsupp on ps_partkey = l_partkey + where l_orderkey + o_orderkey != ps_availqty; + """ + order_qt_query3_6_before "${query3_6}" + // Combinations of different join types + async_mv_rewrite_success(db, mv3_6, query3_6, "mv3_6") + order_qt_query3_6_after "${query3_6}" + sql """ DROP MATERIALIZED VIEW IF EXISTS mv3_6""" + + + + def mv3_7 = + """ + select + o_orderdate, + o_shippriority, + o_comment, + l_orderkey, + ps_partkey + from + orders + inner join lineitem on l_orderkey = o_orderkey and l_shipdate <= o_orderdate + left outer join partsupp on ps_partkey = l_partkey + where l_orderkey + o_orderkey != ps_availqty; + """ + def query3_7 = + """ + select + o_orderdate, + o_shippriority, + o_comment, + l_orderkey, + ps_partkey + from + orders + inner join lineitem on l_orderkey = o_orderkey and l_shipdate <= o_orderdate + left outer join partsupp on ps_partkey = l_partkey + where l_orderkey + o_orderkey != ps_availqty; + """ + order_qt_query3_7_before "${query3_7}" + // Combinations of different join types + async_mv_rewrite_success(db, mv3_7, query3_7, "mv3_7") + order_qt_query3_7_after "${query3_7}" + sql """ DROP MATERIALIZED VIEW IF EXISTS mv3_7""" + + + def mv3_8 = + """ + select + o_orderdate, + o_shippriority, + o_comment, + l_orderkey, + ps_partkey + from + orders + inner join lineitem on l_orderkey = o_orderkey and date_trunc(l_shipdate, 'day') <= o_orderdate + left outer join partsupp on ps_partkey = l_partkey + where l_orderkey + o_orderkey != ps_availqty; + """ + def query3_8 = + """ + select + o_orderdate, + o_shippriority, + o_comment, + l_orderkey, + ps_partkey + from + orders + inner join lineitem on l_orderkey = o_orderkey and date_trunc(l_shipdate, 'day') <= o_orderdate + left outer join partsupp on ps_partkey = l_partkey + where l_orderkey + o_orderkey != ps_availqty; + """ + order_qt_query3_8_before "${query3_8}" + // Complex expressions + async_mv_rewrite_success(db, mv3_8, query3_8, "mv3_8") + order_qt_query3_8_after "${query3_8}" + sql """ DROP MATERIALIZED VIEW IF EXISTS mv3_8""" + + def mv3_1 = + """ + select + o_orderdate, + o_shippriority, + o_comment, + l_orderkey, + ps_partkey + from + orders + inner join lineitem on l_orderkey = o_orderkey and l_shipdate <= o_orderdate + inner join partsupp on ps_partkey = l_partkey + where l_orderkey + o_orderkey != ps_availqty; + """ + def query3_1 = + """ + select + o_orderdate, + o_shippriority, + o_comment, + l_orderkey, + ps_partkey + from + orders + inner join lineitem on l_orderkey = o_orderkey and l_shipdate < o_orderdate + inner join partsupp on ps_partkey = l_partkey + where l_orderkey + o_orderkey != ps_availqty; + """ + order_qt_query3_1_before "${query3_1}" + // query other conjucts is different from mv + async_mv_rewrite_fail(db, mv3_1, query3_1, "mv3_1") + order_qt_query3_1_after "${query3_1}" + sql """ DROP MATERIALIZED VIEW IF EXISTS mv3_1""" + + + def mv3_2 = + """ + select + o_orderdate, + l_shipdate, + o_comment, + l_orderkey, + ps_partkey + from + orders + inner join lineitem on l_orderkey = o_orderkey and l_shipdate <= o_orderdate + inner join partsupp on ps_partkey = l_partkey + where l_orderkey + o_orderkey != ps_availqty; + """ + def query3_2 = + """ + select + o_orderdate, + l_shipdate, + o_comment, + l_orderkey, + ps_partkey + from + orders + inner join lineitem on l_orderkey = o_orderkey and l_shipdate < o_orderdate + inner join partsupp on ps_partkey = l_partkey + where l_orderkey + o_orderkey != ps_availqty; + """ + order_qt_query3_2_before "${query3_2}" + // though select has the compensate filter column, should fail + async_mv_rewrite_fail(db, mv3_2, query3_2, "mv3_2") + order_qt_query3_2_after "${query3_2}" + sql """ DROP MATERIALIZED VIEW IF EXISTS mv3_2""" + + + // self join + def mv3_3 = + """ + select l1.l_orderkey, l2.l_shipdate + from + lineitem l1 + inner join + lineitem l2 on l1.l_orderkey = l2.l_orderkey and l1.l_shipdate <= l2.l_receiptdate + where l1.l_extendedprice != l2.l_discount; + """ + def query3_3 = + """ + select l1.l_orderkey, l2.l_shipdate + from + lineitem l1 + inner join + lineitem l2 on l1.l_orderkey = l2.l_orderkey and l1.l_shipdate <= l2.l_receiptdate + where l1.l_extendedprice != l2.l_discount; + """ + order_qt_query3_3_before "${query3_3}" + async_mv_rewrite_success(db, mv3_3, query3_3, "mv3_3") + order_qt_query3_3_after "${query3_3}" + sql """ DROP MATERIALIZED VIEW IF EXISTS mv3_3""" + + + def mv3_4 = + """ + select + o_orderdate, + l_shipdate, + o_comment, + l_orderkey, + ps_partkey + from + orders + inner join lineitem on l_orderkey = o_orderkey and l_shipdate <= o_orderdate + inner join partsupp on ps_partkey = l_partkey + where l_orderkey + o_orderkey != ps_availqty; + """ + def query3_4 = + """ + select + o_orderdate, + l_shipdate, + o_comment, + l_orderkey, + ps_partkey + from + orders + inner join lineitem on l_orderkey = o_orderkey + inner join partsupp on ps_partkey = l_partkey; + """ + order_qt_query3_4_before "${query3_4}" + // query has other conjuncts but mv not + async_mv_rewrite_fail(db, mv3_4, query3_4, "mv3_4") + order_qt_query3_4_after "${query3_4}" + sql """ DROP MATERIALIZED VIEW IF EXISTS mv3_4""" + + + def mv3_5 = + """ + select + o_orderdate, + l_shipdate, + o_comment, + l_orderkey, + ps_partkey + from + orders + inner join lineitem on l_orderkey = o_orderkey and l_shipdate <= o_orderdate + inner join partsupp on ps_partkey = l_partkey + where l_orderkey + o_orderkey != ps_availqty; + """ + def query3_5 = + """ + select + o_orderdate, + l_shipdate, + o_comment, + l_orderkey, + ps_partkey + from + orders + inner join lineitem on l_orderkey = o_orderkey + inner join partsupp on ps_partkey = l_partkey; + """ + order_qt_query3_5_before "${query3_5}" + // mv has other conjuncts but query not + async_mv_rewrite_fail(db, mv3_5, query3_5, "mv3_5") + order_qt_query3_5_after "${query3_5}" + sql """ DROP MATERIALIZED VIEW IF EXISTS mv3_5""" +} diff --git a/regression-test/suites/nereids_rules_p0/mv/other_join_conjuncts/outer/other_join_conjuncts_outer.groovy b/regression-test/suites/nereids_rules_p0/mv/other_join_conjuncts/outer/other_join_conjuncts_outer.groovy new file mode 100644 index 00000000000000..8a434364c89168 --- /dev/null +++ b/regression-test/suites/nereids_rules_p0/mv/other_join_conjuncts/outer/other_join_conjuncts_outer.groovy @@ -0,0 +1,1503 @@ +// Licensed to the Apache Software Foundation (ASF) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The ASF licenses this file +// to you under the Apache License, Version 2.0 (the +// "License"); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. + +suite("other_join_conjuncts_outer") { + String db = context.config.getDbNameByFile(context.file) + sql "use ${db}" + sql "set runtime_filter_mode=OFF"; + sql "SET ignore_shape_nodes='PhysicalDistribute,PhysicalProject'" + + sql """ + drop table if exists orders + """ + + sql """ + CREATE TABLE IF NOT EXISTS orders ( + o_orderkey INTEGER NOT NULL, + o_custkey INTEGER NOT NULL, + o_orderstatus CHAR(1) NOT NULL, + o_totalprice DECIMALV3(15,2) NOT NULL, + o_orderdate DATE NOT NULL, + o_orderpriority CHAR(15) NOT NULL, + o_clerk CHAR(15) NOT NULL, + o_shippriority INTEGER NOT NULL, + O_COMMENT VARCHAR(79) NOT NULL, + lo_orderdate DATE NOT NULL + ) + DUPLICATE KEY(o_orderkey, o_custkey) + DISTRIBUTED BY HASH(o_orderkey) BUCKETS 3 + PROPERTIES ( + "replication_num" = "1" + ); + """ + + sql """ + drop table if exists lineitem + """ + + sql""" + CREATE TABLE IF NOT EXISTS lineitem ( + l_orderkey INTEGER NOT NULL, + l_partkey INTEGER NOT NULL, + l_suppkey INTEGER NOT NULL, + l_linenumber INTEGER NOT NULL, + l_quantity DECIMALV3(15,2) NOT NULL, + l_extendedprice DECIMALV3(15,2) NOT NULL, + l_discount DECIMALV3(15,2) NOT NULL, + l_tax DECIMALV3(15,2) NOT NULL, + l_returnflag CHAR(1) NOT NULL, + l_linestatus CHAR(1) NOT NULL, + l_shipdate DATE NOT NULL, + l_commitdate DATE NOT NULL, + l_receiptdate DATE NOT NULL, + l_shipinstruct CHAR(25) NOT NULL, + l_shipmode CHAR(10) NOT NULL, + l_comment VARCHAR(44) NOT NULL, + lo_orderdate DATE NOT NULL + ) + DUPLICATE KEY(l_orderkey, l_partkey, l_suppkey, l_linenumber) + DISTRIBUTED BY HASH(l_orderkey) BUCKETS 3 + PROPERTIES ( + "replication_num" = "1" + ) + """ + + sql """ + drop table if exists partsupp + """ + + sql """ + CREATE TABLE IF NOT EXISTS partsupp ( + ps_partkey INTEGER NOT NULL, + ps_suppkey INTEGER NOT NULL, + ps_availqty INTEGER NOT NULL, + ps_supplycost DECIMALV3(15,2) NOT NULL, + ps_comment VARCHAR(199) NOT NULL + ) + DUPLICATE KEY(ps_partkey, ps_suppkey) + DISTRIBUTED BY HASH(ps_partkey) BUCKETS 3 + PROPERTIES ( + "replication_num" = "1" + ) + """ + + sql """ insert into lineitem values + (1, 2, 3, 4, 5.5, 6.5, 7.5, 8.5, 'o', 'k', '2023-12-08', '2023-12-09', '2023-12-10', 'a', 'b', 'yyyyyyyyy' ,'2023-12-08'), + (1, 2, 3, 4, 5.5, 6.5, 7.6, 8.5, 'o', 'k', '2023-12-08', '2023-12-09', '2023-12-10', 'a', 'b', 'yyyyyyyyy' ,'2023-12-08'), + (2, 4, 3, 4, 5.5, 6.5, 7.5, 8.5, 'o', 'k', '2023-12-09', '2023-12-09', '2023-12-10', 'a', 'b', 'yyyyyyyyy' ,'2023-12-09'), + (2, 4, 3, 4, 5.5, 6.5, 7.6, 8.5, 'o', 'k', '2023-12-09', '2023-12-09', '2023-12-10', 'a', 'b', 'yyyyyyyyy' ,'2023-12-09'), + (3, 2, 4, 4, 5.5, 6.5, 7.5, 8.5, 'o', 'k', '2023-12-10', '2023-12-09', '2023-12-10', 'a', 'b', 'yyyyyyyyy' ,'2023-12-10'), + (3, 2, 4, 4, 5.5, 6.6, 7.5, 8.5, 'o', 'k', '2023-12-10', '2023-12-09', '2023-12-10', 'a', 'b', 'yyyyyyyyy' ,'2023-12-10'), + (4, 3, 3, 4, 5.5, 6.5, 7.5, 8.5, 'o', 'k', '2023-12-11', '2023-12-09', '2023-12-10', 'a', 'b', 'yyyyyyyyy' ,'2023-12-11'), + (4, 3, 3, 4, 5.5, 6.6, 7.5, 8.5, 'o', 'k', '2023-12-11', '2023-12-09', '2023-12-10', 'a', 'b', 'yyyyyyyyy' ,'2023-12-11'), + (5, 2, 3, 6, 7.5, 8.5, 9.5, 10.5, 'k', 'o', '2023-12-12', '2023-12-12', '2023-12-13', 'c', 'd', 'xxxxxxxxx', '2023-12-12'), + (5, 2, 3, 6, 7.6, 8.5, 9.5, 10.5, 'k', 'o', '2023-12-12', '2023-12-12', '2023-12-13', 'c', 'd', 'xxxxxxxxx', '2023-12-12'); + """ + + sql """ + insert into orders values + (1, 1, 'o', 9.5, '2023-12-08', 'a', 'b', 1, 'yy','2023-12-08'), + (1, 1, 'o', 10.5, '2023-12-09', 'a', 'b', 1, 'yy','2023-12-09'), + (1, 1, 'o', 10.5, '2023-12-07', 'a', 'b', 1, 'yy','2023-12-07'), + (1, 1, 'o', 10.5, '2023-12-08', 'a', 'b', 1, 'yy','2023-12-08'), + (2, 1, 'o', 11.5, '2023-12-09', 'a', 'b', 1, 'yy','2023-12-09'), + (2, 1, 'o', 11.5, '2023-12-08', 'a', 'b', 1, 'yy','2023-12-08'), + (2, 1, 'o', 11.5, '2023-12-11', 'a', 'b', 1, 'yy','2023-12-11'), + (3, 1, 'o', 12.5, '2023-12-10', 'a', 'b', 1, 'yy','2023-12-10'), + (3, 1, 'o', 12.5, '2023-12-09', 'a', 'b', 1, 'yy','2023-12-09'), + (3, 1, 'o', 12.5, '2023-12-12', 'a', 'b', 1, 'yy','2023-12-12'), + (3, 1, 'o', 33.5, '2023-12-13', 'a', 'b', 1, 'yy','2023-12-13'), + (4, 2, 'o', 43.2, '2023-12-10', 'c','d',2, 'mm' ,'2023-12-10'), + (4, 2, 'o', 43.2, '2023-12-11', 'c','d',2, 'mm' ,'2023-12-11'), + (4, 2, 'o', 43.2, '2023-12-13', 'c','d',2, 'mm' ,'2023-12-13'), + (5, 2, 'o', 56.2, '2023-12-12', 'c','d',2, 'mi' ,'2023-12-12'), + (5, 2, 'o', 56.2, '2023-12-14', 'c','d',2, 'mi' ,'2023-12-14'), + (5, 2, 'o', 56.2, '2023-12-16', 'c','d',2, 'mi' ,'2023-12-16'), + (5, 2, 'o', 1.2, '2023-12-12', 'c','d',2, 'mi' ,'2023-12-12'); + """ + + sql """ + insert into partsupp values + (2, 3, 9, 10.01, 'supply1'), + (2, 3, 10, 11.01, 'supply2'); + """ + + sql """analyze table partsupp with sync""" + sql """analyze table lineitem with sync""" + sql """analyze table orders with sync""" + + // =, !=, >, <, <=, >= + // left outer join + // other conjuncts in join condition + def mv1_0 = + """ + select l_orderkey, o_orderdate + from + lineitem + left outer join + orders on l_orderkey = o_orderkey and l_shipdate <= o_orderdate + left outer join partsupp on ps_partkey = l_partkey and l_orderkey + o_orderkey != ps_availqty; + """ + def query1_0 = + """ + select l_orderkey, o_orderdate + from + lineitem + left outer join + orders on l_orderkey = o_orderkey and l_shipdate <= o_orderdate + left outer join partsupp on ps_partkey = l_partkey and l_orderkey + o_orderkey != ps_availqty; + """ + order_qt_query1_0_before "${query1_0}" + async_mv_rewrite_success(db, mv1_0, query1_0, "mv1_0") + order_qt_query1_0_after "${query1_0}" + sql """ DROP MATERIALIZED VIEW IF EXISTS mv1_0""" + + def mv1_4 = + """ + select l_orderkey, o_orderdate + from + lineitem + left outer join + orders on l_shipdate <= o_orderdate and l_orderkey = o_orderkey + left outer join partsupp on l_orderkey + o_orderkey != ps_availqty and ps_partkey = l_partkey; + """ + def query1_4 = + """ + select l_orderkey, o_orderdate + from + lineitem + left outer join + orders on l_shipdate <= o_orderdate and l_orderkey = o_orderkey + left outer join partsupp on l_orderkey + o_orderkey != ps_availqty and ps_partkey = l_partkey; + """ + order_qt_query1_4_before "${query1_4}" + // other conjuncts is before equal conjuncts, should success + async_mv_rewrite_success(db, mv1_4, query1_4, "mv1_4") + order_qt_query1_4_after "${query1_4}" + sql """ DROP MATERIALIZED VIEW IF EXISTS mv1_4""" + + + def mv1_5 = + """ + select l_orderkey, o_orderdate + from + lineitem + left outer join + orders on l_shipdate <= o_orderdate and l_orderkey = o_orderkey and lineitem.lo_orderdate <= orders.lo_orderdate + left outer join partsupp on l_orderkey + o_orderkey != ps_availqty and ps_partkey = l_partkey; + """ + def query1_5 = + """ + select l_orderkey, o_orderdate + from + lineitem + left outer join + orders on l_shipdate <= o_orderdate and l_orderkey = o_orderkey and lineitem.lo_orderdate <= orders.lo_orderdate + left outer join partsupp on l_orderkey + o_orderkey != ps_availqty and ps_partkey = l_partkey; + """ + order_qt_query1_5_before "${query1_5}" + // other conjuncts has the same column name + async_mv_rewrite_success(db, mv1_5, query1_5, "mv1_5") + order_qt_query1_5_after "${query1_5}" + sql """ DROP MATERIALIZED VIEW IF EXISTS mv1_5""" + + + def mv1_1 = + """ + select l_orderkey, o_orderdate + from + lineitem + left outer join + orders on l_orderkey = o_orderkey and l_shipdate <= o_orderdate + left outer join partsupp on ps_partkey = l_partkey and l_orderkey + o_orderkey != ps_availqty; + """ + def query1_1 = + """ + select l_orderkey, o_orderdate + from + lineitem + left outer join + orders on l_orderkey = o_orderkey and l_shipdate < o_orderdate + left outer join partsupp on ps_partkey = l_partkey and l_orderkey + o_orderkey != ps_availqty; + """ + order_qt_query1_1_before "${query1_1}" + async_mv_rewrite_fail(db, mv1_1, query1_1, "mv1_1") + order_qt_query1_1_after "${query1_1}" + sql """ DROP MATERIALIZED VIEW IF EXISTS mv1_1""" + + + def mv1_2 = + """ + select l_orderkey, l_shipdate, o_orderdate + from + lineitem + left outer join + orders on l_orderkey = o_orderkey and l_shipdate <= o_orderdate + left outer join partsupp on ps_partkey = l_partkey and l_orderkey + o_orderkey != ps_availqty; + """ + def query1_2 = + """ + select l_orderkey, l_shipdate, o_orderdate + from + lineitem + left outer join + orders on l_orderkey = o_orderkey and l_shipdate < o_orderdate + left outer join partsupp on ps_partkey = l_partkey and l_orderkey + o_orderkey != ps_availqty; + """ + order_qt_query1_2_before "${query1_2}" + // though select has the compensate filter column, should fail + async_mv_rewrite_fail(db, mv1_2, query1_2, "mv1_2") + order_qt_query1_2_after "${query1_2}" + sql """ DROP MATERIALIZED VIEW IF EXISTS mv1_2""" + + + // self join + def mv1_3 = + """ + select l1.l_orderkey, l2.l_shipdate + from + lineitem l1 + left outer join + lineitem l2 on l1.l_orderkey = l2.l_orderkey and l1.l_shipdate <= l2.l_receiptdate and l1.l_extendedprice != l2.l_discount; + """ + def query1_3 = + """ + select l1.l_orderkey, l2.l_shipdate + from + lineitem l1 + left outer join + lineitem l2 on l1.l_orderkey = l2.l_orderkey and l1.l_shipdate <= l2.l_receiptdate and l1.l_extendedprice != l2.l_discount; + """ + order_qt_query1_3_before "${query1_3}" + async_mv_rewrite_success(db, mv1_3, query1_3, "mv1_3") + order_qt_query1_3_after "${query1_3}" + sql """ DROP MATERIALIZED VIEW IF EXISTS mv1_3""" + + // other conjuncts above join + def mv2_0 = + """ + select + o_orderdate, + o_shippriority, + o_comment, + l_orderkey, + ps_partkey + from + orders + left outer join lineitem on l_orderkey = o_orderkey + left outer join partsupp on ps_partkey = l_partkey + where l_orderkey + o_orderkey != ps_availqty and l_shipdate <= o_orderdate; + """ + def query2_0 = + """ + select + o_orderdate, + o_shippriority, + o_comment, + l_orderkey, + ps_partkey + from + orders + left outer join lineitem on l_orderkey = o_orderkey + left outer join partsupp on ps_partkey = l_partkey + where l_orderkey + o_orderkey != ps_availqty and l_shipdate <= o_orderdate; + """ + order_qt_query2_0_before "${query2_0}" + async_mv_rewrite_success(db, mv2_0, query2_0, "mv2_0") + order_qt_query2_0_after "${query2_0}" + sql """ DROP MATERIALIZED VIEW IF EXISTS mv2_0""" + + + def mv2_1 = + """ + select + o_orderdate, + o_shippriority, + o_comment, + l_orderkey, + ps_partkey + from + orders + left outer join lineitem on l_orderkey = o_orderkey + left outer join partsupp on ps_partkey = l_partkey + where l_orderkey + o_orderkey != ps_availqty and l_shipdate <= o_orderdate; + """ + def query2_1 = + """ + select + o_orderdate, + o_shippriority, + o_comment, + l_orderkey, + ps_partkey + from + orders + left outer join lineitem on l_orderkey = o_orderkey + left outer join partsupp on ps_partkey = l_partkey + where l_orderkey + o_orderkey != ps_availqty and l_shipdate < o_orderdate; + """ + order_qt_query2_1_before "${query2_1}" + async_mv_rewrite_fail(db, mv2_1, query2_1, "mv2_1") + order_qt_query2_1_after "${query2_1}" + sql """ DROP MATERIALIZED VIEW IF EXISTS mv2_1""" + + + def mv2_2 = + """ + select + o_orderdate, + l_shipdate, + o_comment, + l_orderkey, + ps_partkey + from + orders + left outer join lineitem on l_orderkey = o_orderkey + left outer join partsupp on ps_partkey = l_partkey + where l_orderkey + o_orderkey != ps_availqty and l_shipdate <= o_orderdate; + """ + def query2_2 = + """ + select + o_orderdate, + l_shipdate, + o_comment, + l_orderkey, + ps_partkey + from + orders + left outer join lineitem on l_orderkey = o_orderkey + left outer join partsupp on ps_partkey = l_partkey + where l_orderkey + o_orderkey != ps_availqty and l_shipdate < o_orderdate; + """ + order_qt_query2_2_before "${query2_2}" + // though select has the compensate filter column, should fail + async_mv_rewrite_fail(db, mv2_2, query2_2, "mv2_2") + order_qt_query2_2_after "${query2_2}" + sql """ DROP MATERIALIZED VIEW IF EXISTS mv2_2""" + + + // other conjuncts both above join and in join other conjuncts + def mv3_0 = + """ + select + o_orderdate, + o_shippriority, + o_comment, + l_orderkey, + ps_partkey + from + orders + left outer join lineitem on l_orderkey = o_orderkey and l_shipdate <= o_orderdate + left outer join partsupp on ps_partkey = l_partkey + where l_orderkey + o_orderkey != ps_availqty; + """ + def query3_0 = + """ + select + o_orderdate, + o_shippriority, + o_comment, + l_orderkey, + ps_partkey + from + orders + left outer join lineitem on l_orderkey = o_orderkey and l_shipdate <= o_orderdate + left outer join partsupp on ps_partkey = l_partkey + where l_orderkey + o_orderkey != ps_availqty; + """ + order_qt_query3_0_before "${query3_0}" + async_mv_rewrite_success(db, mv3_0, query3_0, "mv3_0") + order_qt_query3_0_after "${query3_0}" + sql """ DROP MATERIALIZED VIEW IF EXISTS mv3_0""" + + + def mv3_1 = + """ + select + o_orderdate, + o_shippriority, + o_comment, + l_orderkey, + ps_partkey + from + orders + left outer join lineitem on l_orderkey = o_orderkey and l_shipdate <= o_orderdate + left outer join partsupp on ps_partkey = l_partkey + where l_orderkey + o_orderkey != ps_availqty; + """ + def query3_1 = + """ + select + o_orderdate, + o_shippriority, + o_comment, + l_orderkey, + ps_partkey + from + orders + left outer join lineitem on l_orderkey = o_orderkey and l_shipdate < o_orderdate + left outer join partsupp on ps_partkey = l_partkey + where l_orderkey + o_orderkey != ps_availqty; + """ + order_qt_query3_1_before "${query3_1}" + async_mv_rewrite_fail(db, mv3_1, query3_1, "mv3_1") + order_qt_query3_1_after "${query3_1}" + sql """ DROP MATERIALIZED VIEW IF EXISTS mv3_1""" + + + def mv3_2 = + """ + select + o_orderdate, + l_shipdate, + o_comment, + l_orderkey, + ps_partkey + from + orders + left outer join lineitem on l_orderkey = o_orderkey and l_shipdate <= o_orderdate + left outer join partsupp on ps_partkey = l_partkey + where l_orderkey + o_orderkey != ps_availqty; + """ + def query3_2 = + """ + select + o_orderdate, + l_shipdate, + o_comment, + l_orderkey, + ps_partkey + from + orders + left outer join lineitem on l_orderkey = o_orderkey and l_shipdate < o_orderdate + left outer join partsupp on ps_partkey = l_partkey + where l_orderkey + o_orderkey != ps_availqty; + """ + order_qt_query3_2_before "${query3_2}" + // though select has the compensate filter column, should fail + async_mv_rewrite_fail(db, mv3_2, query3_2, "mv3_2") + order_qt_query3_2_after "${query3_2}" + sql """ DROP MATERIALIZED VIEW IF EXISTS mv3_2""" + + + def mv3_3 = + """ + select + o_orderdate, + l_shipdate, + o_comment, + l_orderkey, + ps_partkey + from + orders + left outer join lineitem on l_orderkey = o_orderkey and l_shipdate <= o_orderdate + left outer join partsupp on ps_partkey = l_partkey + where l_orderkey + o_orderkey != ps_availqty; + """ + def query3_3 = + """ + select + o_orderdate, + l_shipdate, + o_comment, + l_orderkey, + ps_partkey + from + orders + left outer join lineitem on l_orderkey = o_orderkey + left outer join partsupp on ps_partkey = l_partkey; + """ + order_qt_query3_3_before "${query3_3}" + // mv has other conjuncts but query not + async_mv_rewrite_fail(db, mv3_3, query3_3, "mv3_3") + order_qt_query3_3_after "${query3_3}" + sql """ DROP MATERIALIZED VIEW IF EXISTS mv3_3""" + + + def mv3_4 = + """ + select + o_orderdate, + l_shipdate, + o_comment, + l_orderkey, + ps_partkey + from + orders + left outer join lineitem on l_orderkey = o_orderkey + left outer join partsupp on ps_partkey = l_partkey; + """ + def query3_4 = + """ + select + o_orderdate, + l_shipdate, + o_comment, + l_orderkey, + ps_partkey + from + orders + left outer join lineitem on l_orderkey = o_orderkey and l_shipdate < o_orderdate + left outer join partsupp on ps_partkey = l_partkey + where l_orderkey + o_orderkey != ps_availqty; + """ + order_qt_query3_4_before "${query3_4}" + // query has other conjuncts but mv not + async_mv_rewrite_fail(db, mv3_4, query3_4, "mv3_4") + order_qt_query3_4_after "${query3_4}" + sql """ DROP MATERIALIZED VIEW IF EXISTS mv3_4""" + + + def mv3_5 = + """ + select + o_orderdate, + o_shippriority, + o_comment, + l_orderkey, + ps_partkey + from + orders + left outer join lineitem on l_orderkey = o_orderkey and l_shipdate <= o_orderdate + right outer join partsupp on ps_partkey = l_partkey + where l_orderkey + o_orderkey != ps_availqty; + """ + def query3_5 = + """ + select + o_orderdate, + o_shippriority, + o_comment, + l_orderkey, + ps_partkey + from + orders + left outer join lineitem on l_orderkey = o_orderkey and l_shipdate <= o_orderdate + right outer join partsupp on ps_partkey = l_partkey + where l_orderkey + o_orderkey != ps_availqty; + """ + order_qt_query3_5_before "${query3_5}" + // Combinations of different join types + async_mv_rewrite_success(db, mv3_5, query3_5, "mv3_5") + order_qt_query3_5_after "${query3_5}" + sql """ DROP MATERIALIZED VIEW IF EXISTS mv3_5""" + + + def mv3_6 = + """ + select + o_orderdate, + o_shippriority, + o_comment, + l_orderkey, + ps_partkey + from + orders + left outer join lineitem on l_orderkey = o_orderkey and date_trunc(l_shipdate, 'day') <= o_orderdate + left outer join partsupp on ps_partkey = l_partkey + where l_orderkey + o_orderkey != ps_availqty; + """ + def query3_6 = + """ + select + o_orderdate, + o_shippriority, + o_comment, + l_orderkey, + ps_partkey + from + orders + left outer join lineitem on l_orderkey = o_orderkey and date_trunc(l_shipdate, 'day') <= o_orderdate + left outer join partsupp on ps_partkey = l_partkey + where l_orderkey + o_orderkey != ps_availqty; + """ + order_qt_query3_6_before "${query3_6}" + // Complex expressions + async_mv_rewrite_success(db, mv3_6, query3_6, "mv3_6") + order_qt_query3_6_after "${query3_6}" + sql """ DROP MATERIALIZED VIEW IF EXISTS mv3_6""" + + + // right outer join + // other conjuncts in join condition + def mv4_0 = + """ + select l_orderkey, o_orderdate + from + lineitem + right outer join + orders on l_orderkey = o_orderkey and l_shipdate <= o_orderdate + right outer join partsupp on ps_partkey = l_partkey and l_orderkey + o_orderkey != ps_availqty; + """ + def query4_0 = + """ + select l_orderkey, o_orderdate + from + lineitem + right outer join + orders on l_orderkey = o_orderkey and l_shipdate <= o_orderdate + right outer join partsupp on ps_partkey = l_partkey and l_orderkey + o_orderkey != ps_availqty; + """ + order_qt_query4_0_before "${query4_0}" + async_mv_rewrite_success(db, mv4_0, query4_0, "mv4_0") + order_qt_query4_0_after "${query4_0}" + sql """ DROP MATERIALIZED VIEW IF EXISTS mv4_0""" + + + def mv4_1 = + """ + select l_orderkey, o_orderdate + from + lineitem + right outer join + orders on l_orderkey = o_orderkey and l_shipdate <= o_orderdate + right outer join partsupp on ps_partkey = l_partkey and l_orderkey + o_orderkey != ps_availqty; + """ + def query4_1 = + """ + select l_orderkey, o_orderdate + from + lineitem + right outer join + orders on l_orderkey = o_orderkey and l_shipdate < o_orderdate + right outer join partsupp on ps_partkey = l_partkey and l_orderkey + o_orderkey != ps_availqty; + """ + order_qt_query4_1_before "${query4_1}" + async_mv_rewrite_fail(db, mv4_1, query4_1, "mv4_1") + order_qt_query4_1_after "${query4_1}" + sql """ DROP MATERIALIZED VIEW IF EXISTS mv4_1""" + + + def mv4_2 = + """ + select l_orderkey, l_shipdate, o_orderdate + from + lineitem + right outer join + orders on l_orderkey = o_orderkey and l_shipdate <= o_orderdate + right outer join partsupp on ps_partkey = l_partkey and l_orderkey + o_orderkey != ps_availqty; + """ + def query4_2 = + """ + select l_orderkey, l_shipdate, o_orderdate + from + lineitem + right outer join + orders on l_orderkey = o_orderkey and l_shipdate < o_orderdate + right outer join partsupp on ps_partkey = l_partkey and l_orderkey + o_orderkey != ps_availqty; + """ + order_qt_query4_2_before "${query4_2}" + // though select has the compensate filter column, should fail + async_mv_rewrite_fail(db, mv4_2, query4_2, "mv4_2") + order_qt_query4_2_after "${query4_2}" + sql """ DROP MATERIALIZED VIEW IF EXISTS mv4_2""" + + def mv4_3 = + """ + select l_orderkEY, o_orderdate + from + lineitem + right outer join + orders on l_orderkey = o_orderkey and l_shipdate <= o_orderdate + right outer join partsupp on ps_partkey = l_partkey and l_orderkey + o_orderKey != ps_availQty; + """ + def query4_3 = + """ + select l_orderkey, o_orderdate + from + lineitem + right outer join + orders on l_orderkey = o_orderkey and l_shipdate <= o_orderdate + right outer join partsupp on ps_partkey = l_partkey and l_orderkey + o_orderkey != ps_availqty; + """ + order_qt_query4_3_before "${query4_3}" + // Case sensitivity of column names in query and mv, should success + async_mv_rewrite_success(db, mv4_3, query4_3, "mv4_3") + order_qt_query4_3_after "${query4_3}" + sql """ DROP MATERIALIZED VIEW IF EXISTS mv4_3""" + + + def mv4_4 = + """ + select l_orderkey, o_orderdate + from + lineitem + right outer join + orders on l_orderkey = o_orderkey and l_shipdate <= o_orderdate + left outer join partsupp on ps_partkey = l_partkey and l_orderkey + o_orderkey != ps_availqty; + """ + def query4_4 = + """ + select l_orderkey, o_orderdate + from + lineitem + right outer join + orders on l_orderkey = o_orderkey and l_shipdate <= o_orderdate + left outer join partsupp on ps_partkey = l_partkey and l_orderkey + o_orderkey != ps_availqty; + """ + order_qt_query4_4_before "${query4_4}" + // Combinations of different join types + async_mv_rewrite_success(db, mv4_4, query4_4, "mv4_4") + order_qt_query4_4_after "${query4_4}" + sql """ DROP MATERIALIZED VIEW IF EXISTS mv4_4""" + + // other conjuncts above join + def mv5_0 = + """ + select + o_orderdate, + o_shippriority, + o_comment, + l_orderkey, + ps_partkey + from + orders + right outer join lineitem on l_orderkey = o_orderkey + right outer join partsupp on ps_partkey = l_partkey + where l_orderkey + o_orderkey != ps_availqty and l_shipdate <= o_orderdate; + """ + def query5_0 = + """ + select + o_orderdate, + o_shippriority, + o_comment, + l_orderkey, + ps_partkey + from + orders + right outer join lineitem on l_orderkey = o_orderkey + right outer join partsupp on ps_partkey = l_partkey + where l_orderkey + o_orderkey != ps_availqty and l_shipdate <= o_orderdate; + """ + order_qt_query5_0_before "${query5_0}" + async_mv_rewrite_success(db, mv5_0, query5_0, "mv5_0") + order_qt_query5_0_after "${query5_0}" + sql """ DROP MATERIALIZED VIEW IF EXISTS mv5_0""" + + + def mv5_1 = + """ + select + o_orderdate, + o_shippriority, + o_comment, + l_orderkey, + ps_partkey + from + orders + right outer join lineitem on l_orderkey = o_orderkey + right outer join partsupp on ps_partkey = l_partkey + where l_orderkey + o_orderkey != ps_availqty and l_shipdate <= o_orderdate; + """ + def query5_1 = + """ + select + o_orderdate, + o_shippriority, + o_comment, + l_orderkey, + ps_partkey + from + orders + right outer join lineitem on l_orderkey = o_orderkey + right outer join partsupp on ps_partkey = l_partkey + where l_orderkey + o_orderkey != ps_availqty and l_shipdate < o_orderdate; + """ + order_qt_query5_1_before "${query5_1}" + async_mv_rewrite_fail(db, mv5_1, query5_1, "mv5_1") + order_qt_query5_1_after "${query5_1}" + sql """ DROP MATERIALIZED VIEW IF EXISTS mv5_1""" + + + def mv5_2 = + """ + select + o_orderdate, + l_shipdate, + o_comment, + l_orderkey, + ps_partkey + from + orders + right outer join lineitem on l_orderkey = o_orderkey + right outer join partsupp on ps_partkey = l_partkey + where l_orderkey + o_orderkey != ps_availqty and l_shipdate <= o_orderdate; + """ + def query5_2 = + """ + select + o_orderdate, + l_shipdate, + o_comment, + l_orderkey, + ps_partkey + from + orders + right outer join lineitem on l_orderkey = o_orderkey + right outer join partsupp on ps_partkey = l_partkey + where l_orderkey + o_orderkey != ps_availqty and l_shipdate < o_orderdate; + """ + order_qt_query_5_2_before "${query5_2}" + // though select has the compensate filter column, should fail + async_mv_rewrite_fail(db, mv5_2, query5_2, "mv5_2") + order_qt_query5_2_after "${query5_2}" + sql """ DROP MATERIALIZED VIEW IF EXISTS mv5_2""" + + // self join + def mv5_3 = + """ + select l1.l_orderkey, l2.l_shipdate + from + lineitem l1 + right outer join + lineitem l2 on l1.l_orderkey = l2.l_orderkey + where l1.l_shipdate <= l2.l_receiptdate and l1.l_extendedprice != l2.l_discount; + """ + def query5_3 = + """ + select l1.l_orderkey, l2.l_shipdate + from + lineitem l1 + right outer join + lineitem l2 on l1.l_orderkey = l2.l_orderkey + where l1.l_shipdate <= l2.l_receiptdate and l1.l_extendedprice != l2.l_discount; + """ + order_qt_query5_3_before "${query5_3}" + async_mv_rewrite_success(db, mv5_3, query5_3, "mv5_3") + order_qt_query5_3_after "${query5_3}" + sql """ DROP MATERIALIZED VIEW IF EXISTS mv5_3""" + + + // other conjuncts both above join and in join other conjuncts + def mv6_0 = + """ + select + o_orderdate, + o_shippriority, + o_comment, + l_orderkey, + ps_partkey + from + orders + right outer join lineitem on l_orderkey = o_orderkey and l_shipdate <= o_orderdate + right outer join partsupp on ps_partkey = l_partkey + where l_orderkey + o_orderkey != ps_availqty; + """ + def query6_0 = + """ + select + o_orderdate, + o_shippriority, + o_comment, + l_orderkey, + ps_partkey + from + orders + right outer join lineitem on l_orderkey = o_orderkey and l_shipdate <= o_orderdate + right outer join partsupp on ps_partkey = l_partkey + where l_orderkey + o_orderkey != ps_availqty; + """ + order_qt_query6_0_before "${query6_0}" + async_mv_rewrite_success(db, mv6_0, query6_0, "mv6_0") + order_qt_query6_0_after "${query6_0}" + sql """ DROP MATERIALIZED VIEW IF EXISTS mv6_0""" + + + def mv6_1 = + """ + select + o_orderdate, + o_shippriority, + o_comment, + l_orderkey, + ps_partkey + from + orders + right outer join lineitem on l_orderkey = o_orderkey and l_shipdate <= o_orderdate + right outer join partsupp on ps_partkey = l_partkey + where l_orderkey + o_orderkey != ps_availqty; + """ + def query6_1 = + """ + select + o_orderdate, + o_shippriority, + o_comment, + l_orderkey, + ps_partkey + from + orders + right outer join lineitem on l_orderkey = o_orderkey and l_shipdate < o_orderdate + right outer join partsupp on ps_partkey = l_partkey + where l_orderkey + o_orderkey != ps_availqty; + """ + order_qt_query6_1_before "${query6_1}" + async_mv_rewrite_fail(db, mv6_1, query6_1, "mv6_1") + order_qt_query6_1_after "${query6_1}" + sql """ DROP MATERIALIZED VIEW IF EXISTS mv6_1""" + + + def mv6_2 = + """ + select + o_orderdate, + l_shipdate, + o_comment, + l_orderkey, + ps_partkey + from + orders + right outer join lineitem on l_orderkey = o_orderkey and l_shipdate <= o_orderdate + right outer join partsupp on ps_partkey = l_partkey + where l_orderkey + o_orderkey != ps_availqty; + """ + def query6_2 = + """ + select + o_orderdate, + l_shipdate, + o_comment, + l_orderkey, + ps_partkey + from + orders + right outer join lineitem on l_orderkey = o_orderkey and l_shipdate < o_orderdate + right outer join partsupp on ps_partkey = l_partkey + where l_orderkey + o_orderkey != ps_availqty; + """ + order_qt_query6_2_before "${query6_2}" + // though select has the compensate filter column, should fail + async_mv_rewrite_fail(db, mv6_2, query6_2, "mv6_2") + order_qt_query6_2_after "${query6_2}" + sql """ DROP MATERIALIZED VIEW IF EXISTS mv6_2""" + + + def mv6_3 = + """ + select + o_orderdate, + l_shipdate, + o_comment, + l_orderkey, + ps_partkey + from + orders + right outer join lineitem on l_orderkey = o_orderkey and l_shipdate <= o_orderdate + right outer join partsupp on ps_partkey = l_partkey + where l_orderkey + o_orderkey != ps_availqty; + """ + def query6_3 = + """ + select + o_orderdate, + l_shipdate, + o_comment, + l_orderkey, + ps_partkey + from + orders + right outer join lineitem on l_orderkey = o_orderkey + right outer join partsupp on ps_partkey = l_partkey; + """ + order_qt_query6_3_before "${query6_3}" + // mv has other conjuncts but query not + async_mv_rewrite_fail(db, mv6_3, query6_3, "mv6_3") + order_qt_query6_3_after "${query6_3}" + sql """ DROP MATERIALIZED VIEW IF EXISTS mv6_3""" + + + def mv6_4 = + """ + select + o_orderdate, + l_shipdate, + o_comment, + l_orderkey, + ps_partkey + from + orders + right outer join lineitem on l_orderkey = o_orderkey + right outer join partsupp on ps_partkey = l_partkey; + """ + def query6_4 = + """ + select + o_orderdate, + l_shipdate, + o_comment, + l_orderkey, + ps_partkey + from + orders + right outer join lineitem on l_orderkey = o_orderkey and l_shipdate < o_orderdate + right outer join partsupp on ps_partkey = l_partkey + where l_orderkey + o_orderkey != ps_availqty; + """ + order_qt_query6_4_before "${query6_4}" + // query has other conjuncts but mv not + async_mv_rewrite_fail(db, mv6_4, query6_4, "mv6_4") + order_qt_query6_4_after "${query6_4}" + sql """ DROP MATERIALIZED VIEW IF EXISTS mv6_4""" + + + // full outer join + // other conjuncts in join condition + def mv7_0 = + """ + select l_orderkey, o_orderdate + from + lineitem + full outer join + orders on l_orderkey = o_orderkey and l_shipdate <= o_orderdate + full outer join partsupp on ps_partkey = l_partkey and l_orderkey + o_orderkey != ps_availqty; + """ + def query7_0 = + """ + select l_orderkey, o_orderdate + from + lineitem + full outer join + orders on l_orderkey = o_orderkey and l_shipdate <= o_orderdate + full outer join partsupp on ps_partkey = l_partkey and l_orderkey + o_orderkey != ps_availqty; + """ + order_qt_query7_0_before "${query7_0}" + async_mv_rewrite_success(db, mv7_0, query7_0, "mv7_0") + order_qt_query7_0_after "${query7_0}" + sql """ DROP MATERIALIZED VIEW IF EXISTS mv7_0""" + + + def mv7_1 = + """ + select l_orderkey, o_orderdate + from + lineitem + full outer join + orders on l_orderkey = o_orderkey and l_shipdate <= o_orderdate + full outer join partsupp on ps_partkey = l_partkey and l_orderkey + o_orderkey != ps_availqty; + """ + def query7_1 = + """ + select l_orderkey, o_orderdate + from + lineitem + full outer join + orders on l_orderkey = o_orderkey and l_shipdate < o_orderdate + full outer join partsupp on ps_partkey = l_partkey and l_orderkey + o_orderkey != ps_availqty; + """ + order_qt_query7_7_before "${query7_1}" + async_mv_rewrite_fail(db, mv7_1, query7_1, "mv7_1") + order_qt_query7_7_after "${query7_1}" + sql """ DROP MATERIALIZED VIEW IF EXISTS mv7_1""" + + + def mv7_2 = + """ + select l_orderkey, l_shipdate, o_orderdate + from + lineitem + full outer join + orders on l_orderkey = o_orderkey and l_shipdate <= o_orderdate + full outer join partsupp on ps_partkey = l_partkey and l_orderkey + o_orderkey != ps_availqty; + """ + def query7_2 = + """ + select l_orderkey, l_shipdate, o_orderdate + from + lineitem + full outer join + orders on l_orderkey = o_orderkey and l_shipdate < o_orderdate + full outer join partsupp on ps_partkey = l_partkey and l_orderkey + o_orderkey != ps_availqty; + """ + order_qt_query7_2_before "${query7_2}" + // though select has the compensate filter column, should fail + async_mv_rewrite_fail(db, mv7_2, query7_2, "mv7_2") + order_qt_query7_2_after "${query7_2}" + sql """ DROP MATERIALIZED VIEW IF EXISTS mv7_2""" + + // other conjuncts above join + def mv8_0 = + """ + select + o_orderdate, + o_shippriority, + o_comment, + l_orderkey, + ps_partkey + from + orders + full outer join lineitem on l_orderkey = o_orderkey + full outer join partsupp on ps_partkey = l_partkey + where l_orderkey + o_orderkey != ps_availqty and l_shipdate <= o_orderdate; + """ + def query8_0 = + """ + select + o_orderdate, + o_shippriority, + o_comment, + l_orderkey, + ps_partkey + from + orders + full outer join lineitem on l_orderkey = o_orderkey + full outer join partsupp on ps_partkey = l_partkey + where l_orderkey + o_orderkey != ps_availqty and l_shipdate <= o_orderdate; + """ + order_qt_query8_0_before "${query8_0}" + async_mv_rewrite_success(db, mv8_0, query8_0, "mv8_0") + order_qt_query8_0_after "${query8_0}" + sql """ DROP MATERIALIZED VIEW IF EXISTS mv8_0""" + + + def mv8_1 = + """ + select + o_orderdate, + o_shippriority, + o_comment, + l_orderkey, + ps_partkey + from + orders + full outer join lineitem on l_orderkey = o_orderkey + full outer join partsupp on ps_partkey = l_partkey + where l_orderkey + o_orderkey != ps_availqty and l_shipdate <= o_orderdate; + """ + def query8_1 = + """ + select + o_orderdate, + o_shippriority, + o_comment, + l_orderkey, + ps_partkey + from + orders + full outer join lineitem on l_orderkey = o_orderkey + full outer join partsupp on ps_partkey = l_partkey + where l_orderkey + o_orderkey != ps_availqty and l_shipdate < o_orderdate; + """ + order_qt_query8_1_before "${query8_1}" + async_mv_rewrite_fail(db, mv8_1, query8_1, "mv8_1") + order_qt_query8_1_after "${query8_1}" + sql """ DROP MATERIALIZED VIEW IF EXISTS mv8_1""" + + + def mv8_2 = + """ + select + o_orderdate, + l_shipdate, + o_comment, + l_orderkey, + ps_partkey + from + orders + full outer join lineitem on l_orderkey = o_orderkey + full outer join partsupp on ps_partkey = l_partkey + where l_orderkey + o_orderkey != ps_availqty and l_shipdate <= o_orderdate; + """ + def query8_2 = + """ + select + o_orderdate, + l_shipdate, + o_comment, + l_orderkey, + ps_partkey + from + orders + full outer join lineitem on l_orderkey = o_orderkey + full outer join partsupp on ps_partkey = l_partkey + where l_orderkey + o_orderkey != ps_availqty and l_shipdate < o_orderdate; + """ + order_qt_query8_2_before "${query8_2}" + // though select has the compensate filter column, should fail + async_mv_rewrite_fail(db, mv8_2, query8_2, "mv8_2") + order_qt_query8_2_after "${query8_2}" + sql """ DROP MATERIALIZED VIEW IF EXISTS mv8_2""" + + + // other conjuncts both above join and in join other conjuncts + def mv9_0 = + """ + select + o_orderdate, + o_shippriority, + o_comment, + l_orderkey, + ps_partkey + from + orders + full outer join lineitem on l_orderkey = o_orderkey and l_shipdate <= o_orderdate + full outer join partsupp on ps_partkey = l_partkey + where l_orderkey + o_orderkey != ps_availqty; + """ + def query9_0 = + """ + select + o_orderdate, + o_shippriority, + o_comment, + l_orderkey, + ps_partkey + from + orders + full outer join lineitem on l_orderkey = o_orderkey and l_shipdate <= o_orderdate + full outer join partsupp on ps_partkey = l_partkey + where l_orderkey + o_orderkey != ps_availqty; + """ + order_qt_query9_0_before "${query9_0}" + async_mv_rewrite_success(db, mv9_0, query9_0, "mv9_0") + order_qt_query9_0_after "${query9_0}" + sql """ DROP MATERIALIZED VIEW IF EXISTS mv9_0""" + + + def mv9_1 = + """ + select + o_orderdate, + o_shippriority, + o_comment, + l_orderkey, + ps_partkey + from + orders + full outer join lineitem on l_orderkey = o_orderkey and l_shipdate <= o_orderdate + full outer join partsupp on ps_partkey = l_partkey + where l_orderkey + o_orderkey != ps_availqty; + """ + def query9_1 = + """ + select + o_orderdate, + o_shippriority, + o_comment, + l_orderkey, + ps_partkey + from + orders + full outer join lineitem on l_orderkey = o_orderkey and l_shipdate < o_orderdate + full outer join partsupp on ps_partkey = l_partkey + where l_orderkey + o_orderkey != ps_availqty; + """ + order_qt_query9_1_before "${query9_1}" + async_mv_rewrite_fail(db, mv9_1, query9_1, "mv9_1") + order_qt_query9_1_after "${query9_1}" + sql """ DROP MATERIALIZED VIEW IF EXISTS mv9_1""" + + + def mv9_2 = + """ + select + o_orderdate, + l_shipdate, + o_comment, + l_orderkey, + ps_partkey + from + orders + full outer join lineitem on l_orderkey = o_orderkey and l_shipdate <= o_orderdate + full outer join partsupp on ps_partkey = l_partkey + where l_orderkey + o_orderkey != ps_availqty; + """ + def query9_2 = + """ + select + o_orderdate, + l_shipdate, + o_comment, + l_orderkey, + ps_partkey + from + orders + full outer join lineitem on l_orderkey = o_orderkey and l_shipdate < o_orderdate + full outer join partsupp on ps_partkey = l_partkey + where l_orderkey + o_orderkey != ps_availqty; + """ + order_qt_query9_2_before "${query9_2}" + // though select has the compensate filter column, should fail + async_mv_rewrite_fail(db, mv9_2, query9_2, "mv9_2") + order_qt_query9_2_after "${query9_2}" + sql """ DROP MATERIALIZED VIEW IF EXISTS mv9_2""" + + + // self join + def mv9_3 = + """ + select l1.l_orderkey, l2.l_shipdate + from + lineitem l1 + full outer join + lineitem l2 on l1.l_orderkey = l2.l_orderkey + where l1.l_shipdate <= l2.l_receiptdate and l1.l_extendedprice != l2.l_discount; + """ + def query9_3 = + """ + select l1.l_orderkey, l2.l_shipdate + from + lineitem l1 + full outer join + lineitem l2 on l1.l_orderkey = l2.l_orderkey + where l1.l_shipdate <= l2.l_receiptdate and l1.l_extendedprice != l2.l_discount; + """ + order_qt_query9_3_before "${query9_3}" + async_mv_rewrite_success(db, mv9_3, query9_3, "mv9_3") + order_qt_query9_3_after "${query9_3}" + sql """ DROP MATERIALIZED VIEW IF EXISTS mv9_3""" + + def mv9_4 = + """ + select + o_orderdate, + l_shipdate, + o_comment, + l_orderkey, + ps_partkey + from + orders + full outer join lineitem on l_orderkey = o_orderkey and l_shipdate <= o_orderdate + full outer join partsupp on ps_partkey = l_partkey + where l_orderkey + o_orderkey != ps_availqty; + """ + def query9_4 = + """ + select + o_orderdate, + l_shipdate, + o_comment, + l_orderkey, + ps_partkey + from + orders + full outer join lineitem on l_orderkey = o_orderkey + full outer join partsupp on ps_partkey = l_partkey; + """ + order_qt_query9_4_before "${query9_4}" + // mv has other conjuncts but query not + async_mv_rewrite_fail(db, mv9_4, query9_4, "mv9_4") + order_qt_query9_4_after "${query9_4}" + sql """ DROP MATERIALIZED VIEW IF EXISTS mv9_4""" + + + def mv9_5 = + """ + select + o_orderdate, + l_shipdate, + o_comment, + l_orderkey, + ps_partkey + from + orders + full outer join lineitem on l_orderkey = o_orderkey + full outer join partsupp on ps_partkey = l_partkey; + """ + def query9_5 = + """ + select + o_orderdate, + l_shipdate, + o_comment, + l_orderkey, + ps_partkey + from + orders + full outer join lineitem on l_orderkey = o_orderkey and l_shipdate < o_orderdate + full outer join partsupp on ps_partkey = l_partkey + where l_orderkey + o_orderkey != ps_availqty; + """ + order_qt_query9_5_before "${query9_5}" + // query has other conjuncts but mv not + async_mv_rewrite_fail(db, mv9_5, query9_5, "mv9_5") + order_qt_query9_5_after "${query9_5}" + sql """ DROP MATERIALIZED VIEW IF EXISTS mv9_5""" + + + def mv9_6 = + """ + select + o_orderdate, + o_shippriority, + o_comment, + l_orderkey, + ps_partkey + from + orders + left outer join lineitem on l_orderkey = o_orderkey and l_shipdate <= o_orderdate + full outer join partsupp on ps_partkey = l_partkey + where l_orderkey + o_orderkey != ps_availqty; + """ + def query9_6 = + """ + select + o_orderdate, + o_shippriority, + o_comment, + l_orderkey, + ps_partkey + from + orders + left outer join lineitem on l_orderkey = o_orderkey and l_shipdate <= o_orderdate + full outer join partsupp on ps_partkey = l_partkey + where l_orderkey + o_orderkey != ps_availqty; + """ + order_qt_query9_6_before "${query9_6}" + // Combinations of different join types + async_mv_rewrite_success(db, mv9_6, query9_6, "mv9_6") + order_qt_query9_6_after "${query9_6}" + sql """ DROP MATERIALIZED VIEW IF EXISTS mv9_6""" + + + def mv9_7 = + """ + select + o_orderdate, + o_shippriority, + o_comment, + l_orderkey, + ps_partkey + from + orders + full outer join lineitem on l_orderkey = o_orderkey and l_shipdate <= o_orderdate + left outer join partsupp on ps_partkey = l_partkey + where l_orderkey + o_orderkey != ps_availqty; + """ + def query9_7 = + """ + select + o_orderdate, + o_shippriority, + o_comment, + l_orderkey, + ps_partkey + from + orders + full outer join lineitem on l_orderkey = o_orderkey and l_shipdate <= o_orderdate + left outer join partsupp on ps_partkey = l_partkey + where l_orderkey + o_orderkey != ps_availqty; + """ + order_qt_query9_7_before "${query9_7}" + // Combinations of different join types + async_mv_rewrite_success(db, mv9_7, query9_7, "mv9_7") + order_qt_query9_7_after "${query9_7}" + sql """ DROP MATERIALIZED VIEW IF EXISTS mv9_7""" +} + + diff --git a/regression-test/suites/nereids_rules_p0/mv/other_join_conjuncts/semi/other_join_conjuncts_semi.groovy b/regression-test/suites/nereids_rules_p0/mv/other_join_conjuncts/semi/other_join_conjuncts_semi.groovy new file mode 100644 index 00000000000000..30c21c77269e1c --- /dev/null +++ b/regression-test/suites/nereids_rules_p0/mv/other_join_conjuncts/semi/other_join_conjuncts_semi.groovy @@ -0,0 +1,457 @@ +// Licensed to the Apache Software Foundation (ASF) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The ASF licenses this file +// to you under the Apache License, Version 2.0 (the +// "License"); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. + +suite("other_join_conjuncts_semi") { + String db = context.config.getDbNameByFile(context.file) + sql "use ${db}" + sql "set runtime_filter_mode=OFF"; + sql "SET ignore_shape_nodes='PhysicalDistribute,PhysicalProject'" + + sql """ + drop table if exists orders + """ + + sql """ + CREATE TABLE IF NOT EXISTS orders ( + o_orderkey INTEGER NOT NULL, + o_custkey INTEGER NOT NULL, + o_orderstatus CHAR(1) NOT NULL, + o_totalprice DECIMALV3(15,2) NOT NULL, + o_orderdate DATE NOT NULL, + o_orderpriority CHAR(15) NOT NULL, + o_clerk CHAR(15) NOT NULL, + o_shippriority INTEGER NOT NULL, + O_COMMENT VARCHAR(79) NOT NULL, + lo_orderdate DATE NOT NULL + ) + DUPLICATE KEY(o_orderkey, o_custkey) + DISTRIBUTED BY HASH(o_orderkey) BUCKETS 3 + PROPERTIES ( + "replication_num" = "1" + ); + """ + + sql """ + drop table if exists lineitem + """ + + sql""" + CREATE TABLE IF NOT EXISTS lineitem ( + l_orderkey INTEGER NOT NULL, + l_partkey INTEGER NOT NULL, + l_suppkey INTEGER NOT NULL, + l_linenumber INTEGER NOT NULL, + l_quantity DECIMALV3(15,2) NOT NULL, + l_extendedprice DECIMALV3(15,2) NOT NULL, + l_discount DECIMALV3(15,2) NOT NULL, + l_tax DECIMALV3(15,2) NOT NULL, + l_returnflag CHAR(1) NOT NULL, + l_linestatus CHAR(1) NOT NULL, + l_shipdate DATE NOT NULL, + l_commitdate DATE NOT NULL, + l_receiptdate DATE NOT NULL, + l_shipinstruct CHAR(25) NOT NULL, + l_shipmode CHAR(10) NOT NULL, + l_comment VARCHAR(44) NOT NULL, + lo_orderdate DATE NOT NULL + ) + DUPLICATE KEY(l_orderkey, l_partkey, l_suppkey, l_linenumber) + DISTRIBUTED BY HASH(l_orderkey) BUCKETS 3 + PROPERTIES ( + "replication_num" = "1" + ) + """ + + sql """ + drop table if exists partsupp + """ + + sql """ + CREATE TABLE IF NOT EXISTS partsupp ( + ps_partkey INTEGER NOT NULL, + ps_suppkey INTEGER NOT NULL, + ps_availqty INTEGER NOT NULL, + ps_supplycost DECIMALV3(15,2) NOT NULL, + ps_comment VARCHAR(199) NOT NULL + ) + DUPLICATE KEY(ps_partkey, ps_suppkey) + DISTRIBUTED BY HASH(ps_partkey) BUCKETS 3 + PROPERTIES ( + "replication_num" = "1" + ) + """ + + sql """ insert into lineitem values + (1, 2, 3, 4, 5.5, 6.5, 7.5, 8.5, 'o', 'k', '2023-12-08', '2023-12-09', '2023-12-10', 'a', 'b', 'yyyyyyyyy' ,'2023-12-08'), + (1, 2, 3, 4, 5.5, 6.5, 7.6, 8.5, 'o', 'k', '2023-12-08', '2023-12-09', '2023-12-10', 'a', 'b', 'yyyyyyyyy' ,'2023-12-08'), + (2, 4, 3, 4, 5.5, 6.5, 7.5, 8.5, 'o', 'k', '2023-12-09', '2023-12-09', '2023-12-10', 'a', 'b', 'yyyyyyyyy' ,'2023-12-09'), + (2, 4, 3, 4, 5.5, 6.5, 7.6, 8.5, 'o', 'k', '2023-12-09', '2023-12-09', '2023-12-10', 'a', 'b', 'yyyyyyyyy' ,'2023-12-09'), + (3, 2, 4, 4, 5.5, 6.5, 7.5, 8.5, 'o', 'k', '2023-12-10', '2023-12-09', '2023-12-10', 'a', 'b', 'yyyyyyyyy' ,'2023-12-10'), + (3, 2, 4, 4, 5.5, 6.6, 7.5, 8.5, 'o', 'k', '2023-12-10', '2023-12-09', '2023-12-10', 'a', 'b', 'yyyyyyyyy' ,'2023-12-10'), + (4, 3, 3, 4, 5.5, 6.5, 7.5, 8.5, 'o', 'k', '2023-12-11', '2023-12-09', '2023-12-10', 'a', 'b', 'yyyyyyyyy' ,'2023-12-11'), + (4, 3, 3, 4, 5.5, 6.6, 7.5, 8.5, 'o', 'k', '2023-12-11', '2023-12-09', '2023-12-10', 'a', 'b', 'yyyyyyyyy' ,'2023-12-11'), + (5, 2, 3, 6, 7.5, 8.5, 9.5, 10.5, 'k', 'o', '2023-12-12', '2023-12-12', '2023-12-13', 'c', 'd', 'xxxxxxxxx', '2023-12-12'), + (5, 2, 3, 6, 7.6, 8.5, 9.5, 10.5, 'k', 'o', '2023-12-12', '2023-12-12', '2023-12-13', 'c', 'd', 'xxxxxxxxx', '2023-12-12'); + """ + + sql """ + insert into orders values + (1, 1, 'o', 9.5, '2023-12-08', 'a', 'b', 1, 'yy','2023-12-08'), + (1, 1, 'o', 10.5, '2023-12-09', 'a', 'b', 1, 'yy','2023-12-09'), + (1, 1, 'o', 10.5, '2023-12-07', 'a', 'b', 1, 'yy','2023-12-07'), + (1, 1, 'o', 10.5, '2023-12-08', 'a', 'b', 1, 'yy','2023-12-08'), + (2, 1, 'o', 11.5, '2023-12-09', 'a', 'b', 1, 'yy','2023-12-09'), + (2, 1, 'o', 11.5, '2023-12-08', 'a', 'b', 1, 'yy','2023-12-08'), + (2, 1, 'o', 11.5, '2023-12-11', 'a', 'b', 1, 'yy','2023-12-11'), + (3, 1, 'o', 12.5, '2023-12-10', 'a', 'b', 1, 'yy','2023-12-10'), + (3, 1, 'o', 12.5, '2023-12-09', 'a', 'b', 1, 'yy','2023-12-09'), + (3, 1, 'o', 12.5, '2023-12-12', 'a', 'b', 1, 'yy','2023-12-12'), + (3, 1, 'o', 33.5, '2023-12-13', 'a', 'b', 1, 'yy','2023-12-13'), + (4, 2, 'o', 43.2, '2023-12-10', 'c','d',2, 'mm' ,'2023-12-10'), + (4, 2, 'o', 43.2, '2023-12-11', 'c','d',2, 'mm' ,'2023-12-11'), + (4, 2, 'o', 43.2, '2023-12-13', 'c','d',2, 'mm' ,'2023-12-13'), + (5, 2, 'o', 56.2, '2023-12-12', 'c','d',2, 'mi' ,'2023-12-12'), + (5, 2, 'o', 56.2, '2023-12-14', 'c','d',2, 'mi' ,'2023-12-14'), + (5, 2, 'o', 56.2, '2023-12-16', 'c','d',2, 'mi' ,'2023-12-16'), + (5, 2, 'o', 1.2, '2023-12-12', 'c','d',2, 'mi' ,'2023-12-12'); + """ + + sql """ + insert into partsupp values + (2, 3, 9, 10.01, 'supply1'), + (2, 3, 10, 11.01, 'supply2'); + """ + + sql """analyze table partsupp with sync""" + sql """analyze table lineitem with sync""" + sql """analyze table orders with sync""" + + // left self join + def mv1_0 = + """ + select l1.l_orderkey + from + lineitem l1 + left semi join + lineitem l2 on l1.l_orderkey = l2.l_orderkey and l1.l_shipdate <= l2.l_receiptdate and l1.l_extendedprice != l2.l_discount + """ + def query1_0 = + """ + select l1.l_orderkey + from + lineitem l1 + left semi join + lineitem l2 on l1.l_orderkey = l2.l_orderkey and l1.l_shipdate <= l2.l_receiptdate and l1.l_extendedprice != l2.l_discount; + """ + order_qt_query1_0_before "${query1_0}" + async_mv_rewrite_success(db, mv1_0, query1_0, "mv1_0") + order_qt_query1_0_after "${query1_0}" + sql """ DROP MATERIALIZED VIEW IF EXISTS mv1_0""" + + // right self join + def mv2_0 = + """ + select l2.l_orderkey + from + lineitem l1 + right semi join + lineitem l2 on l1.l_orderkey = l2.l_orderkey and l1.l_shipdate <= l2.l_receiptdate and l1.l_extendedprice != l2.l_discount + """ + def query2_0 = + """ + select l2.l_orderkey + from + lineitem l1 + right semi join + lineitem l2 on l1.l_orderkey = l2.l_orderkey and l1.l_shipdate <= l2.l_receiptdate and l1.l_extendedprice != l2.l_discount; + """ + order_qt_query2_0_before "${query2_0}" + async_mv_rewrite_success(db, mv2_0, query2_0, "mv2_0") + order_qt_query2_0_after "${query2_0}" + sql """ DROP MATERIALIZED VIEW IF EXISTS mv2_0""" + + // left semi join other conjuncts in join condition + def mv3_0 = + """ + select l_orderkey + from + lineitem + left semi join + orders on l_orderkey = o_orderkey and l_shipdate <= o_orderdate + left semi join partsupp on ps_partkey = l_partkey and l_orderkey != ps_availqty; + """ + def query3_0 = + """ + select l_orderkey + from + lineitem + left semi join + orders on l_orderkey = o_orderkey and l_shipdate <= o_orderdate + left semi join partsupp on ps_partkey = l_partkey and l_orderkey != ps_availqty; + """ + order_qt_query3_0_before "${query3_0}" + async_mv_rewrite_success(db, mv3_0, query3_0, "mv3_0") + order_qt_query3_0_after "${query3_0}" + sql """ DROP MATERIALIZED VIEW IF EXISTS mv3_0""" + + + def mv3_4 = + """ + select l_orderkey + from + lineitem + left semi join + orders on l_shipdate <= o_orderdate and l_orderkey = o_orderkey + left semi join partsupp on l_orderkey != ps_availqty and ps_partkey = l_partkey; + """ + def query3_4 = + """ + select l_orderkey + from + lineitem + left semi join + orders on l_shipdate <= o_orderdate and l_orderkey = o_orderkey + left semi join partsupp on l_orderkey != ps_availqty and ps_partkey = l_partkey; + """ + order_qt_query3_4_before "${query3_4}" + // other conjuncts is before equal conjuncts, should success + async_mv_rewrite_success(db, mv3_4, query3_4, "mv3_4") + order_qt_query3_4_after "${query3_4}" + sql """ DROP MATERIALIZED VIEW IF EXISTS mv3_4""" + + + def mv3_5 = + """ + select l_orderkey + from + lineitem + left semi join + orders on l_shipdate <= o_orderdate and l_orderkey = o_orderkey and lineitem.lo_orderdate <= orders.lo_orderdate + left semi join partsupp on l_orderkey != ps_availqty and ps_partkey = l_partkey; + """ + def query3_5 = + """ + select l_orderkey + from + lineitem + left semi join + orders on l_shipdate <= o_orderdate and l_orderkey = o_orderkey and lineitem.lo_orderdate <= orders.lo_orderdate + left semi join partsupp on l_orderkey != ps_availqty and ps_partkey = l_partkey; + """ + order_qt_query3_5_before "${query3_5}" + // other conjuncts has the same column name + async_mv_rewrite_success(db, mv3_5, query3_5, "mv3_5") + order_qt_query3_5_after "${query3_5}" + sql """ DROP MATERIALIZED VIEW IF EXISTS mv3_5""" + + def mv3_1 = + """ + select l_orderkey + from + lineitem + left semi join + orders on l_orderkey = o_orderkey and l_shipdate <= o_orderdate + left semi join partsupp on ps_partkey = l_partkey and l_orderkey != ps_availqty; + """ + def query3_1 = + """ + select l_orderkey + from + lineitem + left semi join + orders on l_orderkey = o_orderkey and l_shipdate < o_orderdate + left semi join partsupp on ps_partkey = l_partkey and l_orderkey != ps_availqty; + """ + order_qt_query3_1_before "${query3_1}" + async_mv_rewrite_fail(db, mv3_1, query3_1, "mv3_1") + order_qt_query3_1_after "${query3_1}" + sql """ DROP MATERIALIZED VIEW IF EXISTS mv3_1""" + + def mv3_2 = + """ + select l_orderkey + from + lineitem + left semi join + orders on l_orderkey = o_orderkey and l_shipdate <= o_orderdate + left semi join partsupp on ps_partkey = l_partkey and l_orderkey != ps_availqty; + """ + def query3_2 = + """ + select l_orderkey + from + lineitem + left semi join + orders on l_orderkey = o_orderkey + left semi join partsupp on ps_partkey = l_partkey; + """ + order_qt_query3_2_before "${query3_2}" + // mv has other conjuncts but query not + async_mv_rewrite_fail(db, mv3_2, query3_2, "mv3_2") + order_qt_query3_2_after "${query3_2}" + sql """ DROP MATERIALIZED VIEW IF EXISTS mv3_2""" + + def mv3_3 = + """ + select l_orderkey + from + lineitem + left semi join + orders on l_orderkey = o_orderkey + left semi join partsupp on ps_partkey = l_partkey; + """ + def query3_3 = + """ + select l_orderkey + from + lineitem + left semi join + orders on l_orderkey = o_orderkey and l_shipdate < o_orderdate + left semi join partsupp on ps_partkey = l_partkey and l_orderkey != ps_availqty; + """ + order_qt_query3_3_before "${query3_3}" + // query has other conjuncts but mv not + async_mv_rewrite_fail(db, mv3_3, query3_3, "mv3_3") + order_qt_query3_3_after "${query3_3}" + sql """ DROP MATERIALIZED VIEW IF EXISTS mv3_3""" + + + // right semi join other conjuncts in join condition + def mv4_0 = + """ + select l_orderkey + from + orders + right semi join lineitem on l_orderkey = o_orderkey and l_shipdate <= o_orderdate; + """ + def query4_0 = + """ + select l_orderkey + from + orders + right semi join lineitem on l_orderkey = o_orderkey and l_shipdate <= o_orderdate; + """ + order_qt_query4_0_before "${query4_0}" + async_mv_rewrite_success(db, mv4_0, query4_0, "mv4_0") + order_qt_query4_0_after "${query4_0}" + sql """ DROP MATERIALIZED VIEW IF EXISTS mv4_0""" + + + def mv4_1 = + """ + select l_orderkey + from + orders + right semi join lineitem on l_orderkey = o_orderkey and l_shipdate <= o_orderdate; + """ + def query4_1 = + """ + select l_orderkey + from + orders + right semi join lineitem on l_orderkey = o_orderkey and l_shipdate < o_orderdate; + """ + order_qt_query4_1_before "${query4_1}" + async_mv_rewrite_fail(db, mv4_1, query4_1, "mv4_1") + order_qt_query4_1_after "${query4_1}" + sql """ DROP MATERIALIZED VIEW IF EXISTS mv4_1""" + + + def mv4_2 = + """ + select l_orderkey + from + orders + right semi join lineitem on l_orderkey = o_orderkey and l_shipdate <= o_orderdate; + """ + def query4_2 = + """ + select l_orderkey + from + orders + right semi join lineitem on l_orderkey = o_orderkey; + """ + order_qt_query4_2_before "${query4_2}" + // mv has other conjuncts but query not + async_mv_rewrite_fail(db, mv4_2, query4_2, "mv4_2") + order_qt_query4_2_after "${query4_2}" + sql """ DROP MATERIALIZED VIEW IF EXISTS mv4_2""" + + + def mv4_3 = + """ + select l_orderkey + from + orders + right semi join lineitem on l_orderkey = o_orderkey; + """ + def query4_3 = + """ + select l_orderkey + from + orders + right semi join lineitem on l_orderkey = o_orderkey and l_shipdate < o_orderdate; + """ + order_qt_query4_3_before "${query4_3}" + // query has other conjuncts but mv not + async_mv_rewrite_fail(db, mv4_3, query4_3, "mv4_3") + order_qt_query4_3_after "${query4_3}" + sql """ DROP MATERIALIZED VIEW IF EXISTS mv4_3""" + + + def mv4_4 = + """ + select l_orderkEY + from + orders + right semi join lineitem on l_orderkey = o_orderkey and l_shipDate <= o_orderDate; + """ + def query4_4 = + """ + select l_orderkey + from + orders + right semi join lineitem on l_orderkey = o_orderkey and l_shipdate <= o_orderdate; + """ + order_qt_query4_4_before "${query4_4}" + // Case sensitivity of column names in query and mv, should success + async_mv_rewrite_success(db, mv4_4, query4_4, "mv4_4") + order_qt_query4_4_after "${query4_4}" + sql """ DROP MATERIALIZED VIEW IF EXISTS mv4_4""" + + + + def mv4_5 = + """ + select l_orderkEY + from + orders + right semi join lineitem on l_orderkey = o_orderkey and date_trunc(l_shipDate, 'day') <= o_orderDate; + """ + def query4_5 = + """ + select l_orderkey + from + orders + right semi join lineitem on l_orderkey = o_orderkey and date_trunc(l_shipdate, 'day') <= o_orderdate; + """ + order_qt_query4_5_before "${query4_5}" + // Complex expressions + async_mv_rewrite_success(db, mv4_5, query4_5, "mv4_5") + order_qt_query4_5_after "${query4_5}" + sql """ DROP MATERIALIZED VIEW IF EXISTS mv4_5""" +} diff --git a/regression-test/suites/nereids_rules_p0/mv/tpch/mv_tpch_test.groovy b/regression-test/suites/nereids_rules_p0/mv/tpch/mv_tpch_test.groovy index 2e89a2124117e9..6d5524bffaa915 100644 --- a/regression-test/suites/nereids_rules_p0/mv/tpch/mv_tpch_test.groovy +++ b/regression-test/suites/nereids_rules_p0/mv/tpch/mv_tpch_test.groovy @@ -181,7 +181,6 @@ suite("mv_tpch_test") { n_name, s_name, p_partkey - LIMIT 100; """ def query2 = """ SELECT @@ -282,7 +281,7 @@ suite("mv_tpch_test") { ORDER BY revenue DESC, o_orderdate - LIMIT 10; + LIMIT 10; """ // contains limit, doesn't support now order_qt_query3_before "${query3}" @@ -291,6 +290,60 @@ suite("mv_tpch_test") { sql """ DROP MATERIALIZED VIEW IF EXISTS mv3""" + def mv3_1 = """ + SELECT + l_orderkey, + sum(l_extendedprice * (1 - l_discount)) AS revenue, + o_orderdate, + o_shippriority + FROM + customer, + orders, + lineitem + WHERE + c_mktsegment = 'BUILDING' + AND c_custkey = o_custkey + AND l_orderkey = o_orderkey + AND o_orderdate < DATE '1995-03-15' + AND l_shipdate > DATE '1995-03-15' + GROUP BY + l_orderkey, + o_orderdate, + o_shippriority + ORDER BY + revenue DESC, + o_orderdate + """ + def query3_1 = """ + SELECT + l_orderkey, + sum(l_extendedprice * (1 - l_discount)) AS revenue, + o_orderdate, + o_shippriority + FROM + customer, + orders, + lineitem + WHERE + c_mktsegment = 'BUILDING' + AND c_custkey = o_custkey + AND l_orderkey = o_orderkey + AND o_orderdate < DATE '1995-03-15' + AND l_shipdate > DATE '1995-03-15' + GROUP BY + l_orderkey, + o_orderdate, + o_shippriority + ORDER BY + revenue DESC, + o_orderdate + LIMIT 10; + """ + order_qt_query3_1_before "${query3_1}" + async_mv_rewrite_success(db, mv3_1, query3_1, "mv3_1") + order_qt_query3_1_after "${query3_1}" + sql """ DROP MATERIALIZED VIEW IF EXISTS mv3_1""" + def mv4 = """ SELECT o_orderpriority, @@ -309,7 +362,7 @@ suite("mv_tpch_test") { GROUP BY o_orderpriority ORDER BY - o_orderpriority + o_orderpriority """ def query4 = """ SELECT @@ -329,7 +382,7 @@ suite("mv_tpch_test") { GROUP BY o_orderpriority ORDER BY - o_orderpriority + o_orderpriority """ // contains subquery, doesn't support now order_qt_query4_before "${query4}" @@ -362,7 +415,7 @@ suite("mv_tpch_test") { GROUP BY n_name ORDER BY - revenue DESC + revenue DESC """ def query5 = """ SELECT @@ -388,7 +441,7 @@ suite("mv_tpch_test") { GROUP BY n_name ORDER BY - revenue DESC + revenue DESC """ order_qt_query5_before "${query5}" async_mv_rewrite_success(db, mv5, query5, "mv5") @@ -414,7 +467,7 @@ suite("mv_tpch_test") { l_shipdate >= DATE '1994-01-01' AND l_shipdate < DATE '1994-01-01' + INTERVAL '1' YEAR AND l_discount BETWEEN 0.06 - 0.01 AND .06 + 0.01 - AND l_quantity < 24 + AND l_quantity < 24 """ order_qt_query6_before "${query6}" async_mv_rewrite_success(db, mv6, query6, "mv6") @@ -460,7 +513,7 @@ suite("mv_tpch_test") { ORDER BY supp_nation, cust_nation, - l_year + l_year """ def query7 = """ SELECT @@ -500,11 +553,10 @@ suite("mv_tpch_test") { ORDER BY supp_nation, cust_nation, - l_year + l_year """ - // contains subquery, doesn't support now order_qt_query7_before "${query7}" - async_mv_rewrite_fail(db, mv7, query7, "mv7") + async_mv_rewrite_success(db, mv7, query7, "mv7") order_qt_query7_after "${query7}" sql """ DROP MATERIALIZED VIEW IF EXISTS mv7""" @@ -546,7 +598,7 @@ suite("mv_tpch_test") { GROUP BY o_year ORDER BY - o_year + o_year """ def query8 = """ SELECT @@ -585,7 +637,7 @@ suite("mv_tpch_test") { GROUP BY o_year ORDER BY - o_year + o_year """ order_qt_query8_before "${query8}" async_mv_rewrite_success(db, mv8, query8, "mv8") @@ -624,7 +676,7 @@ suite("mv_tpch_test") { o_year ORDER BY nation, - o_year DESC + o_year DESC """ def query9 = """ SELECT @@ -657,7 +709,7 @@ suite("mv_tpch_test") { o_year ORDER BY nation, - o_year DESC + o_year DESC """ order_qt_query9_before "${query9}" async_mv_rewrite_success(db, mv9, query9, "mv9") @@ -697,7 +749,7 @@ suite("mv_tpch_test") { c_comment ORDER BY revenue DESC - LIMIT 20 + LIMIT 20 """ def query10 = """ SELECT @@ -731,7 +783,7 @@ suite("mv_tpch_test") { c_comment ORDER BY revenue DESC - LIMIT 20 + LIMIT 20 """ // contains limit, doesn't support now order_qt_query10_before "${query10}" @@ -740,6 +792,78 @@ suite("mv_tpch_test") { sql """ DROP MATERIALIZED VIEW IF EXISTS mv10""" + def mv10_1 = """ + SELECT + c_custkey, + c_name, + sum(l_extendedprice * (1 - l_discount)) AS revenue, + c_acctbal, + n_name, + c_address, + c_phone, + c_comment + FROM + customer, + orders, + lineitem, + nation + WHERE + c_custkey = o_custkey + AND l_orderkey = o_orderkey + AND o_orderdate >= DATE '1993-10-01' + AND o_orderdate < DATE '1993-10-01' + INTERVAL '3' MONTH + AND l_returnflag = 'R' + AND c_nationkey = n_nationkey + GROUP BY + c_custkey, + c_name, + c_acctbal, + c_phone, + n_name, + c_address, + c_comment + ORDER BY + revenue DESC; + """ + def query10_1 = """ + SELECT + c_custkey, + c_name, + sum(l_extendedprice * (1 - l_discount)) AS revenue, + c_acctbal, + n_name, + c_address, + c_phone, + c_comment + FROM + customer, + orders, + lineitem, + nation + WHERE + c_custkey = o_custkey + AND l_orderkey = o_orderkey + AND o_orderdate >= DATE '1993-10-01' + AND o_orderdate < DATE '1993-10-01' + INTERVAL '3' MONTH + AND l_returnflag = 'R' + AND c_nationkey = n_nationkey + GROUP BY + c_custkey, + c_name, + c_acctbal, + c_phone, + n_name, + c_address, + c_comment + ORDER BY + revenue DESC + LIMIT 20; + """ + order_qt_query10_1_before "${query10_1}" + async_mv_rewrite_success(db, mv10_1, query10_1, "mv10_1") + order_qt_query10_1_after "${query10_1}" + sql """ DROP MATERIALIZED VIEW IF EXISTS mv10_1""" + def mv11 = """ SELECT ps_partkey, @@ -767,7 +891,7 @@ suite("mv_tpch_test") { AND n_name = 'GERMANY' ) ORDER BY - value DESC + value DESC """ def query11 = """ SELECT @@ -796,7 +920,7 @@ suite("mv_tpch_test") { AND n_name = 'GERMANY' ) ORDER BY - value DESC + value DESC """ // contains subquery, doesn't support now order_qt_query11_before "${query11}" @@ -863,7 +987,7 @@ suite("mv_tpch_test") { GROUP BY l_shipmode ORDER BY - l_shipmode + l_shipmode """ order_qt_query12_before "${query12}" async_mv_rewrite_success(db, mv12, query12, "mv12") @@ -913,7 +1037,7 @@ suite("mv_tpch_test") { c_count ORDER BY custdist DESC, - c_count DESC + c_count DESC """ // when aggregate rewrite, should only contains one aggregate order_qt_query13_before "${query13}" @@ -948,7 +1072,7 @@ suite("mv_tpch_test") { WHERE l_partkey = p_partkey AND l_shipdate >= DATE '1995-09-01' - AND l_shipdate < DATE '1995-09-01' + INTERVAL '1' MONTH + AND l_shipdate < DATE '1995-09-01' + INTERVAL '1' MONTH """ order_qt_query14_before "${query14}" async_mv_rewrite_success(db, mv14, query14, "mv14") @@ -994,7 +1118,7 @@ suite("mv_tpch_test") { revenue1 ) ORDER BY - s_suppkey; + s_suppkey; """ // revenue1 in materialized view is view, can not create materialized view support now // order_qt_query15_before "${query15}" @@ -1063,7 +1187,7 @@ suite("mv_tpch_test") { supplier_cnt DESC, p_brand, p_type, - p_size + p_size """ // contains subquery, doesn't support now order_qt_query16_before "${query16}" @@ -1104,7 +1228,7 @@ suite("mv_tpch_test") { lineitem WHERE l_partkey = p_partkey - ) + ) """ // contains subquery, doesn't support now order_qt_query17_before "${query17}" @@ -1146,7 +1270,7 @@ suite("mv_tpch_test") { ORDER BY o_totalprice DESC, o_orderdate - LIMIT 100 + LIMIT 100 """ def query18 = """ SELECT @@ -1181,7 +1305,7 @@ suite("mv_tpch_test") { ORDER BY o_totalprice DESC, o_orderdate - LIMIT 100 + LIMIT 100 """ // contains limit, doesn't support now order_qt_query18_before "${query18}" @@ -1190,6 +1314,81 @@ suite("mv_tpch_test") { sql """ DROP MATERIALIZED VIEW IF EXISTS mv18""" + def mv18_1 = """ + SELECT + c_name, + c_custkey, + o_orderkey, + o_orderdate, + o_totalprice, + sum(l_quantity) + FROM + customer, + orders, + lineitem + WHERE + o_orderkey IN ( + SELECT l_orderkey + FROM + lineitem + GROUP BY + l_orderkey + HAVING + sum(l_quantity) > 300 + ) + AND c_custkey = o_custkey + AND o_orderkey = l_orderkey + GROUP BY + c_name, + c_custkey, + o_orderkey, + o_orderdate, + o_totalprice + ORDER BY + o_totalprice DESC, + o_orderdate + """ + def query18_1 = """ + SELECT + c_name, + c_custkey, + o_orderkey, + o_orderdate, + o_totalprice, + sum(l_quantity) + FROM + customer, + orders, + lineitem + WHERE + o_orderkey IN ( + SELECT l_orderkey + FROM + lineitem + GROUP BY + l_orderkey + HAVING + sum(l_quantity) > 300 + ) + AND c_custkey = o_custkey + AND o_orderkey = l_orderkey + GROUP BY + c_name, + c_custkey, + o_orderkey, + o_orderdate, + o_totalprice + ORDER BY + o_totalprice DESC, + o_orderdate + LIMIT 100 + """ + order_qt_query18_1_before "${query18_1}" + async_mv_rewrite_success(db, mv18_1, query18, "mv18_1") + order_qt_query18_1_after "${query18_1}" + sql """ DROP MATERIALIZED VIEW IF EXISTS mv18_1""" + + def mv19 = """ SELECT sum(l_extendedprice * (1 - l_discount)) AS revenue FROM @@ -1260,11 +1459,10 @@ suite("mv_tpch_test") { AND p_size BETWEEN 1 AND 15 AND l_shipmode IN ('AIR', 'AIR REG') AND l_shipinstruct = 'DELIVER IN PERSON' - ) + ) """ - // join condition is not conjunctions, doesn't support now order_qt_query19_before "${query19}" - async_mv_rewrite_fail(db, mv19, query19, "mv19") + async_mv_rewrite_success(db, mv19, query19, "mv19") order_qt_query19_after "${query19}" sql """ DROP MATERIALIZED VIEW IF EXISTS mv19""" @@ -1335,11 +1533,10 @@ suite("mv_tpch_test") { ) AND s_nationkey = n_nationkey AND n_name = 'CANADA' - ORDER BY s_name + ORDER BY s_name """ - // contains subquery, doesn't support now order_qt_query20_before "${query20}" - async_mv_rewrite_fail(db, mv20, query20, "mv20") + async_mv_rewrite_success(db, mv20, query20, "mv20") order_qt_query20_after "${query20}" sql """ DROP MATERIALIZED VIEW IF EXISTS mv20""" @@ -1382,7 +1579,7 @@ suite("mv_tpch_test") { ORDER BY numwait DESC, s_name - LIMIT 100 + LIMIT 100 """ def query21 = """ SELECT @@ -1422,7 +1619,7 @@ suite("mv_tpch_test") { ORDER BY numwait DESC, s_name - LIMIT 100 + LIMIT 100 """ // contains limit, doesn't support now order_qt_query21_before "${query21}" @@ -1431,6 +1628,91 @@ suite("mv_tpch_test") { sql """ DROP MATERIALIZED VIEW IF EXISTS mv21""" + def mv21_1 = """ + SELECT + s_name, + count(*) AS numwait + FROM + supplier, + lineitem l1, + orders, + nation + WHERE + s_suppkey = l1.l_suppkey + AND o_orderkey = l1.l_orderkey + AND o_orderstatus = 'F' + AND l1.l_receiptdate > l1.l_commitdate + AND exists( + SELECT * + FROM + lineitem l2 + WHERE + l2.l_orderkey = l1.l_orderkey + AND l2.l_suppkey <> l1.l_suppkey + ) + AND NOT exists( + SELECT * + FROM + lineitem l3 + WHERE + l3.l_orderkey = l1.l_orderkey + AND l3.l_suppkey <> l1.l_suppkey + AND l3.l_receiptdate > l3.l_commitdate + ) + AND s_nationkey = n_nationkey + AND n_name = 'SAUDI ARABIA' + GROUP BY + s_name + ORDER BY + numwait DESC, + s_name; + """ + def query21_1 = """ + SELECT + s_name, + count(*) AS numwait + FROM + supplier, + lineitem l1, + orders, + nation + WHERE + s_suppkey = l1.l_suppkey + AND o_orderkey = l1.l_orderkey + AND o_orderstatus = 'F' + AND l1.l_receiptdate > l1.l_commitdate + AND exists( + SELECT * + FROM + lineitem l2 + WHERE + l2.l_orderkey = l1.l_orderkey + AND l2.l_suppkey <> l1.l_suppkey + ) + AND NOT exists( + SELECT * + FROM + lineitem l3 + WHERE + l3.l_orderkey = l1.l_orderkey + AND l3.l_suppkey <> l1.l_suppkey + AND l3.l_receiptdate > l3.l_commitdate + ) + AND s_nationkey = n_nationkey + AND n_name = 'SAUDI ARABIA' + GROUP BY + s_name + ORDER BY + numwait DESC, + s_name + LIMIT 100 + """ + order_qt_query21_1_before "${query21_1}" + // complex join has not support yet, support in future + async_mv_rewrite_success(db, mv21_1, query21_1, "mv21_1") + order_qt_query21_1_after "${query21_1}" + sql """ DROP MATERIALIZED VIEW IF EXISTS mv21_1""" + def mv22 = """ SELECT cntrycode, @@ -1501,11 +1783,10 @@ suite("mv_tpch_test") { GROUP BY cntrycode ORDER BY - cntrycode + cntrycode """ - // contains subquery, doesn't support now order_qt_query22_before "${query22}" - async_mv_rewrite_fail(db, mv22, query22, "mv22") + async_mv_rewrite_success(db, mv22, query22, "mv22") order_qt_query22_after "${query22}" sql """ DROP MATERIALIZED VIEW IF EXISTS mv22""" } diff --git a/regression-test/suites/nereids_rules_p0/mv/union_rewrite/partition_curd_union_rewrite.groovy b/regression-test/suites/nereids_rules_p0/mv/union_rewrite/partition_curd_union_rewrite.groovy index 2b00c8200d2589..acefb10021833a 100644 --- a/regression-test/suites/nereids_rules_p0/mv/union_rewrite/partition_curd_union_rewrite.groovy +++ b/regression-test/suites/nereids_rules_p0/mv/union_rewrite/partition_curd_union_rewrite.groovy @@ -81,17 +81,32 @@ suite ("partition_curd_union_rewrite") { sql""" insert into orders values (1, 1, 'ok', 99.5, '2023-10-17', 'a', 'b', 1, 'yy'), + (1, 1, 'ok', 99.5, '2023-10-17', 'a', 'b', 1, 'yy'), + (1, 1, 'ok', 99.5, '2023-10-17', 'a', 'b', 1, 'yy'), + (2, 2, 'ok', 109.2, '2023-10-18', 'c','d',2, 'mm'), (2, 2, 'ok', 109.2, '2023-10-18', 'c','d',2, 'mm'), + (2, 2, 'ok', 109.2, '2023-10-18', 'c','d',2, 'mm'), + (3, 3, 'ok', 99.5, '2023-10-19', 'a', 'b', 1, 'yy'), + (3, 3, 'ok', 99.5, '2023-10-19', 'a', 'b', 1, 'yy'), (3, 3, 'ok', 99.5, '2023-10-19', 'a', 'b', 1, 'yy'); """ sql """ insert into lineitem values (1, 2, 3, 4, 5.5, 6.5, 7.5, 8.5, 'o', 'k', '2023-10-17', '2023-10-17', '2023-10-17', 'a', 'b', 'yyyyyyyyy'), + (1, 2, 3, 4, 5.5, 6.5, 7.5, 8.5, 'o', 'k', '2023-10-17', '2023-10-17', '2023-10-17', 'a', 'b', 'yyyyyyyyy'), + (1, 2, 3, 4, 5.5, 6.5, 7.5, 8.5, 'o', 'k', '2023-10-17', '2023-10-17', '2023-10-17', 'a', 'b', 'yyyyyyyyy'), + (2, 2, 3, 4, 5.5, 6.5, 7.5, 8.5, 'o', 'k', '2023-10-18', '2023-10-18', '2023-10-18', 'a', 'b', 'yyyyyyyyy'), (2, 2, 3, 4, 5.5, 6.5, 7.5, 8.5, 'o', 'k', '2023-10-18', '2023-10-18', '2023-10-18', 'a', 'b', 'yyyyyyyyy'), + (2, 2, 3, 4, 5.5, 6.5, 7.5, 8.5, 'o', 'k', '2023-10-18', '2023-10-18', '2023-10-18', 'a', 'b', 'yyyyyyyyy'), + (3, 2, 3, 6, 7.5, 8.5, 9.5, 10.5, 'k', 'o', '2023-10-19', '2023-10-19', '2023-10-19', 'c', 'd', 'xxxxxxxxx'), + (3, 2, 3, 6, 7.5, 8.5, 9.5, 10.5, 'k', 'o', '2023-10-19', '2023-10-19', '2023-10-19', 'c', 'd', 'xxxxxxxxx'), (3, 2, 3, 6, 7.5, 8.5, 9.5, 10.5, 'k', 'o', '2023-10-19', '2023-10-19', '2023-10-19', 'c', 'd', 'xxxxxxxxx'); """ + sql """analyze table orders with sync;""" + sql """analyze table lineitem with sync;""" + def mv_def_sql = """ select l_shipdate, o_orderdate, l_partkey, diff --git a/regression-test/suites/nereids_rules_p0/mv/variant/variant_mv.groovy b/regression-test/suites/nereids_rules_p0/mv/variant/variant_mv.groovy index 0d0415456f726f..866f82af156c69 100644 --- a/regression-test/suites/nereids_rules_p0/mv/variant/variant_mv.groovy +++ b/regression-test/suites/nereids_rules_p0/mv/variant/variant_mv.groovy @@ -415,8 +415,7 @@ suite("variant_mv") { where g2.actor['id'] > 34259289 and cast(g1.actor['id'] as int) + cast(g2.repo['id'] as int) > 80000000; """ order_qt_query3_0_before "${query3_0}" - // condition in join other conjuects is not supported now, suppport later -// async_mv_rewrite_success(db, mv3_0, query3_0, "mv3_0") + async_mv_rewrite_success(db, mv3_0, query3_0, "mv3_0") order_qt_query3_0_after "${query3_0}" sql """ DROP MATERIALIZED VIEW IF EXISTS mv3_0""" @@ -554,8 +553,7 @@ suite("variant_mv") { where g2.actor['id'] > 34259300 and cast(g1.actor['id'] as int) + cast(g2.repo['id'] as int) > 80000000; """ order_qt_query3_4_before "${query3_4}" - // condition in join other conjuects is not supported now, suppport later -// async_mv_rewrite_success(db, mv3_4, query3_4, "mv3_4") + async_mv_rewrite_success(db, mv3_4, query3_4, "mv3_4") order_qt_query3_4_after "${query3_4}" sql """ DROP MATERIALIZED VIEW IF EXISTS mv3_4""" diff --git a/regression-test/suites/nereids_syntax_p0/mv/aggregate/agg_sync_mv.groovy b/regression-test/suites/nereids_syntax_p0/mv/aggregate/agg_sync_mv.groovy index 17142d8eda0dc7..9ee0610e5e5397 100644 --- a/regression-test/suites/nereids_syntax_p0/mv/aggregate/agg_sync_mv.groovy +++ b/regression-test/suites/nereids_syntax_p0/mv/aggregate/agg_sync_mv.groovy @@ -25,10 +25,7 @@ suite("agg_sync_mv") { qt_select_any_value """select id, any_value(kint) from agg_mv_test group by id order by id;""" sql """drop materialized view if exists mv_sync1 on agg_mv_test;""" createMV("""create materialized view mv_sync1 as select id, any_value(kint) from agg_mv_test group by id order by id;""") - explain { - sql("select id, any_value(kint) from agg_mv_test group by id order by id;") - contains "(mv_sync1)" - } + mv_rewrite_success("select id, any_value(kint) from agg_mv_test group by id order by id;", "mv_sync1") qt_select_any_value_mv """select id, any_value(kint) from agg_mv_test group by id order by id;""" // sum_foreach is not supported in old planner @@ -50,299 +47,200 @@ suite("agg_sync_mv") { qt_select_collect_set """select id, collect_set(kint) from agg_mv_test group by id order by id;""" sql """drop materialized view if exists mv_sync4 on agg_mv_test;""" createMV("""create materialized view mv_sync4 as select id, collect_set(kint) from agg_mv_test group by id order by id;""") - explain { - sql("select id, collect_set(kint) from agg_mv_test group by id order by id;") - contains "(mv_sync4)" - } + mv_rewrite_success("select id, collect_set(kint) from agg_mv_test group by id order by id;", "mv_sync4") qt_select_collect_set_mv """select id, collect_set(kint) from agg_mv_test group by id order by id;""" qt_select_collect_list """select id, collect_list(kint) from agg_mv_test group by id order by id;""" sql """drop materialized view if exists mv_sync5 on agg_mv_test;""" createMV("""create materialized view mv_sync5 as select id, collect_list(kint) from agg_mv_test group by id order by id;""") - explain { - sql("select id, collect_list(kint) from agg_mv_test group by id order by id;") - contains "(mv_sync5)" - } + mv_rewrite_success("select id, collect_list(kint) from agg_mv_test group by id order by id;", "mv_sync5") qt_select_collect_list_mv """select id, collect_list(kint) from agg_mv_test group by id order by id;""" qt_select_corr """select id, corr(kint, kbint) from agg_mv_test group by id order by id;""" sql """drop materialized view if exists mv_sync6 on agg_mv_test;""" createMV("""create materialized view mv_sync6 as select id, corr(kint, kbint) from agg_mv_test group by id order by id;""") - explain { - sql("select id, corr(kint, kbint) from agg_mv_test group by id order by id;") - contains "(mv_sync6)" - } + mv_rewrite_success("select id, corr(kint, kbint) from agg_mv_test group by id order by id;", "mv_sync6") qt_select_corr_mv """select id, corr(kint, kbint) from agg_mv_test group by id order by id;""" qt_select_percentile_array """select id, percentile_array(kint, [0.5,0.55,0.805]) from agg_mv_test group by id order by id;""" sql """drop materialized view if exists mv_sync7 on agg_mv_test;""" createMV("""create materialized view mv_sync7 as select id, percentile_array(kint, [0.5,0.55,0.805]) from agg_mv_test group by id order by id;""") - explain { - sql("select id, percentile_array(kint, [0.5,0.55,0.805]) from agg_mv_test group by id order by id;") - contains "(mv_sync7)" - } + mv_rewrite_success("select id, percentile_array(kint, [0.5,0.55,0.805]) from agg_mv_test group by id order by id;", "mv_sync7") qt_select_percentile_array_mv """select id, percentile_array(kint, [0.5,0.55,0.805]) from agg_mv_test group by id order by id;""" qt_select_quantile_union """select id, quantile_union(to_quantile_state(kbint, 2048)) from agg_mv_test group by id order by id;""" sql """drop materialized view if exists mv_sync8 on agg_mv_test;""" createMV("""create materialized view mv_sync8 as select id, quantile_union(to_quantile_state(kbint, 2048)) from agg_mv_test group by id order by id;""") - explain { - sql("select id, quantile_union(to_quantile_state(kbint, 2048)) from agg_mv_test group by id order by id;") - contains "(mv_sync8)" - } + mv_rewrite_success("select id, quantile_union(to_quantile_state(kbint, 2048)) from agg_mv_test group by id order by id;", "mv_sync8") qt_select_quantile_union_mv """select id, quantile_union(to_quantile_state(kbint, 2048)) from agg_mv_test group by id order by id;""" qt_select_count_by_enum """select id, count_by_enum(kstr) from agg_mv_test group by id order by id;""" sql """drop materialized view if exists mv_sync9 on agg_mv_test;""" createMV("""create materialized view mv_sync9 as select id, count_by_enum(kstr) from agg_mv_test group by id order by id;""") - explain { - sql("select id, count_by_enum(kstr) from agg_mv_test group by id order by id;") - contains "(mv_sync9)" - } + mv_rewrite_success("select id, count_by_enum(kstr) from agg_mv_test group by id order by id;", "mv_sync9") qt_select_count_by_enum_mv """select id, count_by_enum(kstr) from agg_mv_test group by id order by id;""" qt_select_avg_weighted """select id, avg_weighted(ktint, kdbl) from agg_mv_test group by id order by id;""" sql """drop materialized view if exists mv_sync10 on agg_mv_test;""" createMV("""create materialized view mv_sync10 as select id, avg_weighted(ktint, kdbl) from agg_mv_test group by id order by id;""") - explain { - sql("select id, avg_weighted(ktint, kdbl) from agg_mv_test group by id order by id;") - contains "(mv_sync10)" - } + mv_rewrite_success("select id, avg_weighted(ktint, kdbl) from agg_mv_test group by id order by id;", "mv_sync10") qt_select_avg_weighted_mv """select id, avg_weighted(ktint, kdbl) from agg_mv_test group by id order by id;""" qt_select_bitmap_intersect """select id, bitmap_intersect(bitmap_hash(kbint)) from agg_mv_test group by id order by id;""" sql """drop materialized view if exists mv_sync11 on agg_mv_test;""" createMV("""create materialized view mv_sync11 as select id, bitmap_intersect(bitmap_hash(kbint)) from agg_mv_test group by id order by id;""") - explain { - sql("select id, bitmap_intersect(bitmap_hash(kbint)) from agg_mv_test group by id order by id;") - contains "(mv_sync11)" - } + mv_rewrite_success("select id, bitmap_intersect(bitmap_hash(kbint)) from agg_mv_test group by id order by id;", "mv_sync11") qt_select_bitmap_intersect_mv """select id, bitmap_intersect(bitmap_hash(kbint)) from agg_mv_test group by id order by id;""" qt_select_bitmap_agg """select id, bitmap_agg(kint) from agg_mv_test group by id order by id;""" sql """drop materialized view if exists mv_sync12 on agg_mv_test;""" createMV("""create materialized view mv_sync12 as select id, bitmap_agg(kint) from agg_mv_test group by id order by id;""") - explain { - sql("select id, bitmap_agg(kint) from agg_mv_test group by id order by id;") - contains "(mv_sync12)" - } + mv_rewrite_success("select id, bitmap_agg(kint) from agg_mv_test group by id order by id;", "mv_sync12") qt_select_bitmap_agg_mv """select id, bitmap_agg(kint) from agg_mv_test group by id order by id;""" qt_select_bitmap_union """select id, bitmap_union(bitmap_hash(kbint)) from agg_mv_test group by id order by id;""" sql """drop materialized view if exists mv_sync13 on agg_mv_test;""" createMV("""create materialized view mv_sync13 as select id, bitmap_union(bitmap_hash(kbint)) from agg_mv_test group by id order by id;""") - explain { - sql("select id, bitmap_union(bitmap_hash(kbint)) from agg_mv_test group by id order by id;") - contains "(mv_sync13)" - } + mv_rewrite_success("select id, bitmap_union(bitmap_hash(kbint)) from agg_mv_test group by id order by id;", "mv_sync13") qt_select_bitmap_union_mv """select id, bitmap_union(bitmap_hash(kbint)) from agg_mv_test group by id order by id;""" qt_select_bitmap_union_count """select id, bitmap_union_count(bitmap_hash(kbint)) from agg_mv_test group by id order by id;""" sql """drop materialized view if exists mv_sync14 on agg_mv_test;""" createMV("""create materialized view mv_sync14 as select id, bitmap_union_count(bitmap_hash(kbint)) from agg_mv_test group by id order by id;""") - explain { - sql("select id, bitmap_union_count(bitmap_hash(kbint)) from agg_mv_test group by id order by id;") - contains "(mv_sync14)" - } + mv_rewrite_success("select id, bitmap_union_count(bitmap_hash(kbint)) from agg_mv_test group by id order by id;", "mv_sync14") qt_select_bitmap_union_count_mv """select id, bitmap_union_count(bitmap_hash(kbint)) from agg_mv_test group by id order by id;""" qt_select_bitmap_union_int """select id, bitmap_union_int(kint) from agg_mv_test group by id order by id;""" sql """drop materialized view if exists mv_sync15 on agg_mv_test;""" createMV("""create materialized view mv_sync15 as select id, bitmap_union_int(kint) from agg_mv_test group by id order by id;""") - explain { - sql("select id, bitmap_union_int(kint) from agg_mv_test group by id order by id;") - contains "(mv_sync15)" - } + mv_rewrite_success("select id, bitmap_union_int(kint) from agg_mv_test group by id order by id;", "mv_sync15") qt_select_bitmap_union_int_mv """select id, bitmap_union_int(kint) from agg_mv_test group by id order by id;""" qt_select_group_array_intersect """select id, group_array_intersect(kaint) from agg_mv_test group by id order by id;""" sql """drop materialized view if exists mv_sync16 on agg_mv_test;""" createMV("""create materialized view mv_sync16 as select id, group_array_intersect(kaint) from agg_mv_test group by id order by id;""") - explain { - sql("select id, group_array_intersect(kaint) from agg_mv_test group by id order by id;") - contains "(mv_sync16)" - } + mv_rewrite_success("select id, group_array_intersect(kaint) from agg_mv_test group by id order by id;", "mv_sync16") qt_select_group_array_intersect_mv """select id, group_array_intersect(kaint) from agg_mv_test group by id order by id;""" qt_select_group_bit_and """select id, group_bit_and(kint) from agg_mv_test group by id order by id;""" sql """drop materialized view if exists mv_sync17 on agg_mv_test;""" createMV("""create materialized view mv_sync17 as select id, group_bit_and(kint) from agg_mv_test group by id order by id;""") - explain { - sql("select id, group_bit_and(kint) from agg_mv_test group by id order by id;") - contains "(mv_sync17)" - } + mv_rewrite_success("select id, group_bit_and(kint) from agg_mv_test group by id order by id;", "mv_sync17") qt_select_group_bit_and_mv """select id, group_bit_and(kint) from agg_mv_test group by id order by id;""" qt_select_group_bit_or """select id, group_bit_or(kint) from agg_mv_test group by id order by id;""" sql """drop materialized view if exists mv_sync18 on agg_mv_test;""" createMV("""create materialized view mv_sync18 as select id, group_bit_or(kint) from agg_mv_test group by id order by id;""") - explain { - sql("select id, group_bit_or(kint) from agg_mv_test group by id order by id;") - contains "(mv_sync18)" - } + mv_rewrite_success("select id, group_bit_or(kint) from agg_mv_test group by id order by id;", "mv_sync18") qt_select_group_bit_or_mv """select id, group_bit_or(kint) from agg_mv_test group by id order by id;""" qt_select_group_bit_xor """select id, group_bit_xor(kint) from agg_mv_test group by id order by id;""" sql """drop materialized view if exists mv_sync19 on agg_mv_test;""" createMV("""create materialized view mv_sync19 as select id, group_bit_xor(kint) from agg_mv_test group by id order by id;""") - explain { - sql("select id, group_bit_xor(kint) from agg_mv_test group by id order by id;") - contains "(mv_sync19)" - } + mv_rewrite_success("select id, group_bit_xor(kint) from agg_mv_test group by id order by id;", "mv_sync19") qt_select_group_bit_xor_mv """select id, group_bit_xor(kint) from agg_mv_test group by id order by id;""" qt_select_group_bitmap_xor """select id, group_bitmap_xor(bitmap_hash(kbint)) from agg_mv_test group by id order by id;""" sql """drop materialized view if exists mv_sync20 on agg_mv_test;""" createMV("""create materialized view mv_sync20 as select id, group_bitmap_xor(bitmap_hash(kbint)) from agg_mv_test group by id order by id;""") - explain { - sql("select id, group_bitmap_xor(bitmap_hash(kbint)) from agg_mv_test group by id order by id;") - contains "(mv_sync20)" - } + mv_rewrite_success("select id, group_bitmap_xor(bitmap_hash(kbint)) from agg_mv_test group by id order by id;", "mv_sync20") qt_select_group_bitmap_xor_mv """select id, group_bitmap_xor(bitmap_hash(kbint)) from agg_mv_test group by id order by id;""" qt_select_hll_union_agg """select id, hll_union_agg(hll_hash(kbint)) from agg_mv_test group by id order by id;""" sql """drop materialized view if exists mv_sync21 on agg_mv_test;""" createMV("""create materialized view mv_sync21 as select id, hll_union_agg(hll_hash(kbint)) from agg_mv_test group by id order by id;""") - explain { - sql("select id, hll_union_agg(hll_hash(kbint)) from agg_mv_test group by id order by id;") - contains "(mv_sync21)" - } + mv_rewrite_success("select id, hll_union_agg(hll_hash(kbint)) from agg_mv_test group by id order by id;", "mv_sync21") qt_select_hll_union_agg_mv """select id, hll_union_agg(hll_hash(kbint)) from agg_mv_test group by id order by id;""" qt_select_hll_union """select id, hll_union(hll_hash(kbint)) from agg_mv_test group by id order by id;""" sql """drop materialized view if exists mv_sync22 on agg_mv_test;""" createMV("""create materialized view mv_sync22 as select id, hll_union(hll_hash(kbint)) from agg_mv_test group by id order by id;""") - explain { - sql("select id, hll_union(hll_hash(kbint)) from agg_mv_test group by id order by id;") - contains "(mv_sync22)" - } + mv_rewrite_success("select id, hll_union(hll_hash(kbint)) from agg_mv_test group by id order by id;", "mv_sync22") qt_select_hll_union_mv """select id, hll_union(hll_hash(kbint)) from agg_mv_test group by id order by id;""" qt_select_intersect_count """select id, intersect_count(bitmap_hash(kbint), kint, 3, 4) from agg_mv_test group by id order by id;""" sql """drop materialized view if exists mv_sync23 on agg_mv_test;""" createMV("""create materialized view mv_sync23 as select id, intersect_count(bitmap_hash(kbint), kint, 3, 4) from agg_mv_test group by id order by id;""") - explain { - sql("select id, intersect_count(bitmap_hash(kbint), kint, 3, 4) from agg_mv_test group by id order by id;") - contains "(mv_sync23)" - } + mv_rewrite_success("select id, intersect_count(bitmap_hash(kbint), kint, 3, 4) from agg_mv_test group by id order by id;", "mv_sync23") qt_select_intersect_count_mv """select id, intersect_count(bitmap_hash(kbint), kint, 3, 4) from agg_mv_test group by id order by id;""" qt_select_group_concat """select id, group_concat(cast(abs(kint) as varchar)) from agg_mv_test group by id order by id;""" sql """drop materialized view if exists mv_sync24 on agg_mv_test;""" createMV("""create materialized view mv_sync24 as select id, group_concat(cast(abs(kint) as varchar)) from agg_mv_test group by id order by id;""") - explain { - sql("select id, group_concat(cast(abs(kint) as varchar)) from agg_mv_test group by id order by id;") - contains "(mv_sync24)" - } + mv_rewrite_success("select id, group_concat(cast(abs(kint) as varchar)) from agg_mv_test group by id order by id;", "mv_sync24") qt_select_group_concat_mv """select id, group_concat(cast(abs(kint) as varchar)) from agg_mv_test group by id order by id;""" qt_select_multi_distinct_group_concat """select id, multi_distinct_group_concat(cast(abs(kint) as varchar)) from agg_mv_test group by id order by id;""" sql """drop materialized view if exists mv_sync25 on agg_mv_test;""" createMV("""create materialized view mv_sync25 as select id, multi_distinct_group_concat(cast(abs(kint) as varchar)) from agg_mv_test group by id order by id;""") - explain { - sql("select id, multi_distinct_group_concat(cast(abs(kint) as varchar)) from agg_mv_test group by id order by id;") - contains "(mv_sync25)" - } + mv_rewrite_success("select id, multi_distinct_group_concat(cast(abs(kint) as varchar)) from agg_mv_test group by id order by id;", "mv_sync25") qt_select_multi_distinct_group_concat_mv """select id, multi_distinct_group_concat(cast(abs(kint) as varchar)) from agg_mv_test group by id order by id;""" qt_select_multi_distinct_sum0 """select id, multi_distinct_sum0(kint) from agg_mv_test group by id order by id;""" sql """drop materialized view if exists mv_sync26 on agg_mv_test;""" createMV("""create materialized view mv_sync26 as select id, multi_distinct_sum0(kint) from agg_mv_test group by id order by id;""") - explain { - sql("select id, multi_distinct_sum0(kint) from agg_mv_test group by id order by id;") - contains "(mv_sync26)" - } + mv_rewrite_success("select id, multi_distinct_sum0(kint) from agg_mv_test group by id order by id;", "mv_sync26") qt_select_multi_distinct_sum0_mv """select id, multi_distinct_sum0(kint) from agg_mv_test group by id order by id;""" qt_select_multi_distinct_sum """select id, multi_distinct_sum(kint) from agg_mv_test group by id order by id;""" sql """drop materialized view if exists mv_sync27 on agg_mv_test;""" createMV("""create materialized view mv_sync27 as select id, multi_distinct_sum(kint) from agg_mv_test group by id order by id;""") - explain { - sql("select id, multi_distinct_sum(kint) from agg_mv_test group by id order by id;") - contains "(mv_sync27)" - } + mv_rewrite_success("select id, multi_distinct_sum(kint) from agg_mv_test group by id order by id;", "mv_sync27") qt_select_multi_distinct_sum_mv """select id, multi_distinct_sum(kint) from agg_mv_test group by id order by id;""" qt_select_histogram """select id, histogram(kint) from agg_mv_test group by id order by id;""" sql """drop materialized view if exists mv_sync28 on agg_mv_test;""" createMV("""create materialized view mv_sync28 as select id, histogram(kint) from agg_mv_test group by id order by id;""") - explain { - sql("select id, histogram(kint) from agg_mv_test group by id order by id;") - contains "(mv_sync28)" - } + mv_rewrite_success("select id, histogram(kint) from agg_mv_test group by id order by id;", "mv_sync28") qt_select_histogram_mv """select id, histogram(kint) from agg_mv_test group by id order by id;""" qt_select_max_by """select id, max_by(kint, kint) from agg_mv_test group by id order by id;""" sql """drop materialized view if exists mv_sync29 on agg_mv_test;""" createMV("""create materialized view mv_sync29 as select id, max_by(kint, kint) from agg_mv_test group by id order by id;""") - explain { - sql("select id, max_by(kint, kint) from agg_mv_test group by id order by id;") - contains "(mv_sync29)" - } + mv_rewrite_success("select id, max_by(kint, kint) from agg_mv_test group by id order by id;", "mv_sync29") qt_select_max_by_mv """select id, max_by(kint, kint) from agg_mv_test group by id order by id;""" qt_select_min_by """select id, min_by(kint, kint) from agg_mv_test group by id order by id;""" sql """drop materialized view if exists mv_sync30 on agg_mv_test;""" createMV("""create materialized view mv_sync30 as select id, min_by(kint, kint) from agg_mv_test group by id order by id;""") - explain { - sql("select id, min_by(kint, kint) from agg_mv_test group by id order by id;") - contains "(mv_sync30)" - } + mv_rewrite_success("select id, min_by(kint, kint) from agg_mv_test group by id order by id;", "mv_sync30") qt_select_min_by_mv """select id, min_by(kint, kint) from agg_mv_test group by id order by id;""" qt_select_multi_distinct_count """select id, multi_distinct_count(kint) from agg_mv_test group by id order by id;""" sql """drop materialized view if exists mv_sync31 on agg_mv_test;""" createMV("""create materialized view mv_sync31 as select id, multi_distinct_count(kint) from agg_mv_test group by id order by id;""") - explain { - sql("select id, multi_distinct_count(kint) from agg_mv_test group by id order by id;") - contains "(mv_sync31)" - } + mv_rewrite_success("select id, multi_distinct_count(kint) from agg_mv_test group by id order by id;", "mv_sync31") qt_select_multi_distinct_count_mv """select id, multi_distinct_count(kint) from agg_mv_test group by id order by id;""" qt_select_ndv """select id, ndv(kint) from agg_mv_test group by id order by id;""" sql """drop materialized view if exists mv_sync32 on agg_mv_test;""" createMV("""create materialized view mv_sync32 as select id, ndv(kint) from agg_mv_test group by id order by id;""") - explain { - sql("select id, ndv(kint) from agg_mv_test group by id order by id;") - contains "(mv_sync32)" - } + mv_rewrite_success("select id, ndv(kint) from agg_mv_test group by id order by id;", "mv_sync32") qt_select_ndv_mv """select id, ndv(kint) from agg_mv_test group by id order by id;""" qt_select_covar """select id, covar(kint, kint) from agg_mv_test group by id order by id;""" sql """drop materialized view if exists mv_sync33 on agg_mv_test;""" createMV("""create materialized view mv_sync33 as select id, covar(kint, kint) from agg_mv_test group by id order by id;""") - explain { - sql("select id, covar(kint, kint) from agg_mv_test group by id order by id;") - contains "(mv_sync33)" - } + mv_rewrite_success("select id, covar(kint, kint) from agg_mv_test group by id order by id;", "mv_sync33") qt_select_covar_mv """select id, covar(kint, kint) from agg_mv_test group by id order by id;""" qt_select_covar_samp """select id, covar_samp(kint, kint) from agg_mv_test group by id order by id;""" sql """drop materialized view if exists mv_sync34 on agg_mv_test;""" createMV("""create materialized view mv_sync34 as select id, covar_samp(kint, kint) from agg_mv_test group by id order by id;""") - explain { - sql("select id, covar_samp(kint, kint) from agg_mv_test group by id order by id;") - contains "(mv_sync34)" - } + mv_rewrite_success("select id, covar_samp(kint, kint) from agg_mv_test group by id order by id;", "mv_sync34") qt_select_covar_samp_mv """select id, covar_samp(kint, kint) from agg_mv_test group by id order by id;""" qt_select_percentile """select id, percentile(kbint, 0.6) from agg_mv_test group by id order by id;""" sql """drop materialized view if exists mv_sync35 on agg_mv_test;""" createMV("""create materialized view mv_sync35 as select id, percentile(kbint, 0.6) from agg_mv_test group by id order by id;""") - explain { - sql("select id, percentile(kbint, 0.6) from agg_mv_test group by id order by id;") - contains "(mv_sync35)" - } + mv_rewrite_success("select id, percentile(kbint, 0.6) from agg_mv_test group by id order by id;", "mv_sync35") qt_select_percentile_mv """select id, percentile(kbint, 0.6) from agg_mv_test group by id order by id;""" qt_select_percentile_approx """select id, percentile_approx(kbint, 0.6) from agg_mv_test group by id order by id;""" sql """drop materialized view if exists mv_sync36 on agg_mv_test;""" createMV("""create materialized view mv_sync36 as select id, percentile_approx(kbint, 0.6) from agg_mv_test group by id order by id;""") - explain { - sql("select id, percentile_approx(kbint, 0.6) from agg_mv_test group by id order by id;") - contains "(mv_sync36)" - } + mv_rewrite_success("select id, percentile_approx(kbint, 0.6) from agg_mv_test group by id order by id;", "mv_sync36") qt_select_percentile_approx_mv """select id, percentile_approx(kbint, 0.6) from agg_mv_test group by id order by id;""" // percentile_approx_weighted is not supported in old planner @@ -358,129 +256,85 @@ suite("agg_sync_mv") { qt_select_sequence_count """select id, sequence_count('(?1)(?2)', kdtv2, kint = 1, kint = 2) from agg_mv_test group by id order by id;""" sql """drop materialized view if exists mv_sync38 on agg_mv_test;""" createMV("""create materialized view mv_sync38 as select id, sequence_count('(?1)(?2)', kdtv2, kint = 1, kint = 2) from agg_mv_test group by id order by id;""") - explain { - sql("select id, sequence_count('(?1)(?2)', kdtv2, kint = 1, kint = 2) from agg_mv_test group by id order by id;") - contains "(mv_sync38)" - } + mv_rewrite_success("select id, sequence_count('(?1)(?2)', kdtv2, kint = 1, kint = 2) from agg_mv_test group by id order by id;", "mv_sync38") qt_select_sequence_count_mv """select id, sequence_count('(?1)(?2)', kdtv2, kint = 1, kint = 2) from agg_mv_test group by id order by id;""" qt_select_sequence_match """select id, sequence_match('(?1)(?2)', kdtv2, kint = 1, kint = 2) from agg_mv_test group by id order by id;""" sql """drop materialized view if exists mv_sync39 on agg_mv_test;""" createMV("""create materialized view mv_sync39 as select id, sequence_match('(?1)(?2)', kdtv2, kint = 1, kint = 2) from agg_mv_test group by id order by id;""") - explain { - sql("select id, sequence_match('(?1)(?2)', kdtv2, kint = 1, kint = 2) from agg_mv_test group by id order by id;") - contains "(mv_sync39)" - } + mv_rewrite_success("select id, sequence_match('(?1)(?2)', kdtv2, kint = 1, kint = 2) from agg_mv_test group by id order by id;", "mv_sync39") qt_select_sequence_match_mv """select id, sequence_match('(?1)(?2)', kdtv2, kint = 1, kint = 2) from agg_mv_test group by id order by id;""" qt_select_stddev """select id, stddev(kint) from agg_mv_test group by id order by id;""" sql """drop materialized view if exists mv_sync40 on agg_mv_test;""" createMV("""create materialized view mv_sync40 as select id, stddev(kint) from agg_mv_test group by id order by id;""") - explain { - sql("select id, stddev(kint) from agg_mv_test group by id order by id;") - contains "(mv_sync40)" - } + mv_rewrite_success("select id, stddev(kint) from agg_mv_test group by id order by id;", "mv_sync40") qt_select_stddev_mv """select id, stddev(kint) from agg_mv_test group by id order by id;""" qt_select_stddev_pop """select id, stddev_pop(kint) from agg_mv_test group by id order by id;""" sql """drop materialized view if exists mv_sync41 on agg_mv_test;""" createMV("""create materialized view mv_sync41 as select id, stddev_pop(kint) from agg_mv_test group by id order by id;""") - explain { - sql("select id, stddev_pop(kint) from agg_mv_test group by id order by id;") - contains "(mv_sync41)" - } + mv_rewrite_success("select id, stddev_pop(kint) from agg_mv_test group by id order by id;", "mv_sync41") qt_select_stddev_pop_mv """select id, stddev_pop(kint) from agg_mv_test group by id order by id;""" qt_select_stddev_samp """select id, stddev_samp(kint) from agg_mv_test group by id order by id;""" sql """drop materialized view if exists mv_sync42 on agg_mv_test;""" createMV("""create materialized view mv_sync42 as select id, stddev_samp(kint) from agg_mv_test group by id order by id;""") - explain { - sql("select id, stddev_samp(kint) from agg_mv_test group by id order by id;") - contains "(mv_sync42)" - } + mv_rewrite_success("select id, stddev_samp(kint) from agg_mv_test group by id order by id;", "mv_sync42") qt_select_stddev_samp_mv """select id, stddev_samp(kint) from agg_mv_test group by id order by id;""" qt_select_sum0 """select id, sum0(kint) from agg_mv_test group by id order by id;""" sql """drop materialized view if exists mv_sync43 on agg_mv_test;""" createMV("""create materialized view mv_sync43 as select id, sum0(kint) from agg_mv_test group by id order by id;""") - explain { - sql("select id, sum0(kint) from agg_mv_test group by id order by id;") - contains "(mv_sync43)" - } + mv_rewrite_success("select id, sum0(kint) from agg_mv_test group by id order by id;", "mv_sync43") qt_select_sum0_mv """select id, sum0(kint) from agg_mv_test group by id order by id;""" qt_select_topn """select id, topn(kvchrs1, 3) from agg_mv_test group by id order by id;""" sql """drop materialized view if exists mv_sync44 on agg_mv_test;""" createMV("""create materialized view mv_sync44 as select id, topn(kvchrs1, 3) from agg_mv_test group by id order by id;""") - explain { - sql("select id, topn(kvchrs1, 3) from agg_mv_test group by id order by id;") - contains "(mv_sync44)" - } + mv_rewrite_success("select id, topn(kvchrs1, 3) from agg_mv_test group by id order by id;", "mv_sync44") qt_select_topn_mv """select id, topn(kvchrs1, 3) from agg_mv_test group by id order by id;""" qt_select_topn_array """select id, topn_array(kvchrs1, 3) from agg_mv_test group by id order by id;""" sql """drop materialized view if exists mv_sync45 on agg_mv_test;""" createMV("""create materialized view mv_sync45 as select id, topn_array(kvchrs1, 3) from agg_mv_test group by id order by id;""") - explain { - sql("select id, topn_array(kvchrs1, 3) from agg_mv_test group by id order by id;") - contains "(mv_sync45)" - } + mv_rewrite_success("select id, topn_array(kvchrs1, 3) from agg_mv_test group by id order by id;", "mv_sync45") qt_select_topn_array_mv """select id, topn_array(kvchrs1, 3) from agg_mv_test group by id order by id;""" qt_select_topn_weighted """select id, topn_weighted(kvchrs1, ktint, 3) from agg_mv_test group by id order by id;""" sql """drop materialized view if exists mv_sync46 on agg_mv_test;""" createMV("""create materialized view mv_sync46 as select id, topn_weighted(kvchrs1, ktint, 3) from agg_mv_test group by id order by id;""") - explain { - sql("select id, topn_weighted(kvchrs1, ktint, 3) from agg_mv_test group by id order by id;") - contains "(mv_sync46)" - } + mv_rewrite_success("select id, topn_weighted(kvchrs1, ktint, 3) from agg_mv_test group by id order by id;", "mv_sync46") qt_select_topn_weighted_mv """select id, topn_weighted(kvchrs1, ktint, 3) from agg_mv_test group by id order by id;""" qt_select_variance """select id, variance(kint) from agg_mv_test group by id order by id;""" sql """drop materialized view if exists mv_sync47 on agg_mv_test;""" createMV("""create materialized view mv_sync47 as select id, variance(kint) from agg_mv_test group by id order by id;""") - explain { - sql("select id, variance(kint) from agg_mv_test group by id order by id;") - contains "(mv_sync47)" - } + mv_rewrite_success("select id, variance(kint) from agg_mv_test group by id order by id;", "mv_sync47") qt_select_variance_mv """select id, variance(kint) from agg_mv_test group by id order by id;""" qt_select_var_pop """select id, var_pop(kint) from agg_mv_test group by id order by id;""" sql """drop materialized view if exists mv_sync48 on agg_mv_test;""" createMV("""create materialized view mv_sync48 as select id, var_pop(kint) from agg_mv_test group by id order by id;""") - explain { - sql("select id, var_pop(kint) from agg_mv_test group by id order by id;") - check { result -> - result.contains("(mv_sync47)") || result.contains("(mv_sync48)") - } - } + mv_rewrite_any_success("select id, var_pop(kint) from agg_mv_test group by id order by id;",["mv_sync47", "mv_sync48"]) qt_select_var_pop_mv """select id, var_pop(kint) from agg_mv_test group by id order by id;""" qt_select_variance_samp """select id, variance_samp(kint) from agg_mv_test group by id order by id;""" sql """drop materialized view if exists mv_sync49 on agg_mv_test;""" createMV("""create materialized view mv_sync49 as select id, variance_samp(kint) from agg_mv_test group by id order by id;""") - explain { - sql("select id, variance_samp(kint) from agg_mv_test group by id order by id;") - contains "(mv_sync49)" - } + mv_rewrite_success("select id, variance_samp(kint) from agg_mv_test group by id order by id;", "mv_sync49") qt_select_variance_samp_mv """select id, variance_samp(kint) from agg_mv_test group by id order by id;""" qt_select_var_samp """select id, var_samp(kint) from agg_mv_test group by id order by id;""" sql """drop materialized view if exists mv_sync50 on agg_mv_test;""" createMV("""create materialized view mv_sync50 as select id, var_samp(kint) from agg_mv_test group by id order by id;""") - explain { - sql("select id, var_samp(kint) from agg_mv_test group by id order by id;") - contains "(mv_sync50)" - } + mv_rewrite_success("select id, var_samp(kint) from agg_mv_test group by id order by id;", "mv_sync50") qt_select_var_samp_mv """select id, var_samp(kint) from agg_mv_test group by id order by id;""" qt_select_window_funnel """select id, window_funnel(3600 * 3, 'default', kdtm, kint = 1, kint = 2) from agg_mv_test group by id order by id;""" sql """drop materialized view if exists mv_sync51 on agg_mv_test;""" createMV("""create materialized view mv_sync51 as select id, window_funnel(3600 * 3, 'default', kdtm, kint = 1, kint = 2) from agg_mv_test group by id order by id;""") - explain { - sql("select id, window_funnel(3600 * 3, 'default', kdtm, kint = 1, kint = 2) from agg_mv_test group by id order by id;") - contains "(mv_sync51)" - } + mv_rewrite_success("select id, window_funnel(3600 * 3, 'default', kdtm, kint = 1, kint = 2) from agg_mv_test group by id order by id;", "mv_sync51") qt_select_window_funnel_mv """select id, window_funnel(3600 * 3, 'default', kdtm, kint = 1, kint = 2) from agg_mv_test group by id order by id;""" // map_agg is not supported yet @@ -506,10 +360,7 @@ suite("agg_sync_mv") { qt_select_retention """select id, retention(kdtm = '2012-03-11', kdtm = '2012-03-12') from agg_mv_test group by id order by id;""" sql """drop materialized view if exists mv_sync54 on agg_mv_test;""" createMV("""create materialized view mv_sync54 as select id, retention(kdtm = '2012-03-11', kdtm = '2012-03-12') from agg_mv_test group by id order by id;""") - explain { - sql("select id, retention(kdtm = '2012-03-11', kdtm = '2012-03-12') from agg_mv_test group by id order by id;") - contains "(mv_sync54)" - } + mv_rewrite_success("select id, retention(kdtm = '2012-03-11', kdtm = '2012-03-12') from agg_mv_test group by id order by id;", "mv_sync54") qt_select_retention_mv """select id, retention(kdtm = '2012-03-11', kdtm = '2012-03-12') from agg_mv_test group by id order by id;""" diff --git a/regression-test/suites/nereids_syntax_p1/mv/aggregate/agg_sync_mv.groovy b/regression-test/suites/nereids_syntax_p1/mv/aggregate/agg_sync_mv.groovy index 361ff9cc39981b..205acdf71dfca1 100644 --- a/regression-test/suites/nereids_syntax_p1/mv/aggregate/agg_sync_mv.groovy +++ b/regression-test/suites/nereids_syntax_p1/mv/aggregate/agg_sync_mv.groovy @@ -108,7 +108,7 @@ suite("agg_sync_mv") { qt_select_bitmap_union_count """select id, bitmap_union_count(bitmap_hash(kbint)) from agg_mv_test group by id order by id;""" sql """drop materialized view if exists mv_sync14 on agg_mv_test;""" createMV("""create materialized view mv_sync14 as select id, bitmap_union_count(bitmap_hash(kbint)) from agg_mv_test group by id order by id;""") - mv_rewrite_success("select id, bitmap_union_count(bitmap_hash(kbint)) from agg_mv_test group by id order by id;", "mv_sync14") + mv_rewrite_any_success("select id, bitmap_union_count(bitmap_hash(kbint)) from agg_mv_test group by id order by id;", ["mv_sync13", "mv_sync14"]) qt_select_bitmap_union_count_mv """select id, bitmap_union_count(bitmap_hash(kbint)) from agg_mv_test group by id order by id;""" qt_select_bitmap_union_int """select id, bitmap_union_int(kint) from agg_mv_test group by id order by id;""" @@ -275,7 +275,7 @@ suite("agg_sync_mv") { qt_select_stddev_pop """select id, stddev_pop(kint) from agg_mv_test group by id order by id;""" sql """drop materialized view if exists mv_sync41 on agg_mv_test;""" createMV("""create materialized view mv_sync41 as select id, stddev_pop(kint) from agg_mv_test group by id order by id;""") - mv_rewrite_success("select id, stddev_pop(kint) from agg_mv_test group by id order by id;", "mv_sync41") + mv_rewrite_any_success("select id, stddev_pop(kint) from agg_mv_test group by id order by id;", ["mv_sync40", "mv_sync41"]) qt_select_stddev_pop_mv """select id, stddev_pop(kint) from agg_mv_test group by id order by id;""" qt_select_stddev_samp """select id, stddev_samp(kint) from agg_mv_test group by id order by id;""" @@ -329,7 +329,7 @@ suite("agg_sync_mv") { qt_select_var_samp """select id, var_samp(kint) from agg_mv_test group by id order by id;""" sql """drop materialized view if exists mv_sync50 on agg_mv_test;""" createMV("""create materialized view mv_sync50 as select id, var_samp(kint) from agg_mv_test group by id order by id;""") - mv_rewrite_success("select id, var_samp(kint) from agg_mv_test group by id order by id;", "mv_sync50") + mv_rewrite_any_success("select id, var_samp(kint) from agg_mv_test group by id order by id;", ["mv_sync49", "mv_sync50"]) qt_select_var_samp_mv """select id, var_samp(kint) from agg_mv_test group by id order by id;""" qt_select_window_funnel """select id, window_funnel(3600 * 3, 'default', kdtm, kint = 1, kint = 2) from agg_mv_test group by id order by id;"""