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

Change default format for date_nanos field #70463

Merged
merged 5 commits into from
Mar 17, 2021

Conversation

jimczi
Copy link
Contributor

@jimczi jimczi commented Mar 16, 2021

This commit updates the default format of date_nanos field
on existing and new indices to use strict_date_optional_time_nanos instead of
strict_date_optional_time.
Using strict_date_optional_time as the default format for date_nanos doesn't
make sense because it accepts and parses dates with nanosecond precision,
but when it formats it drops the nanoseconds.
The change should be transparent for users, these formats accept the same input.

Relates #69192
Closes #67063

This commit updates the default format of date_nanos field
on existing and new indices to use `strict_date_optional_time_nanos` instead of
`strict_date_optional_time`.
Using `strict_date_optional_time` as the default format for date_nanos doesn't
make sense because it accepts and parses dates with nanosecond precision,
but when it formats it drops the nanoseconds.
The change should be transparent for users, these formats accept the same input.

Relates elastic#69192
Closes elastic#67063
@jimczi jimczi added >enhancement :Search Foundations/Mapping Index mappings, including merging and defining field types v8.0.0 v7.13.0 labels Mar 16, 2021
@elasticmachine elasticmachine added the Team:Search Meta label for search team label Mar 16, 2021
@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-search (Team:Search)

Copy link
Contributor

@jtibshirani jtibshirani left a comment

Choose a reason for hiding this comment

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

This seems like a nice, simple fix!

Copy link
Contributor

@jtibshirani jtibshirani left a comment

Choose a reason for hiding this comment

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

This looks good to me. I couldn't think of a way in which this would be 'breaking', it feels more like an enhancement or even bug fix.

@jimczi jimczi merged commit 701abc6 into elastic:master Mar 17, 2021
@jimczi jimczi deleted the date_nanos_default_format branch March 17, 2021 10:40
jimczi added a commit that referenced this pull request Mar 17, 2021
This commit updates the default format of date_nanos field
on existing and new indices to use `strict_date_optional_time_nanos` instead of
`strict_date_optional_time`.
Using `strict_date_optional_time` as the default format for date_nanos doesn't
make sense because it accepts and parses dates with nanosecond precision,
but when it formats it drops the nanoseconds.
The change should be transparent for users, these formats accept the same input.

Relates #69192
Closes #67063
jimczi added a commit that referenced this pull request Mar 17, 2021
jimczi added a commit that referenced this pull request Mar 18, 2021
This commit updates the default format of date_nanos field
on existing and new indices to use `strict_date_optional_time_nanos` instead of
`strict_date_optional_time`.
Using `strict_date_optional_time` as the default format for date_nanos doesn't
make sense because it accepts and parses dates with nanosecond precision,
but when it formats it drops the nanoseconds.
The change should be transparent for users, these formats accept the same input.

Relates #69192
Closes #67063
jimczi added a commit to jimczi/elasticsearch that referenced this pull request Mar 25, 2021
This change rewrites the rolling upgrade yml test that was added for
date_nanos in Java. This is needed to allow extra logic when backporting to
7.x. date_nanos are not available in 6.x so we need to skip the upgraded test
based on the version of the old cluster.

Relates elastic#70463
jimczi added a commit that referenced this pull request Mar 26, 2021
This change rewrites the rolling upgrade yml test that was added for
date_nanos in Java. This is needed to allow extra logic when backporting to
7.x. date_nanos are not available in 6.x so we need to skip the upgraded test
based on the version of the old cluster.

Relates #70463
jimczi added a commit that referenced this pull request Mar 26, 2021
This change rewrites the rolling upgrade yml test that was added for
date_nanos in Java. This is needed to allow extra logic when backporting to
7.x. date_nanos are not available in 6.x so we need to skip the upgraded test
based on the version of the old cluster.

Relates #70463
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
>enhancement :Search Foundations/Mapping Index mappings, including merging and defining field types Team:Search Meta label for search team v7.13.0 v8.0.0-alpha1
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Improve default format for date_nanos fields
4 participants