minkedong opened a new issue #10519:
URL: https://github.com/apache/druid/issues/10519
When I use topN query, the results are very different.
### Affected Version
Druid version is 0.16.0
### Description
When I use the following query:
{
"queryType": "topN",
"dataSource": "adx_data",
"intervals": "2020-10-19T00Z/2020-10-21T00Z",
"granularity": "all",
"filter": {
"type": "selector",
"dimension": "bundle",
"value": "1115565187"
},
"dimension": {
"type": "default",
"dimension": "bundle",
"outputName": "bundle"
},
"aggregations": [
{
"name": "rev",
"type": "doubleSum",
"fieldName": "rev"
},
{
"name": "traffic",
"type": "longSum",
"fieldName": "traffic"
}
],
"metric": "rev",
"threshold": 50
}
The corresponding query result is:
{"bundle":"1115565187","rev":1681.6186172404705,"traffic":103772277}
However, when I remove the filter condition and request the query again:
{
"queryType": "topN",
"dataSource": "adx_data",
"intervals": "2020-10-19T00Z/2020-10-21T00Z",
"granularity": "all",
"dimension": {
"type": "default",
"dimension": "bundle",
"outputName": "bundle"
},
"aggregations": [
{
"name": "rev",
"type": "doubleSum",
"fieldName": "rev"
},
{
"name": "traffic",
"type": "longSum",
"fieldName": "traffic"
}
],
"metric": "rev",
"threshold": 50
}
The corresponding query result is:
{"bundle":"1115565187","rev":1681.6186172404705,"traffic":22087792}
{"bundle":"591560124","rev":1255.0023926230278,"traffic":25825}
{"bundle":"com.pixel.art.coloring.color.number","rev":1010.6935608959175,"traffic":59439}
{"bundle":"1502447854","rev":635.8367775218067,"traffic":60758}
{"bundle":"1207472156","rev":631.9766362940973,"traffic":25891452}
...
So, my question is, why the traffic sum value of the same bundle
("1115565187") has changed after removing the filter condition. Referring to
the data I had ingestion, the the first result is correct, which makes me very
confused, Can anyone help me answer this question, thank you very much。
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]