Repository navigation
Statically link DuckDB ICU and JSON extensions - #85
Merged
Merged
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #85 +/- ##
=======================================
Coverage 91.67% 91.67%
=======================================
Files 13 13
Lines 2523 2523
=======================================
Hits 2313 2313
Misses 210 210 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Statically links DuckDB's ICU and JSON extensions so that time zone aware SQL works reliably and offline.
Problem
The crates.io
duckdbpackage omits the ICU extension. DuckDB downloads it fromextensions.duckdb.orgon first use and loads it in the middle of binding a query. This triggers a DuckDB bug where function binding picks the wrong function, so queries likedate_trunc('day', timestamp AT TIME ZONE 'UTC')failed in roughly 8 of 10 runs with random binder errors. Without ICU,timestamp::DATEandnow() - INTERVAL 1 DAYalso fail, which the skill worked around. The JSON extension was also downloaded at runtime.Changes
v1.10505.0git tag with thebundled-cmake,icuandjsonfeatures (the crates.io package omits the DuckDB sources needed to build ICU)AT TIME ZONEin the date example,epoch_nsarithmetic for time bounds) and document that SQL date functions and output use the system time zoneduckdbby dependency name so the grouping rule still applies to the git dependencyVerification
~/.duckdbCost
Download sizes grow by 3.4 to 4.4 MB (+20 to 24%) per platform, e.g. macOS arm64 16.6 MB -> 20.2 MB. The x64 Windows build job takes about 30 minutes instead of 21.