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

pad timestamps shorter than 14 chars #82

Closed
wants to merge 1 commit into from

Conversation

galgeek
Copy link
Contributor

@galgeek galgeek commented May 12, 2020

outbackcdx allows ingest of records with timestamps shorter than 14 characters, but queries returning such records log this error:

java.time.format.DateTimeParseException: Text '200012041600' could not be parsed at index 12 at java.time.format.DateTimeFormatter.parseResolved0(DateTimeFormatter.java:1949) at java.time.format.DateTimeFormatter.parse(DateTimeFormatter.java:1851) at java.time.LocalDateTime.parse(LocalDateTime.java:492) at outbackcdx.Capture.parseTimestamp(Capture.java:257) ...

Padding shorter timestamps with 0s should help us return them.

@galgeek galgeek marked this pull request as draft May 12, 2020 03:40
Copy link
Member

@ato ato left a comment

Choose a reason for hiding this comment

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

Looks ok as a way to avoid the exception. Note that the records won't be in the "correct" order in the index though so if queries behave a bit oddly you may want to pad at indexing time instead.

@galgeek galgeek closed this May 13, 2020
@galgeek galgeek deleted the timestamp_pad branch May 13, 2020 22:44
@ato ato mentioned this pull request May 18, 2020
@galgeek
Copy link
Contributor Author

galgeek commented May 19, 2020

new and improved in #85

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

Successfully merging this pull request may close these issues.

2 participants