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

flag truncate_timestamps added to fetcharrow functions #209

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

JorgeGarciaIrazabal
Copy link

#207
Arrow only allows timestamps with years between 1400 to 9999.
Adding the new boolean parameter truncate_timestamps to functions fetchallarrow and fetcharrowbatches to truncate the value to the valid range instead of throwing.

@JorgeGarciaIrazabal
Copy link
Author

It looks like OSX if failing but I don't think it is related to this PR (I might be wrong though)

@MathMagique
Copy link
Member

Hi @JorgeGarciaIrazabal - Could you please try rebasing to master and reopen the PR? OSX is fixed there.

@JorgeGarciaIrazabal JorgeGarciaIrazabal force-pushed the feature/truncated-timestamp-for-valid-arrow-range branch from c795f3f to 997f327 Compare April 8, 2019 13:32
@codecov-io
Copy link

codecov-io commented Apr 8, 2019

Codecov Report

Merging #209 into master will increase coverage by 0.05%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #209      +/-   ##
==========================================
+ Coverage   98.59%   98.65%   +0.05%     
==========================================
  Files         136      145       +9     
  Lines        2999     3349     +350     
==========================================
+ Hits         2957     3304     +347     
- Misses         42       45       +3
Impacted Files Coverage Δ
cpp/turbodbc/Library/src/time_helpers.cpp 100% <100%> (ø) ⬆️
cpp/turbodbc_arrow/Library/src/python_bindings.cpp 100% <100%> (ø) ⬆️
python/turbodbc/cursor.py 98.97% <100%> (ø)
...pp/turbodbc_arrow/Library/src/arrow_result_set.cpp 96.24% <100%> (-0.44%) ⬇️
...urbodbc_arrow/Test/tests/arrow_result_set_test.cpp 100% <100%> (ø) ⬆️
python/turbodbc/constructors.py 100% <0%> (ø)
python/turbodbc/exceptions.py 100% <0%> (ø)
python/turbodbc/__init__.py 100% <0%> (ø)
python/turbodbc/options.py 100% <0%> (ø)
... and 5 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 8592759...c488cc5. Read the comment docs.

@JorgeGarciaIrazabal
Copy link
Author

JorgeGarciaIrazabal commented Apr 8, 2019

Hi @JorgeGarciaIrazabal - Could you please try rebasing to master and reopen the PR? OSX is fixed there.

@MathMagique I have a different error after rebasing, I am not 100% sure why it failed this time though.

Arrow only allows timestamps within years between 1400 to 9999.
This new flag will allow to truncate the dates preventing errors.
@JorgeGarciaIrazabal JorgeGarciaIrazabal force-pushed the feature/truncated-timestamp-for-valid-arrow-range branch from 997f327 to c488cc5 Compare April 15, 2019 13:21
@JorgeGarciaIrazabal
Copy link
Author

@MathMagique running the job again, all the checks passed! let me know if you want me to change/add anything to the PR. Thanks in advance

@xhochy
Copy link
Collaborator

xhochy commented Apr 22, 2019

This is not an issue with Arrow but with boost::gregorian::date in the date_to_days function. I would rather fix that than have this truncation workaround.

@JorgeGarciaIrazabal
Copy link
Author

This is not an issue with Arrow but with boost::gregorian::date in the date_to_days function. I would rather fix that than have this truncation workaround.

Yeah, that makes more sense. Unfortunately, with my limited c++ experience, I can not think of a better alternative for the library. Are you guys planing on working on this any time soon?

@mariusvniekerk
Copy link
Contributor

@wesm, @xhochy what would be the approrpriate changes to make in Arrow, I took at look at the datetime parts of arrow-cpp but it wasn't clear to me what we can use instead of boost::gregorian ?

@JorgeGarciaIrazabal JorgeGarciaIrazabal force-pushed the feature/truncated-timestamp-for-valid-arrow-range branch from 2f4e5f5 to c488cc5 Compare July 31, 2019 19:49
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

5 participants