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

refactor(c/driver/shared): created shared util library for drivers #582

Merged
merged 4 commits into from
Apr 12, 2023

Conversation

WillAyd
Copy link
Contributor

@WillAyd WillAyd commented Apr 10, 2023

Per @lidavidm comment #577 (comment) made this act similar to the current nanoarrow setup

@@ -69,6 +69,15 @@ set_target_properties(nanoarrow
"${REPOSITORY_ROOT}/c/vendor/"
POSITION_INDEPENDENT_CODE ON)

# Shared ADBC Driver libraries
add_library(adbc_driver_shared STATIC EXCLUDE_FROM_ALL
Copy link
Member

Choose a reason for hiding this comment

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

It's a bit confusing to name this 'driver_shared' while it's a static library (usually in Arrow libraries that convention means this is a dynamic library). Maybe driver_common?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yea that makes more sense

@lidavidm
Copy link
Member

Looks like R needs adjusting since it vendors the SQLite sources.

@lidavidm lidavidm changed the title feat(c/driver/shared): created shared util library for drivers refactor(c/driver/shared): created shared util library for drivers Apr 12, 2023
Copy link
Member

@lidavidm lidavidm left a comment

Choose a reason for hiding this comment

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

Thanks!

@lidavidm lidavidm merged commit 851c1bd into apache:main Apr 12, 2023
@lidavidm lidavidm added this to the ADBC Libraries 0.4.0 milestone Apr 12, 2023
@WillAyd WillAyd deleted the refactor-util branch April 12, 2023 17:15
@WillAyd
Copy link
Contributor Author

WillAyd commented Apr 12, 2023

Trying to consolidate some of the implementations in a follow up and I noticed that StringBuilder in the postgres util implementation uses sstream so is dependent upon a C++ compiler. Do you think it is better to stick with that or should we make the common utils cross-compatible between the languages?

@lidavidm
Copy link
Member

The SQLite utils are explicitly in C since the SQLite driver is C.

@lidavidm
Copy link
Member

So in that case there may be no point consolidating.

@WillAyd
Copy link
Contributor Author

WillAyd commented Apr 12, 2023

Interesting. It would take some effort but I wonder if the common utils then shouldn't just be written in C to increase compatability.

Ignoring the C/C++ distinction there are like-named macros in both util files today with different definitions; will probably be easier to align that first and worry about things like the StringBuilder C/C++ differences later

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