Skip to content

GH-47016: [C++][FlightSQL] Fix negative timestamps to date types #47017

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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

Antropovi
Copy link
Contributor

@Antropovi Antropovi commented Jul 7, 2025

Rationale for this change

Fix negative timestamps from arrow to date structs when using flightsql odbc.

Are these changes tested?

Yes

Are there any user-facing changes?

No

@Antropovi Antropovi requested a review from lidavidm as a code owner July 7, 2025 15:54
Copy link

github-actions bot commented Jul 7, 2025

⚠️ GitHub issue #47016 has been automatically assigned in GitHub to PR creator.

@alinaliBQ
Copy link
Contributor

Thanks for opening this PR @Antropovi ! I have tested your code changes and it supports dates before 1970 to 1400, but not dates before 1400. I.e., dates with 1399 and earlier years are not yet supported. Will the PR include a fix for dates before 1400 as well? 🙂

By the way, there is an issue for date and timestamp types before 1400 as well: #46978

alinaliBQ added a commit to Bit-Quill/arrow that referenced this pull request Jul 7, 2025
@@ -17,6 +17,7 @@

#include "odbcabstraction/calendar_utils.h"

#include <boost/date_time/posix_time/posix_time.hpp>
Copy link
Member

Choose a reason for hiding this comment

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

Can we use std::chrono instead of Boost? (Currently, Arrow C++ requires C++17 but we'll require C++20 soon #44792 . So we can use C++20 in ODBC support.)
In general, we want to avoid using Boost as much as possible. It's difficult to maintain.

@github-actions github-actions bot added awaiting changes Awaiting changes and removed awaiting review Awaiting review labels Jul 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants