-
Notifications
You must be signed in to change notification settings - Fork 24.9k
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
[FEATURE][ML] Only write numeric fields to data frame #35961
[FEATURE][ML] Only write numeric fields to data frame #35961
Conversation
Pinging @elastic/ml-core |
df36f47
to
9b3e32f
Compare
...gin/ml/src/main/java/org/elasticsearch/xpack/ml/analytics/DataFrameDataExtractorFactory.java
Outdated
Show resolved
Hide resolved
Co-Authored-By: dimitris-athanasiou <dimitris@elastic.co>
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.
Looks good, although I left one suggestion for tightening up immutability of a constant.
COMPATIBLE_FIELD_TYPES = Stream.of(NumberFieldMapper.NumberType.values()) | ||
.map(NumberFieldMapper.NumberType::typeName) | ||
.collect(Collectors.toSet()); | ||
COMPATIBLE_FIELD_TYPES.add("scaled_float"); // have to add manually since scaled_float is in a module |
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 would be nice if COMPATIBLE_FIELD_TYPES
was assigned a Collections.unmodifiableSet
. So the static block could build up a temporary set then assign an unmodifiable version to COMPATIBLE_FIELD_TYPES
at the end.
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.
Done
No description provided.