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

ORC-212 ORC-213 Fix timestamp pattern and added new test #130

Closed
wants to merge 1 commit into from

Conversation

spasam
Copy link
Contributor

@spasam spasam commented Jun 7, 2017

ORC-212: JSON convert should properly convert Timestamp string to java.sql.Timestamp
ORC-213: Fix Timestamp regex in JsonSchemaFinder

@@ -58,7 +58,7 @@
private static final Pattern TIMESTAMP_PATTERN =
Pattern.compile("^[\"]?([0-9]{4}[-/][0-9]{2}[-/][0-9]{2})[T ]" +
"([0-9]{2}:[0-9]{2}:[0-9]{2})" +
"(([ ][-+]?[0-9]{2}([:][0-9]{2})?)|Z)?[\"]?$");
"(([ ]?[-+]?[0-9]{2}([:][0-9]{2})?)|Z)?[\"]?$");
Copy link
Contributor

Choose a reason for hiding this comment

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

I'd propose that this should be "( [-+]?|[-+])" instead of "[ ]?[-+]?". It doesn't seem right to accept
"2016-12-30T12:34:5608"

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@omalley Good catch. Let me tweak this!

Convert timestamp with timezone to correct UTC time.
@omalley
Copy link
Contributor

omalley commented Jul 17, 2017

Can you please create a jira for this issue? Thanks! http://orc.apache.org/bugs

@spasam spasam changed the title Fix timestamp pattern and added new test ORC-212 ORC-213 Fix timestamp pattern and added new test Jul 18, 2017
@asfgit asfgit closed this in b010f4d Jul 24, 2017
asfgit pushed a commit that referenced this pull request Jul 24, 2017
Fixes #130

Signed-off-by: Owen O'Malley <omalley@apache.org>
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.

None yet

2 participants