You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by "EnricoMi (via GitHub)" <gi...@apache.org> on 2024/11/08 09:03:02 UTC

[PR] GH-44679: [C++] Make `arrow.flight.Timestamp` nanoseconds precision [arrow]

EnricoMi opened a new pull request, #44680:
URL: https://github.com/apache/arrow/pull/44680

   ### What changes are included in this PR?
   Make `arrow.flight.Timestamp` nanoseconds precision and OS-independent.
   
   ### Are these changes tested?
   Existing unit tests are adjusted to the new precision.
   
   ### Are there any user-facing changes?
   The precision of `Timestamp` is increased, so there is no loss of precision for users expected on any operating system. However, typing and time conversion might break for users accessing `FlightEndpoint.expiration_time`.
   
   **This PR includes breaking changes to public APIs.**


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] GH-44679: [C++] Make `arrow.flight.Timestamp` nanoseconds precision [arrow]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #44680:
URL: https://github.com/apache/arrow/pull/44680#issuecomment-2464176701

   :warning: GitHub issue #44679 **has been automatically assigned in GitHub** to PR creator.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] GH-44679: [C++] Make `arrow.flight.Timestamp` nanoseconds precision [arrow]

Posted by "EnricoMi (via GitHub)" <gi...@apache.org>.
EnricoMi commented on PR #44680:
URL: https://github.com/apache/arrow/pull/44680#issuecomment-2464274057

   This fix requires adjustments to the workaround that was required by the bug being fixed here, otherwise we see:
   ```
     /Users/runner/work/arrow/arrow/build/python/build/temp.macosx-10.9-universal2-cpython-311/_flight.cpp:32704:117: error: no viable conversion from 'time_point<[...], duration<[...], ratio<[...], 1000000000>>>' to 'time_point<[...], duration<[...], ratio<[...], 1000000>>>'
         __pyx_v_time_since_epoch = arrow::py::internal::TimePoint_to_ns(arrow::py::internal::TimePoint_from_system_time(__pyx_v_self->endpoint.expiration_time.value()));
                                                                                                                         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     /Applications/Xcode_15.2.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.2.sdk/usr/include/c++/v1/__chrono/time_point.h:33:28: note: candidate constructor (the implicit copy constructor) not viable: no known conversion from 'value_type' (aka 'std::chrono::time_point<std::chrono::system_clock, std::chrono::duration<long long, std::ratio<1, 1000000000>>>') to 'const std::chrono::time_point<std::chrono::system_clock> &' for 1st argument
     class _LIBCPP_TEMPLATE_VIS time_point
                                ^
     /Applications/Xcode_15.2.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.2.sdk/usr/include/c++/v1/__chrono/time_point.h:33:28: note: candidate constructor (the implicit move constructor) not viable: no known conversion from 'value_type' (aka 'std::chrono::time_point<std::chrono::system_clock, std::chrono::duration<long long, std::ratio<1, 1000000000>>>') to 'std::chrono::time_point<std::chrono::system_clock> &&' for 1st argument
     /Applications/Xcode_15.2.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.2.sdk/usr/include/c++/v1/__chrono/time_point.h:52:5: note: candidate template ignored: requirement 'is_convertible<std::chrono::duration<long long, std::ratio<1, 1000000000>>, std::chrono::duration<long long, std::ratio<1, 1000000>>>::value' was not satisfied [with _Duration2 = std::chrono::duration<long long, std::ratio<1, 1000000000>>]
         time_point(const time_point<clock, _Duration2>& __t,
         ^
     /Applications/Xcode_15.2.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.2.sdk/usr/include/c++/v1/__chrono/time_point.h:47:70: note: explicit constructor is not a candidate
         _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX14 explicit time_point(const duration& __d) : __d_(__d) {}
                                                                          ^
     /Users/runner/work/arrow/arrow/build/python/pyarrow/src/arrow/python/datetime.h:157:83: note: passing argument to parameter 'val' here
     inline TimePoint TimePoint_from_system_time(std::chrono::system_clock::time_point val) {
   ```
   https://github.com/apache/arrow/actions/runs/11739134400/job/32703039954?pr=44680#step:9:3472
   https://ci.appveyor.com/project/ApacheSoftwareFoundation/arrow/builds/50948313#L3478
   
   Prefer to fix this in C++ and revert the workaround in Python in one PR: #44681


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] GH-44679: [C++] Make `arrow.flight.Timestamp` nanoseconds precision [arrow]

Posted by "EnricoMi (via GitHub)" <gi...@apache.org>.
EnricoMi closed pull request #44680: GH-44679: [C++] Make `arrow.flight.Timestamp` nanoseconds precision
URL: https://github.com/apache/arrow/pull/44680


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org