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

feat(c/driver/postgresql): Read/write support for TIME64[us] #1960

Merged
merged 2 commits into from
Jul 3, 2024

Conversation

WillAyd
Copy link
Contributor

@WillAyd WillAyd commented Jul 1, 2024

One step towards #1950

Just doing microsecond support for now. Can add nanosecond support and time32 as a follow up

Reading was already implemented but untested. Added some shared test data to go with the writer

@WillAyd WillAyd requested a review from lidavidm as a code owner July 1, 2024 22:42
@github-actions github-actions bot added this to the ADBC Libraries 14 milestone Jul 1, 2024
@WillAyd WillAyd changed the title Read/write support for TIME64 with usec precision feat(c/driver/postgresql): Read/write support for TIME64 with usec precision Jul 1, 2024
@WillAyd WillAyd changed the title feat(c/driver/postgresql): Read/write support for TIME64 with usec precision feat(c/driver/postgresql): Read/write support for TIME64[us] Jul 1, 2024
adbc_validation::Handle<struct ArrowArray> array;
struct ArrowError na_error;

const enum ArrowTimeUnit unit = NANOARROW_TIME_UNIT_MICRO;
Copy link
Contributor Author

Choose a reason for hiding this comment

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

hard coded for now, but when we add nano support this will be parametrized (we have the same pattern for timestamp tests)

*out = std::make_unique<PostgresCopyNetworkEndianFieldWriter<int64_t>>();
return NANOARROW_OK;
default:
return ADBC_STATUS_INVALID_STATE;
Copy link
Member

Choose a reason for hiding this comment

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

nit: maybe NOT_IMPLEMENTED?

@lidavidm lidavidm merged commit b7cdb40 into apache:main Jul 3, 2024
63 of 65 checks passed
@WillAyd WillAyd deleted the pg-time-support branch July 3, 2024 00:24
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.

2 participants