Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable SortProjectTransposeRule #15002

Merged
merged 14 commits into from
Sep 29, 2023
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,7 @@ public class CalciteRulesManager
CoreRules.FILTER_VALUES_MERGE,
CoreRules.PROJECT_FILTER_VALUES_MERGE,
CoreRules.PROJECT_VALUES_MERGE,
CoreRules.SORT_PROJECT_TRANSPOSE,
CoreRules.AGGREGATE_VALUES
);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2739,7 +2739,6 @@ public void testGroupByWithSelectAndOrderByProjections()
);
}

@DecoupledIgnore(mode = Modes.PLAN_MISMATCH)
@Test
public void testTopNWithSelectProjections()
{
Expand All @@ -2756,7 +2755,7 @@ public void testTopNWithSelectProjections()
.intervals(querySegmentSpec(Filtration.eternity()))
.granularity(Granularities.ALL)
.dimension(new DefaultDimensionSpec("dim1", "d0"))
.postAggregators(expressionPostAgg("p0", "substring(\"d0\", 1, -1)"))
.postAggregators(expressionPostAgg("s0", "substring(\"d0\", 1, -1)"))
.metric(new DimensionTopNMetricSpec(null, StringComparators.LEXICOGRAPHIC))
.threshold(10)
.context(QUERY_CONTEXT_DEFAULT)
Expand Down Expand Up @@ -11643,7 +11642,6 @@ public void testSortProjectAfterNestedGroupBy()
);
}

@DecoupledIgnore(mode = Modes.CANNOT_CONVERT)
@Test
public void testPostAggWithTimeseries()
{
Expand Down Expand Up @@ -11674,7 +11672,7 @@ public void testPostAggWithTimeseries()
)
)
.postAggregators(
expressionPostAgg("p0", "(\"a0\" + \"a1\")")
expressionPostAgg("s0", "(\"a0\" + \"a1\")")
)
.descending(true)
.context(getTimeseriesContextWithFloorTime(TIMESERIES_CONTEXT_BY_GRAN, "d0"))
Expand All @@ -11687,7 +11685,6 @@ public void testPostAggWithTimeseries()
);
}

@DecoupledIgnore(mode = Modes.PLAN_MISMATCH)
@Test
public void testPostAggWithTopN()
{
Expand Down Expand Up @@ -11736,7 +11733,7 @@ public void testPostAggWithTopN()
new FieldAccessPostAggregator(null, "a0:count")
)
),
expressionPostAgg("p0", "(\"a1\" + \"a2\")")
expressionPostAgg("s0", "(\"a1\" + \"a2\")")
)
.metric(new DimensionTopNMetricSpec(null, StringComparators.NUMERIC))
.threshold(5)
Expand Down