Skip to content

Commit

Permalink
[ML DataFrame] Use date histogram fixed_interval syntax
Browse files Browse the repository at this point in the history
and remove test skip
  • Loading branch information
davidkyle committed May 28, 2019
1 parent 777be09 commit 0de1177
Showing 1 changed file with 2 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -130,21 +130,15 @@ setup:
---
"Test preview returns bad request with invalid agg":
- skip:
reason: date histo interval is deprecated
features: "warnings"

- do:
warnings:
- "[interval] on [date_histogram] is deprecated, use [fixed_interval] or [calendar_interval] in the future."
catch: bad_request
data_frame.preview_data_frame_transform:
body: >
{
"source": { "index": "airline-data" },
"pivot": {
"group_by": {
"time": {"date_histogram": {"interval": "1h", "field": "time", "format": "yyyy-MM-DD HH"}}},
"time": {"date_histogram": {"fixed_interval": "1h", "field": "time", "format": "yyyy-MM-DD HH"}}},
"aggs": {
"avg_response": {"avg": {"field": "responsetime"}},
"time.min": {"min": {"field": "time"}}
Expand All @@ -153,16 +147,14 @@ setup:
}
- do:
warnings:
- "[interval] on [date_histogram] is deprecated, use [fixed_interval] or [calendar_interval] in the future."
catch: /mixed object types of nested and non-nested fields \[time.min\]/
data_frame.preview_data_frame_transform:
body: >
{
"source": { "index": "airline-data" },
"pivot": {
"group_by": {
"time": {"date_histogram": {"interval": "1h", "field": "time", "format": "yyyy-MM-DD HH"}}},
"time": {"date_histogram": {"fixed_interval": "1h", "field": "time", "format": "yyyy-MM-DD HH"}}},
"aggs": {
"avg_response": {"avg": {"field": "responsetime"}},
"time.min": {"min": {"field": "time"}}
Expand Down

0 comments on commit 0de1177

Please sign in to comment.