Skip to content

Commit c75f7f9

Browse files
author
Hendrik Muhs
committed
fix date patterns
1 parent 2647c8e commit c75f7f9

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

x-pack/plugin/data-frame/qa/single-node-tests/src/test/java/org/elasticsearch/xpack/dataframe/integration/DataFramePivotRestIT.java

+3-3
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,7 @@ public void testDateHistogramPivot() throws Exception {
216216
+ " \"group_by\": {"
217217
+ " \"by_hr\": {"
218218
+ " \"date_histogram\": {"
219-
+ " \"fixed_interval\": \"1h\",\"field\":\"timestamp\",\"format\":\"yyyy-MM-DD_HH\""
219+
+ " \"fixed_interval\": \"1h\",\"field\":\"timestamp\",\"format\":\"yyyy-MM-dd_HH\""
220220
+ " } } },"
221221
+ " \"aggregations\": {"
222222
+ " \"avg_rating\": {"
@@ -250,7 +250,7 @@ public void testPreviewTransform() throws Exception {
250250
config += " \"pivot\": {"
251251
+ " \"group_by\": {"
252252
+ " \"reviewer\": {\"terms\": { \"field\": \"user_id\" }},"
253-
+ " \"by_day\": {\"date_histogram\": {\"fixed_interval\": \"1d\",\"field\":\"timestamp\",\"format\":\"yyyy-MM-DD\"}}},"
253+
+ " \"by_day\": {\"date_histogram\": {\"fixed_interval\": \"1d\",\"field\":\"timestamp\",\"format\":\"yyyy-MM-dd\"}}},"
254254
+ " \"aggregations\": {"
255255
+ " \"avg_rating\": {"
256256
+ " \"avg\": {"
@@ -285,7 +285,7 @@ public void testPivotWithMaxOnDateField() throws Exception {
285285
config +=" \"pivot\": { \n" +
286286
" \"group_by\": {\n" +
287287
" \"by_day\": {\"date_histogram\": {\n" +
288-
" \"fixed_interval\": \"1d\",\"field\":\"timestamp\",\"format\":\"yyyy-MM-DD\"\n" +
288+
" \"fixed_interval\": \"1d\",\"field\":\"timestamp\",\"format\":\"yyyy-MM-dd\"\n" +
289289
" }}\n" +
290290
" },\n" +
291291
" \n" +

x-pack/plugin/src/test/resources/rest-api-spec/test/data_frame/preview_transforms.yml

+5-5
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ setup:
7575
"pivot": {
7676
"group_by": {
7777
"airline": {"terms": {"field": "airline"}},
78-
"by-hour": {"date_histogram": {"fixed_interval": "1h", "field": "time", "format": "yyyy-MM-DD HH"}}},
78+
"by-hour": {"date_histogram": {"fixed_interval": "1h", "field": "time", "format": "yyyy-MM-dd HH"}}},
7979
"aggs": {
8080
"avg_response": {"avg": {"field": "responsetime"}},
8181
"time.max": {"max": {"field": "time"}},
@@ -84,17 +84,17 @@ setup:
8484
}
8585
}
8686
- match: { preview.0.airline: foo }
87-
- match: { preview.0.by-hour: "2017-02-49 00" }
87+
- match: { preview.0.by-hour: "2017-02-18 00" }
8888
- match: { preview.0.avg_response: 1.0 }
8989
- match: { preview.0.time.max: "2017-02-18T00:30:00.000Z" }
9090
- match: { preview.0.time.min: "2017-02-18T00:00:00.000Z" }
9191
- match: { preview.1.airline: bar }
92-
- match: { preview.1.by-hour: "2017-02-49 01" }
92+
- match: { preview.1.by-hour: "2017-02-18 01" }
9393
- match: { preview.1.avg_response: 42.0 }
9494
- match: { preview.1.time.max: "2017-02-18T01:00:00.000Z" }
9595
- match: { preview.1.time.min: "2017-02-18T01:00:00.000Z" }
9696
- match: { preview.2.airline: foo }
97-
- match: { preview.2.by-hour: "2017-02-49 01" }
97+
- match: { preview.2.by-hour: "2017-02-18 01" }
9898
- match: { preview.2.avg_response: 42.0 }
9999
- match: { preview.2.time.max: "2017-02-18T01:01:00.000Z" }
100100
- match: { preview.2.time.min: "2017-02-18T01:01:00.000Z" }
@@ -123,7 +123,7 @@ setup:
123123
"pivot": {
124124
"group_by": {
125125
"airline": {"terms": {"field": "airline"}},
126-
"by-hour": {"date_histogram": {"fixed_interval": "1h", "field": "time", "format": "yyyy-MM-DD HH"}}},
126+
"by-hour": {"date_histogram": {"fixed_interval": "1h", "field": "time", "format": "yyyy-MM-dd HH"}}},
127127
"aggs": {"avg_response": {"avg": {"field": "responsetime"}}}
128128
}
129129
}

0 commit comments

Comments
 (0)