-
Notifications
You must be signed in to change notification settings - Fork 25.3k
[ML] adds support for non-numeric mapped types #40220
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] adds support for non-numeric mapped types #40220
Conversation
Pinging @elastic/ml-core |
a961460
to
00c70b8
Compare
run elasticsearch-ci/packaging-sample |
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
e); | ||
}), latch)); | ||
try { | ||
latch.await(LOAD_TRANSFORM_TIMEOUT_IN_SECONDS, TimeUnit.SECONDS); |
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.
TIL: I thought fieldMappings
would have to be volatile for the assignment to be visible to the awaiting thread but latch.await is a synchronisation point. https://docs.oracle.com/javase/8/docs/api/java/util/concurrent/package-summary.html#MemoryVisibility.
I presume we are blocking here because super.maybeTriggerAsyncJob(now);
must execute on the calling thread.
run elasticsearch-ci/bwc |
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
run elasticsearch-ci/1 |
run elasticsearch-ci/packaging-sample |
does this title need amending? |
* [ML] adds support for non-numeric mapped types and mapping overrides * correcting hlrc compilation issues after merge * removing mapping_override option * clearing up unnecessary changes
* elastic/master: [DOCS] Adds notable highlights tags (elastic#40330) [ML] making test more determinate (elastic#40374) [ML] adds support for non-numeric mapped types (elastic#40220) Move outbound message handling to OutboundHandler (elastic#40336) Add implicit this for class binding in Painless (elastic#40285) Muting test testExtractIndexCheckpointsInconsistentGlobalCheckpoints (elastic#40371) DOC: polish client docs Fix building bwc versions (elastic#40361)
…-stop-time * elastic/master: [DOCS] Adds notable highlights tags (elastic#40330) [ML] making test more determinate (elastic#40374) [ML] adds support for non-numeric mapped types (elastic#40220) Move outbound message handling to OutboundHandler (elastic#40336) Add implicit this for class binding in Painless (elastic#40285)
This PR does a handful of things to address the issues when creating the destination index mapping and parsing the resulting aggregations before indexing them.
The destination mapping type is taken into account now when extracting the data before putting it into the destination index. Right now all that is considered if the destination is a
Numeric
type or not, but this should not restrict more complex type requirements in the future (if they should arise).Future work:
fields
mapping overrides. This should be added in tandem with our support of such in mapping deduction. Not added in this PR.bucket_script
) do not provide interfaces to accurately determine the resultant type. For this scenario the end user should provide some sort of mapping type for the field result.Alternative designs:
getValueAsString
_source
as strings. This could lead to confusion, especially when considering our_preview
endpoint.getValueAsString
through Java type parsinginteger
is actually akeyword
.closes #39974