You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@druid.apache.org by "kgyrtkirk (via GitHub)" <gi...@apache.org> on 2023/11/09 12:39:15 UTC
[I] Not able to set literal arguments for sketch functions processing subquery results (druid)
kgyrtkirk opened a new issue, #15353:
URL: https://github.com/apache/druid/issues/15353
Sketch aggregator creation fails; because the argument doesn't [look like a literal](https://github.com/apache/druid/blob/895e53555cf69cce992ee54d8523624fe1150214/extensions-core/datasketches/src/main/java/org/apache/druid/query/aggregation/datasketches/hll/sql/HllSketchBaseSqlAggregator.java#L90)
queries like `DS_HLL(dim2, 18)` may fail; however `DS_HLL(dim2)` could still be used (but it will use defaults)
### Affected Version
current master for sure...possibly introduced earlier; will update the ticket
### Description
the query plan has an inputref instead of a literal:
```
LogicalAggregate(group=[{0, 1}], val=[APPROX_COUNT_DISTINCT_DS_HLL($1, $2)]): rowcount = 1.0, cumulative cost = {217.125 rows, 673.6669492803463 cpu, 0.0 io}, id = 157
LogicalProject(d1=[$0], dim2=[$2], $f2=[18]): rowcount = 3.0, cumulative cost = {216.0 rows, 673.6669492803463 cpu, 0.0 io}, id = 155
LogicalSort(sort0=[$1], dir0=[ASC], fetch=[3]): rowcount = 3.0, cumulative cost = {213.0 rows, 664.6669492803463 cpu, 0.0 io}, id = 153
LogicalAggregate(group=[{0, 1, 2}]): rowcount = 10.0, cumulative cost = {210.0 rows, 401.0 cpu, 0.0 io}, id = 151
LogicalProject(d1=[$7], dim1=[$1], dim2=[$2]): rowcount = 100.0, cumulative cost = {200.0 rows, 401.0 cpu, 0.0 io}, id = 149
LogicalTableScan(table=[[druid, foo]]): rowcount = 100.0, cumulative cost = {100.0 rows, 101.0 cpu, 0.0 io}, id = 125
```
testcase for `HllSketchSqlAggregatorTest`:
```
@Test
public void testDsHllGroupingWithWindow()
{
testBuilder()
.queryContext(ImmutableMap.of(QueryContexts.ENABLE_DEBUG, true))
.sql(
"SELECT d1,dim2,APPROX_COUNT_DISTINCT_DS_HLL(dim2, 18) as val"
+ " FROM (select d1,dim1,dim2 from druid.foo group by d1,dim1,dim2 order by dim1 limit 3) t "
+ " group by 1,2"
)
.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: commits-unsubscribe@druid.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org
Re: [I] Not able to set literal arguments for sketch functions processing subquery results (druid)
Posted by "soumyava (via GitHub)" <gi...@apache.org>.
soumyava closed issue #15353: Not able to set literal arguments for sketch functions processing subquery results
URL: https://github.com/apache/druid/issues/15353
--
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: commits-unsubscribe@druid.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org