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

NIFI-2576 - PutSQL assumes all Timestamps are provided in Epoch #869

Closed
wants to merge 6 commits into from

Conversation

patricker
Copy link
Contributor

This change allows for either epoch timestamps or "yyyy-MM-dd hh:mm:ss.SSS" format; which is the format you get when you call ResultSet.getString on a JDBC Timestamp column.

Also include a unit test for PutSQL to test both flavors of Timestamps.

@bbende
Copy link
Contributor

bbende commented Aug 16, 2016

@patricker thanks for the contribution! Definitely makes sense to support both formats...

What do you think about using a regex to determine if it is a long, and if so then parseLong, otherwise attempt to parse a date? (could be the other way around, but I was thinking the regex for a long is easiest)

I'm thinking of the case where someone is always sending in longs and it is continuously throwing/catching the parse exception, that may end up being expensive.

@patricker
Copy link
Contributor Author

patricker commented Aug 16, 2016

@bbende I can go for that. Updated.

@asfgit asfgit closed this in b22500d Aug 16, 2016
@bbende
Copy link
Contributor

bbende commented Aug 16, 2016

Thanks for update, merged to master!

Just an FYI, I had a bit of trouble getting the changes to apply from the PR onto master... for future it would be easiest to have a specific branch with only one commit for the initial PR, rather than submitting from your master to NiFi master. Thanks again.

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