* [Data-Frame] make the config be strictly parsed on _preview * adding test to verify strictly parsing * adjusting test after master merge
This commit is contained in:
parent
8454cfc1b2
commit
6c6549fc51
|
@ -65,7 +65,7 @@ public class PreviewDataFrameTransformAction extends Action<PreviewDataFrameTran
|
||||||
.createParser(parser.getXContentRegistry(),
|
.createParser(parser.getXContentRegistry(),
|
||||||
LoggingDeprecationHandler.INSTANCE,
|
LoggingDeprecationHandler.INSTANCE,
|
||||||
BytesReference.bytes(xContentBuilder).streamInput())) {
|
BytesReference.bytes(xContentBuilder).streamInput())) {
|
||||||
return new Request(DataFrameTransformConfig.fromXContent(newParser, "transform-preview", true));
|
return new Request(DataFrameTransformConfig.fromXContent(newParser, "transform-preview", false));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -88,3 +88,17 @@ setup:
|
||||||
- match: { preview.2.airline: foo }
|
- match: { preview.2.airline: foo }
|
||||||
- match: { preview.2.by-hour: "2017-02-49 01" }
|
- match: { preview.2.by-hour: "2017-02-49 01" }
|
||||||
- match: { preview.2.avg_response: 42.0 }
|
- match: { preview.2.avg_response: 42.0 }
|
||||||
|
|
||||||
|
---
|
||||||
|
"Test preview transform with invalid config":
|
||||||
|
- do:
|
||||||
|
catch: /\[data_frame_terms_group\] unknown field \[not_a_terms_param\]/
|
||||||
|
data_frame.preview_data_frame_transform:
|
||||||
|
body: >
|
||||||
|
{
|
||||||
|
"source": "airline-data",
|
||||||
|
"pivot": {
|
||||||
|
"group_by": {"airline": {"terms": {"not_a_terms_param": "airline"}}},
|
||||||
|
"aggs": {"avg_response": {"avg": {"field": "responsetime"}}}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in New Issue