-
Notifications
You must be signed in to change notification settings - Fork 25.6k
[ML][Data Frame] Add deduced mappings to _preview response payload #43742
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[ML][Data Frame] Add deduced mappings to _preview response payload #43742
Conversation
|
Pinging @elastic/ml-core |
hendrikmuhs
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
1 question, looks good otherwise.
Wondering about check in: do not we have to use Version.Current and change it to 7.3.0 in a followup to not break BWC?
| out.writeMapWithConsistentOrder(doc); | ||
| } | ||
| if (out.getVersion().onOrAfter(Version.V_7_3_0)) { | ||
| out.writeMap(mappings); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it seems mappings can be null, so would it make sense to use optional?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@hendrikmuhs writeMap and readMap when it is just a Map<String,Object> handles null values internally.
There are also no BWC tests yet...still waiting on PR: #43506
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok checked it, implicit magic, well...
hendrikmuhs
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
| out.writeMapWithConsistentOrder(doc); | ||
| } | ||
| if (out.getVersion().onOrAfter(Version.V_7_3_0)) { | ||
| out.writeMap(mappings); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok checked it, implicit magic, well...
|
run elasticsearch-ci/1 |
|
@elasticmachine update branch |
…lastic#43742) * [ML][Data Frame] Add deduced mappings to _preview response payload * updating preview docs
This updates the
_previewresponse payload to include the deduced mappings. The "mapping" format returned fromPivot#deduceMappingshas a non-standard format of{"field1": "field1Type", "field2.subfield": "field2.subfieldType"}. So, I opted to transform it so that it is in an appropriate format ofRelated to: elastic/kibana#39250