Slackbot
01/18/2023, 4:08 PMTomer Ben David
01/19/2023, 6:11 AM{
"queryType": "groupBy",
"dataSource": "wikipedia",
"granularity": "all",
"dimensions": [],
"aggregations": [
{
"type": "count",
"name": "my_count_sketch",
"aggregator": {
"type": "thetaSketch",
"name": "mycount",
"fieldName": "added"
}
},
{
"type": "arrayOfDoublesSketch",
"name": "my_array_of_double_sketch",
"fieldName": "added",
"metricColumns": [
"added"
]
},
{
"type": "longSum",
"name": "deleted_sum",
"fieldName": "deleted"
},
{
"type": "count",
"name": "total_count"
}
],
"postAggregations": [
{
"type": "arithmetic",
"name": "average_deleted",
"fn": "/",
"fields": [
{
"type": "fieldAccess",
"fieldName": "deleted_sum"
},
{
"type": "fieldAccess",
"fieldName": "total_count"
}
]
},
{
"type": "fieldAccess",
"name": "my_array_of_double_sketch_post_aggregator",
"fieldName": "my_array_of_double_sketch"
},
{
"type": "arrayOfDoublesSketchToVariances",
"name": "my_variance_sketch",
"field": "my_array_of_double_sketch_post_aggregator"
}
],
"intervals": [
"2014-01-15T00:00:00.000/2023-08-15T02:00:00.000"
]
}
Getting now:
Error: Unknown exception
Missing type id when trying to resolve subtype of [simple type, class org.apache.druid.query.aggregation.PostAggregator]: missing type id property 'type' (for POJO property 'field') at [Source: (org.eclipse.jetty.server.HttpInputOverHTTP); line: 1, column: 807] (through reference chain: org.apache.druid.query.groupby.GroupByQuery["postAggregations"]->java.util.ArrayList[2]->org.apache.druid.query.aggregation.datasketches.tuple.ArrayOfDoublesSketchToVariancesPostAggregator["field"])
com.fasterxml.jackson.databind.exc.InvalidTypeIdExceptionLaksh Singla
01/19/2023, 6:36 AM"field": "my_array_of_double_sketch_post_aggregator" with "field": {"type": "fieldAccess", "fieldName": "my_array_of_double_sketch_post_aggregator"}Vijay Narayanan
01/19/2023, 1:32 PM{
"dataSource": "wikipedia",
"queryType": "groupBy",
"intervals": [
"2000-06-27T00:00:00.000Z/2040-06-27T23:00:00.000Z"
],
"granularity": "all",
"filter": {
"type": "true"
},
"aggregations": [
{
"type": "arrayOfDoublesSketch",
"name": "sketch",
"fieldName": "user",
"metricColumns" : ["added"]
"nominalEntries": 16384
}
]
,
"postAggregations": [
{
"type" : "arrayOfDoublesSketchToVariances",
"name": "countsketch",
"field" : {"type": "fieldAccess",
"fieldName": "sketch"}
}],
"dimensions": [
{
"type": "default",
"dimension": "countryName",
"outputName": "countryName"
}
]
}Tomer Ben David
01/22/2023, 6:43 AMVijay Narayanan
01/22/2023, 2:33 PMTomer Ben David
01/22/2023, 5:24 PMVijay Narayanan
01/23/2023, 2:55 AMselect TIME_FLOOR(__time,'PT3H')
,TIME_FLOOR(__time,'PT1H') hour1,variance(added) from "wikipedia"
group by grouping sets ((TIME_FLOOR(__time,'PT3H'),TIME_FLOOR(__time,'PT1H')),TIME_FLOOR(__time,'PT3H'))Vijay Narayanan
01/23/2023, 2:56 AM