RuochenLI opened a new issue, #12887:
URL: https://github.com/apache/druid/issues/12887
Different values produced by quantilesDoublesSketchToQuantile with the same
query
### Affected Version
0.22.1
### Description
I have a datasource that I'm trying to query using quantiles to get P60. But
every time it produced different values
Sample json query:
```
{
"dataSource": "datasource_name",
"dimensions": [
{
"dimension": "__time",
"outputName": "date",
"outputType": "LONG",
"type": "default"
},
{
"dimension": "dimension1",
"outputName": "dimension1",
"outputType": "STRING",
"type": "default"
},
{
"dimension": "dimension2",
"outputName": "dimension2",
"outputType": "STRING",
"type": "default"
}
],
"granularity": {
"type": "all"
},
"filter": {
"fields": [
{
"dimension": "dimension1",
"values": [
"dimension1_filter"
],
"type": "in"
},
{
"dimension": "dimension2",
"values": [
"dimension2_filter"
],
"type": "in"
}
],
"type": "and"
},
"aggregations": [
{
"name": "quantile_quantity",
"fieldName": "quantity",
"type": "quantilesDoublesSketch",
}
],
"postAggregations": [
{
"name": "aggregated_quantity",
"field": {
"name": "aggregated_quantity",
"fieldName": "quantile_quantity",
"type": "fieldAccess"
},
"fraction": 0.5,
"type": "quantilesDoublesSketchToQuantile",
}
],
"intervals": [
"2022-06-05/2022-06-12"
],
"queryType": "groupBy"
}
```
Sample of result
```
{
"aggregated_quantity": 0.8879,
"quantile_quantity": 7040
}
```
```
{
"aggregated_quantity": 0.9017,
"quantile_quantity": 7040
}
```
```
{
"aggregated_quantity": 0.8984,
"quantile_quantity": 7040
}
```
```
{
"aggregated_quantity": 0.905,
"quantile_quantity": 7040
}
```
It is quite confusing. Is there some configuration I'm missing or is it a
known issue?
Thank you!
Ruochen
--
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]