mirror of
https://github.com/apache/druid.git
synced 2025-02-20 00:47:40 +00:00
Fix a comment in the Calcite UT testExactCountDistinctWithFilter (#14628)
This commit is contained in:
parent
52fbc6939e
commit
6a42a24426
@ -2334,26 +2334,23 @@ public class CalciteQueryTest extends BaseCalciteQueryTest
|
|||||||
{
|
{
|
||||||
notMsqCompatible();
|
notMsqCompatible();
|
||||||
final String sqlQuery = "SELECT COUNT(DISTINCT foo.dim1) FILTER(WHERE foo.cnt = 1), SUM(foo.cnt) FROM druid.foo";
|
final String sqlQuery = "SELECT COUNT(DISTINCT foo.dim1) FILTER(WHERE foo.cnt = 1), SUM(foo.cnt) FROM druid.foo";
|
||||||
// When useApproximateCountDistinct=true and useGroupingSetForExactDistinct=false, planning fails due
|
// When useApproximateCountDistinct=false and useGroupingSetForExactDistinct=false, planning fails due
|
||||||
// to a bug in the Calcite's rule (AggregateExpandDistinctAggregatesRule)
|
// to a bug in the Calcite's rule (AggregateExpandDistinctAggregatesRule)
|
||||||
try {
|
Assert.assertThrows(
|
||||||
testQuery(
|
RuntimeException.class,
|
||||||
PLANNER_CONFIG_NO_HLL.withOverrides(
|
() -> testQuery(
|
||||||
ImmutableMap.of(
|
PLANNER_CONFIG_NO_HLL.withOverrides(
|
||||||
PlannerConfig.CTX_KEY_USE_GROUPING_SET_FOR_EXACT_DISTINCT,
|
ImmutableMap.of(
|
||||||
"false"
|
PlannerConfig.CTX_KEY_USE_GROUPING_SET_FOR_EXACT_DISTINCT, "false",
|
||||||
)
|
PlannerConfig.CTX_KEY_USE_APPROXIMATE_COUNT_DISTINCT, false
|
||||||
), // Enable exact count distinct
|
)
|
||||||
sqlQuery,
|
), // Enable exact count distinct
|
||||||
CalciteTests.REGULAR_USER_AUTH_RESULT,
|
sqlQuery,
|
||||||
ImmutableList.of(),
|
CalciteTests.REGULAR_USER_AUTH_RESULT,
|
||||||
ImmutableList.of()
|
ImmutableList.of(),
|
||||||
);
|
ImmutableList.of()
|
||||||
Assert.fail("query execution should fail");
|
)
|
||||||
}
|
);
|
||||||
catch (RuntimeException e) {
|
|
||||||
Assert.assertTrue(e.getMessage().contains("Error while applying rule AggregateExpandDistinctAggregatesRule"));
|
|
||||||
}
|
|
||||||
|
|
||||||
requireMergeBuffers(3);
|
requireMergeBuffers(3);
|
||||||
testQuery(
|
testQuery(
|
||||||
|
Loading…
x
Reference in New Issue
Block a user