Skip to content
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] fix array oob in IDGenerator and adjust format for mapping #41703

Merged

Conversation

benwtrent
Copy link
Member

There are two bugs addressed here:

  • Sometimes when generating an ID, the resulting Byte array could be empty (for example, this occurs with an "" empty string). We should handle that scenario by not allowing the byte array to be empty
  • When the user provides a non-standard format for the date_histogram group by pivot, we do not consider it when we create the mapping. We should add their provided format as one of the possible formats for the resulting date field.

closes #41694

@elasticmachine
Copy link
Collaborator

Pinging @elastic/ml-core

Copy link
Member

@davidkyle davidkyle left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@@ -234,8 +234,8 @@ public void testDateHistogramPivot() throws Exception {

// we expect 21 documents as there shall be 21 days worth of docs
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit remove or update the comment

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lulz. Maybe I should just stop writing comments :D

@benwtrent
Copy link
Member Author

run elasticsearch-ci/bwc

@benwtrent benwtrent merged commit 80f8943 into elastic:master May 1, 2019
@benwtrent benwtrent deleted the feature/ml-df-fix-oob-format-bugs branch May 1, 2019 15:22
benwtrent added a commit to benwtrent/elasticsearch that referenced this pull request May 1, 2019
…tic#41703)

* [ML] fix array oob in IDGenerator and adjust format for mapping

* Update DataFramePivotRestIT.java
akhil10x5 pushed a commit to akhil10x5/elasticsearch that referenced this pull request May 2, 2019
…tic#41703)

* [ML] fix array oob in IDGenerator and adjust format for mapping

* Update DataFramePivotRestIT.java
benwtrent added a commit that referenced this pull request May 2, 2019
…) (#41717)

* [ML] fix array oob in IDGenerator and adjust format for mapping

* Update DataFramePivotRestIT.java
gurkankaymak pushed a commit to gurkankaymak/elasticsearch that referenced this pull request May 27, 2019
…tic#41703)

* [ML] fix array oob in IDGenerator and adjust format for mapping

* Update DataFramePivotRestIT.java
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[ML] Data frame transform fails to handle timestamp formatting
4 participants