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

MB-58134: Skip parsing date time fields with timestamps #1870

Merged
merged 13 commits into from
Sep 8, 2023

Conversation

CascadingRadium
Copy link
Member

Jira

MB-58134

Description

A user can set one of four values as the DateFormat for a DatetimeFieldMapping

  • "unix_micro"
  • "unix_sec"
  • "unix_milli"
  • "unix_nano"

This indicates that the field has a UNIX epoch timestamp in microseconds/seconds/milliseconds/nanoseconds.
Such fields should not be parsed with a date time parser since they already contain the timestamp.
User can perform date range queries on these fields like normal.

Copy link
Member

@Thejas-bhat Thejas-bhat left a comment

Choose a reason for hiding this comment

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

please add some unit tests along these code paths as well.

analysis/type.go Outdated Show resolved Hide resolved
analysis/type.go Outdated Show resolved Hide resolved
analysis/type.go Outdated Show resolved Hide resolved
mapping/document.go Outdated Show resolved Hide resolved
mapping/field.go Outdated Show resolved Hide resolved
@CascadingRadium CascadingRadium marked this pull request as draft September 1, 2023 11:22
@CascadingRadium CascadingRadium marked this pull request as ready for review September 4, 2023 02:42
Copy link
Member

@abhinavdangeti abhinavdangeti left a comment

Choose a reason for hiding this comment

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

Looking good, minor nits.

mapping/index.go Outdated Show resolved Hide resolved
abhinavdangeti
abhinavdangeti previously approved these changes Sep 7, 2023
abhinavdangeti
abhinavdangeti previously approved these changes Sep 7, 2023
@CascadingRadium
Copy link
Member Author

merge conflict again 😅

@CascadingRadium CascadingRadium merged commit d1cd873 into master Sep 8, 2023
9 checks passed
@CascadingRadium CascadingRadium deleted the MB-58134 branch September 8, 2023 07:49
CascadingRadium added a commit that referenced this pull request Sep 13, 2023
A user can set one of four values as the DateFormat for a
DatetimeFieldMapping
- "unix_micro"
- "unix_sec"
- "unix_milli"
- "unix_nano"

This indicates that the field has a UNIX epoch timestamp in
microseconds/seconds/milliseconds/nanoseconds.
Such fields should not be parsed with a date time parser since they
already contain the timestamp.
User can perform date range queries on these fields like normal.
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.

4 participants