kgyrtkirk opened a new issue, #14899:
URL: https://github.com/apache/druid/issues/14899
noticed this while investigating #14748
```
select dim1,dim2,count(1),count(distinct m1) from druid.foo where
(dim1='abc' or dim1='def' or dim2 ='abc' ) group by grouping sets
((dim1),(dim2),())
```
results without approximate count distinct:
```
new Object[]{"abc", null, 1L, 1L},
new Object[]{"def", "abc", 1L, 1L}
```
* which is invalid ; as there may not be any result of this query which have
both `dim1` and `dim2` as not null
* with approximate on - the results are more sane;
```
@Test
public void test()
{
cannotVectorize();
requireMergeBuffers(3);
testBuilder().plannerConfig(
PLANNER_CONFIG_DEFAULT.withOverrides(
ImmutableMap.of(
PlannerConfig.CTX_KEY_USE_APPROXIMATE_COUNT_DISTINCT, false))
)
.sql("select dim1,dim2,count(1),count(distinct m1) from druid.foo where
(dim1='abc' or dim1='def' or dim2 ='abc' ) group by grouping sets
((dim1),(dim2),())")
.expectedResults(ImmutableList.of(
// fill this in later
))
.run();
}
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]