Skip to content

Commit a25f15a

Browse files
committed
Second Last Batch of Rules
1 parent a0ac75e commit a25f15a

8 files changed

Lines changed: 150 additions & 101 deletions

File tree

src/main/java/org/qed/Backends/Cockroach/CockroachGenerator.java

Lines changed: 110 additions & 94 deletions
Large diffs are not rendered by default.

src/main/java/org/qed/Backends/Cockroach/CockroachTester.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,8 @@ public static Seq<RRule> ruleList() {
5858
for (java.io.File file : files) {
5959
String className = file.getName().replace(".java", "");
6060
if (className.contains("Distinct") || className.contains("Pull") ||
61-
className.contains("JoinConditionPush") || className.contains("ProjectAggregateMerge") ||
62-
className.contains("AggregativeJoinRemove") || className.contains("AggregateProjectConstantToDummyJoin") || className.contains("AggregateProjectMerge")) {
61+
className.contains("ProjectAggregateMerge") ||
62+
className.contains("AggregativeJoinRemove") || className.contains("AggregateProjectConstantToDummyJoin")) {
6363
continue;
6464
}
6565

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
[AggregateProjectMerge, Normalize]
2+
(GroupBy
3+
(Project
4+
$input_0:*
5+
$projections_1:*
6+
$passthrough_2:*
7+
)
8+
$aggregations_3:*
9+
$groupingPrivate_4:* & (CanRemapGroupingColsThroughProject $groupingPrivate_4 $projections_1 $passthrough_2)
10+
)
11+
=>
12+
(GroupBy
13+
$input_0
14+
(RemapAggregationsThroughProject $aggregations_3 $projections_1)
15+
(RemapGroupingColsThroughProject $groupingPrivate_4 $projections_1 $passthrough_2)
16+
)

src/main/java/org/qed/Backends/Cockroach/Generated/FilterReduceFalse.opt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,4 @@
88
]
99
)
1010
=>
11-
(ConstructEmptyValues (OutputCols $input_0_0))
11+
(ConstructEmptyValues (OutputCols $input_0))
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
[JoinConditionPush, Normalize]
2+
(InnerJoin
3+
$left_0:* & ^(HasOuterCols $left_0)
4+
$right_1:* & ^(HasOuterCols $right_1)
5+
$on_2:*
6+
$private_3:*
7+
)
8+
=>
9+
(InnerJoin
10+
(Select $left_0 (ExtractBoundConditions $on_2 (OutputCols $left_0)))
11+
(Select $right_1 (ExtractBoundConditions $on_2 (OutputCols $right_1)))
12+
(ExtractUnboundConditions
13+
(ExtractUnboundConditions $on_2 (OutputCols $left_0))
14+
(OutputCols $right_1)
15+
)
16+
$private_3
17+
)
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[PruneEmptyFilter, Normalize]
22
(Select
33
$input_2:* & (HasZeroRows $input_2)
4-
$filters_3:*
4+
$filters:*
55
)
66
=>
77
$input_2

src/main/java/org/qed/Backends/Cockroach/Generated/PruneEmptyMinus.opt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,4 @@
55
$private_2:*
66
)
77
=>
8-
(ConstructEmptyValues (OutputCols $empty_0))
8+
(ConstructEmptyValues (OutputCols $input_0))
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
[PruneEmptyProject, Normalize]
22
(Project
33
$input_0:* & (HasZeroRows $input_0)
4-
$projections_1:*
5-
$passthrough_2:*
4+
$projections:*
5+
$passthrough:*
66
)
77
=>
88
$input_0

0 commit comments

Comments
 (0)