Uh oh!
There was an error while loading. Please reload this page.
ARROW-3923: [Java] JDBC Time Fetches Without Timezone - #3066
Conversation
xhochy
commented
Dec 5, 2018
@jacques-n@siddharthteotia@BryanCutler Can you have a look a this? |
mikepigott
commented
Dec 9, 2018
Hi, I just posted #3133 which adds a configuration class to the conversion process. If you want, I can incorporate that change here, to make this a non-breaking change. |
Bring master up to date.
BryanCutler
commented
Dec 11, 2018
I'm not too familiar with this module, let's ping the original author @atuldambalkar and @laurentgo to possibly take a look |
wesm
commented
Dec 14, 2018
@siddharthteotia@laurentgo@atuldambalkar can you review? |
Week Ending 12/15
laurentgo
commented
Dec 17, 2018
I'll try to give a review asap, but there some danger on relying on the default timezone, especially as Arrow is fairly explicit about timezones (that said, haven't fully reviewed it yet, so might be have addressed...) |
mikepigott
commented
Dec 18, 2018
Thanks @laurentgo for taking a look! I was looking through the Arrow code and it looks like there are various variations on timestamp types, and not all of them require a time zone. The current code forces everything to UTC if a time zone isn't provided, which didn't seem right to me, because the database field itself may not have a time zone attached to it. Likewise, it didn't seem right to enforce a time zone when Arrow didn't appear to need one. |
12/30/18 Pulldown
Hi @mikepigott |
mikepigott
commented
Jan 24, 2019
Hi, 3966 supercedes 3965, but this one is independent - if this PR was rejected, I didn't want to impact those two. Thanks for taking a look! |
atuldambalkar
commented
Jan 25, 2019
Hi @mikepigott - I looked at JDBC ResultSet API and I tend to agree with your changes and use the Calendar object if explicitly provided by the caller. Basically, in case of non-availability of Calendar object from the caller, we will be falling back to the way JDBC ResultSet API implements Date/Time related API. Hi @laurentgo - What's your opinion? |
praveenbingo
left a comment
There was a problem hiding this comment.
would this be backward incompatible? previously UTC would have been used and not the local calendar..
mikepigott
commented
Jan 30, 2019
@praveenbingo - yes, you are right, this is a backwards-incompatible change. I have a separate PR, #3965 that introduces a configuration object. If that PR is approved before this one, I'm happy to rework this PR to use the configuration object and prevent this from being backwards-incompatible. |
Arrow Master 1/29/2019
praveenbingo
commented
Jan 30, 2019
@mikepigott - Done. Please go ahead with your suggestion. Thanks. |
atuldambalkar
commented
Jan 30, 2019
Sounds good @praveenbingo@mikepigott . I will take a look at PR 3966. |
Arrow Master on 2/3
mikepigott
commented
Feb 3, 2019
@praveenbingo: I have pulled in the |
codecov-io
commented
Feb 3, 2019
Codecov Report
@@ Coverage Diff @@## master #3066 +/- ##
==========================================
+ Coverage 87.77% 88.55% +0.77%
==========================================
Files 659 434 -225 Lines 82110 53263 -28847 Branches 1069 0 -1069 ==========================================
- Hits 72076 47165 -24911 + Misses 9923 6098 -3825 + Partials 111 0 -111
Continue to review full report at Codecov.
|
praveenbingo
left a comment
There was a problem hiding this comment.
looks good. Thanks @mikepigott
@wesm@siddharthteotia - Could you please help merging.
xhochy
commented
Feb 4, 2019
@siddharthdave If there are no objections from your side, I'll merge this tomorrow. |
siddharthdave
commented
Feb 4, 2019
@xhochy , you probably meant @siddharthteotia :-) |
xhochy
commented
Feb 5, 2019
Thank you @mikepigott ! |
https://issues.apache.org/jira/browse/ARROW-3923 Hello! I was reading through the JDBC source code and I noticed that a java.util.Calendar was required for creating an Arrow Schema and Arrow Vectors from a JDBC ResultSet, when none is required. This change makes the Calendar optional. Unit Tests: The existing SureFire plugin configuration uses a UTC calendar for the database, which is the default Calendar in the existing code. Likewise, no changes to the unit tests are required to provide adequate coverage for the change. Author: Michael Pigott <mikepigott@users.noreply.github.com> Author: Mike Pigott <mpigott@gmail.com> Closes#3066 from mikepigott/jdbc-timestamp-no-calendar and squashes the following commits: 4d95da0 <Mike Pigott> ARROW-3923: Supporting a null Calendar in the config, and reverting the breaking change. cd9a230 <Mike Pigott> Merge branch 'master' into jdbc-timestamp-no-calendar 509a1cc <Michael Pigott> Merge pull request #5 from apache/master 789c8c8 <Michael Pigott> Merge pull request #4 from apache/master e5b19ee <Michael Pigott> Merge pull request #3 from apache/master 3b17c29 <Michael Pigott> Merge pull request #2 from apache/master 881c6c8 <Michael Pigott> Merge pull request #1 from apache/master 089cff4 <Mike Pigott> Format fixes a58a4a5 <Mike Pigott> Fixing calendar usage. e12832a <Mike Pigott> Allowing for timestamps without a time zone.
https://issues.apache.org/jira/browse/ARROW-3923 Hello! I was reading through the JDBC source code and I noticed that a java.util.Calendar was required for creating an Arrow Schema and Arrow Vectors from a JDBC ResultSet, when none is required. This change makes the Calendar optional. Unit Tests: The existing SureFire plugin configuration uses a UTC calendar for the database, which is the default Calendar in the existing code. Likewise, no changes to the unit tests are required to provide adequate coverage for the change. Author: Michael Pigott <mikepigott@users.noreply.github.com> Author: Mike Pigott <mpigott@gmail.com> Closesapache#3066 from mikepigott/jdbc-timestamp-no-calendar and squashes the following commits: 4d95da0 <Mike Pigott> ARROW-3923: Supporting a null Calendar in the config, and reverting the breaking change. cd9a230 <Mike Pigott> Merge branch 'master' into jdbc-timestamp-no-calendar 509a1cc <Michael Pigott> Merge pull request #5 from apache/master 789c8c8 <Michael Pigott> Merge pull request #4 from apache/master e5b19ee <Michael Pigott> Merge pull request #3 from apache/master 3b17c29 <Michael Pigott> Merge pull request #2 from apache/master 881c6c8 <Michael Pigott> Merge pull request #1 from apache/master 089cff4 <Mike Pigott> Format fixes a58a4a5 <Mike Pigott> Fixing calendar usage. e12832a <Mike Pigott> Allowing for timestamps without a time zone.
https://issues.apache.org/jira/browse/ARROW-3923
Hello! I was reading through the JDBC source code and I noticed that a java.util.Calendar was required for creating an Arrow Schema and Arrow Vectors from a JDBC ResultSet, when none is required.
This change makes the Calendar optional.
Unit Tests:
The existing SureFire plugin configuration uses a UTC calendar for the database, which is the default Calendar in the existing code. Likewise, no changes to the unit tests are required to provide adequate coverage for the change.