-
Notifications
You must be signed in to change notification settings - Fork 25.6k
Closed
Labels
:Analytics/AggregationsAggregationsAggregations>bugTeam:AnalyticsMeta label for analytical engine team (ESQL/Aggs/Geo)Meta label for analytical engine team (ESQL/Aggs/Geo)
Description
When trying to apply a date_histogram aggregation with a timezone which isn't utc (tested with Europe/Berlin) on a date_nanos field, elasticsearch responds with a unsupported_operation_exception.
Tested version: 7.0 snapshot
Steps to reproduce:
- Create an index like described in the docs: https://www.elastic.co/guide/en/elasticsearch/reference/7.0/date_nanos.html
- Execute the following query:
GET my_index/_search
{
"version": true,
"size": 500,
"sort": [{ "date": { "order": "desc", "unmapped_type": "boolean" } }],
"_source": { "excludes": [] },
"aggs": {
"2": {
"date_histogram": {
"field": "date",
"interval": "30s",
"time_zone": "Europe/Berlin",
"min_doc_count": 1
}
}
},
"docvalue_fields": [{ "field": "date", "format": "date_time" }],
"query": {
"bool": {
"must": [
{
"range": {
"date": { "gte": 1050572204889, "lte": 1550573104889, "format": "epoch_millis" }
}
}
]
}
},
"timeout": "30000ms"
}
expected response: status code 200 and hits in the payload
actual response:
{
"error": {
"root_cause": [
{
"type": "unsupported_operation_exception",
"reason": null
}
],
"type": "search_phase_execution_exception",
"reason": "all shards failed",
"phase": "query",
"grouped": true,
"failed_shards": [
{
"shard": 0,
"index": "my_index",
"node": "mTfaCthlT8uvuCLbfUtPCQ",
"reason": {
"type": "unsupported_operation_exception",
"reason": null
}
}
],
"caused_by": {
"type": "unsupported_operation_exception",
"reason": null,
"caused_by": {
"type": "unsupported_operation_exception",
"reason": null
}
}
},
"status": 500
}
The same query with "time_zone": "UTC", works correctly.
Metadata
Metadata
Assignees
Labels
:Analytics/AggregationsAggregationsAggregations>bugTeam:AnalyticsMeta label for analytical engine team (ESQL/Aggs/Geo)Meta label for analytical engine team (ESQL/Aggs/Geo)