Skip to content

Conversation

carlopi
Copy link
Contributor

@carlopi carlopi commented Jul 1, 2025

Without this PR, there are situations where httpfs extension defaults to own HTTPFSUtil, instead of using the global registered one. I think while this currently work, it's somewhat of a code smell, and basically prevent other extensions (or clients, such as duckdb-wasm) to have a clean path to override the default http_util to be used.

This is possibly also a problem connected to introduction of curl in the httpfs extension, since it's not possible for httpfs to offer two interfaces, and register one or the other depending on settings.

This commit forces FileOpener to have a way to return a reference to the original shared_ptr (possibly caching on costructor / other ways). Then the main improvement is the change (currently via a patch) that allows in duckdb-httpfs.

This is a less clunky / slimmer version of #18103, thanks to feedback from @Mytherin.

@carlopi carlopi marked this pull request as ready for review July 1, 2025 13:42
Without this PR, there are situations where `httpfs` extension defaults to own HTTPFSUtil, instead of using the global registered one. I think while this currently work, it's somewhat of a code smell, and basically prevent other extensions (or clients, such as duckdb-wasm) to have a clean path to override the default http_util to be used.

This is possibly also a problem connected to introduction of curl in the `httpfs` extension, since it's not possible for `httpfs` to offer two interfaces, and register one or the other depending on settings.

This commit forces FileOpener to have a way to return a reference to the original shared_ptr<HTTPUtil> (possibly caching on costructor / other ways).
Then the main improvement is the chagnge (currently via a patch) that allows in duckdb-httpfs.

This is an improved / slimmer version of duckdb#18103, thanks to feedback from @Mytherin.
@carlopi carlopi force-pushed the virtual_http_util_on_opener branch from 303f809 to b298ba8 Compare July 1, 2025 14:31
@Mytherin Mytherin merged commit 03a2ddf into duckdb:v1.3-ossivalis Jul 1, 2025
1 check passed
@Mytherin
Copy link
Collaborator

Mytherin commented Jul 1, 2025

Thanks!

carlopi added a commit to carlopi/duckdb_httpfs that referenced this pull request Jul 1, 2025
@carlopi carlopi deleted the virtual_http_util_on_opener branch July 1, 2025 20:32
carlopi added a commit to duckdb/duckdb-httpfs that referenced this pull request Jul 2, 2025
carlopi added a commit to carlopi/duckdb that referenced this pull request Jul 2, 2025
Mytherin added a commit that referenced this pull request Jul 2, 2025
krlmlr added a commit to krlmlr/duckdb-r that referenced this pull request Jul 9, 2025
shared_ptr<HTTPUtil>& must be reached from FileOpener (duckdb/duckdb#18107)
krlmlr added a commit to krlmlr/duckdb-r that referenced this pull request Jul 9, 2025
Use _unsigned_ hugeint for compressed materialization strings (duckdb/duckdb#18128)
Absorb patch from duckdb/duckdb#18107 (duckdb/duckdb#18114)
CI: Actually correctly skip building unnecessary extensions (duckdb/duckdb#18119)
krlmlr added a commit to krlmlr/duckdb-r that referenced this pull request Jul 9, 2025
shared_ptr<HTTPUtil>& must be reached from FileOpener (duckdb/duckdb#18107)
krlmlr added a commit to krlmlr/duckdb-r that referenced this pull request Jul 9, 2025
Use _unsigned_ hugeint for compressed materialization strings (duckdb/duckdb#18128)
Absorb patch from duckdb/duckdb#18107 (duckdb/duckdb#18114)
CI: Actually correctly skip building unnecessary extensions (duckdb/duckdb#18119)
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