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

[master]adding a case of localDateFromWeekBasedDate #73093

Closed

Conversation

qilingzhao
Copy link

adding a case of localDateFromWeekBasedDate function to use YYYY-MM-dd format.
Close issues/72556

@elasticsearchmachine elasticsearchmachine added the external-contributor Pull request authored by a developer outside the Elasticsearch team label May 14, 2021
@elasticmachine elasticmachine added the Team:Analytics Meta label for analytical engine team (ESQL/Aggs/Geo) label May 18, 2021
@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-analytics-geo (Team:Analytics)

@qilingzhao
Copy link
Author

org.elasticsearch.search.aggregations.bucket.composite.LongValuesSource#setAfter use format.parseLong to get timestamp.

org.elasticsearch.common.time.DateFormatters#from(java.time.temporal.TemporalAccessor, java.util.Locale, java.time.ZoneId) don't support "YYYY-MM-dd" pattern, inaccessor.isSupported(MONTH_OF_YEAR) condition, not get the value of month in localDateFromWeekBasedDate.

@not-napoleon
Copy link
Member

I don't think this is a solution we want to adopt. This would be diverging from how Java handles the situation, and potentially creates many more edge cases than we currently have tests for. Mixing week-based and month-based formats virtually always an error, and the solution we've already merged for this issue detects that error and reports it to the user so they can correct their format.

Given that, I'm closing in favor of #74252 (already merged).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
:Analytics/Aggregations Aggregations external-contributor Pull request authored by a developer outside the Elasticsearch team Team:Analytics Meta label for analytical engine team (ESQL/Aggs/Geo) v8.0.0-beta1
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Composite aggregation iterates forever with date_histogram format
7 participants