Repository navigation
build(duckdb): bump libduckdb to 2.0.0 - #3928
Merged
Merged
Conversation
…lashes and NULL-typed members
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.
Summary
libs-6), the iOSDuckDB.xcframework(libs-6), and the Linux duckdb crate 1.10506.1 to 1.20000.1..duckdbbackup and restore of a database with foreign keys. On 1.5,COPY FROM DATABASE ... (DATA)copies tables in no foreign-key order. 2.0 copies them in dependency order (duckdb/duckdb@c111e955fb).storage_compatibility_version = 'v0.10.2', 1.x's default, in the macOS plugin, the iOS driver and the Linux driver. New, attached and backup files stay on storage 64, readable by TablePro 0.84, the 1.5 CLI and other 1.x tools.build-duckdb.shandbuild-duckdb-ios.shfollow 2.0's linking model: per-extension describe functions registered by DuckDB's generated loader (duckdb_register_static_extensions) replace theDUCKDB_EXTENSION_*_LINKEDdefines. macOS links the loader's autoregister object, which-force_loadkeeps. iOS calls the loader before the first open, as DuckDB's own Swift package does.DUCKDB_EXPLICIT_VERSION. Without it 2.0 builds asv2.0.0-dev1, and automatic installs of httpfs and quack look in a commit-named folder.httplibandloadable_extensionson macOS,httplibonly on iOS.local_extension_repositoryis left out: it points automatic installs at the build machine.duckdb-ios-extensions.cmake. httpfs needs libcurl, which the iOS SDK ships no headers for, so that config never built. The published framework (feat(ios): DuckDB support for files and in-memory databases #1537) predates them (feat(plugin-duckdb): add remote Quack protocol connections #1720), and the iOS app uses neither.duckdb.his 2.0.0's. No C API the plugin calls changed signature. The deprecated value API still compiles:DUCKDB_API_ALLOW_DEPRECATEDdefaults to 1.-force_load, as the plugin does. Newapple/scripts/probes/check-duckdb-storage-version.sh.main, unrelated to this bump:check-duckdb-table-listing-parity.shand the corpus harness left outPlugins/SharedandTableProSQLVocabulary, andcheck-duckdb-offline-metadata.shnever linked the PluginKit thatDuckDBSchemaQueries.swiftimports since feat(sqlite): attach more database files to a SQLite, libSQL or DuckDB connection #3748. They now build what the plugin links.value_offset_at, since Arrow 60 deprecatesvalue_offset.comfy-tablemoves from 7 to 8, the copy Arrow 60 already builds. The text table export ports its psql border preset to 8'sTableStyle, and its 7 tests pass unchanged.num-bigint0.5 joins 0.4, which oo7 and bollard need; deny.toml only warns on duplicates.ATTACHpath and opens the text it casts to, so'<path>'::BLOBor'<dir>/' || ('<name>')could attach a file another window holds past the open-file check. The driver now has DuckDB evaluate the path asCAST(... AS VARCHAR), reads a call's or a type's parentheses as part of the path, and refuses anATTACHwhose path it cannot evaluate instead of running it unchecked.NestedToVarcharCast::LOOKUP_TABLE), and keeps an untyped NULL as typeNULL, an ArrowNullArrayinside a struct or list. The nested decoder follows both.libpg_queryis gone from 2.0.~matches part of a string, integer division by zero errors, andX'..'is a BLOB. TablePro's own DuckDB SQL uses none of these.DuckDBDriverTests.testStreamThrowsAnErrorRaisedAfterItsFirstChunks(iOS) setsstreaming_buffer_size = '1MB'. 2.0's default rose from 976.5 KiB to 10 MiB, so the 250,001-row query ran to its error insideduckdb_execute_pending, before any fetch.a_string_is_quoted_only_where_duckdb_quotes_it(Linux):a\bnow prints as'a\\b'.every_spelling_of_an_open_file_is_refused(Linux):40 + 2and anE'\u..'path are no longer parse errors on 2.0, so they leave the refused-by-DuckDB list. Three expression spellings of the open file join the refused list.U&'...'is now a Binder error.a_rowid_moves_when_a_checkpoint_compacts_the_table(Linux): deletes enough rows that a checkpoint compacts in both formats. On a v2.0-format file the old delete left rowid 390000 in place, while the pinned format still moved it to 152400.a_new_or_attached_database_stays_readable_by_duckdb_1(Linux, new) writes each database in its own transaction.Test plan
FK backup and restore with the plugin's
.duckdbstatements: 9 tables, about 926k rows, parents, children, grandchildren, two parents per row, and a self-referencing FK whose column is NULL. Each statement goes throughduckdb_prepare, as the plugin sends it. 1.5.2 refusesCOPY FROM DATABASEthere ("Cannot prepare multiple statements at once"), so the harness sends(SCHEMA)then(DATA). 2.0 prepares it as one statement.libs-5)libs-6)Storage, written by 2.0.0 and read back with the 1.5.2 library and the 1.5.2 CLI:
v0.10.2v2.0.0+, 1.5.2 refuses itv1.0.0+, 1.5.2 reads itATTACHof a new filev2.0.0+, refusedv1.0.0+, read.duckdbbackupv2.0.0+, refusedv1.0.0+, readCHECKPOINTv1.0.0+, readv1.0.0+, readbuild-duckdb.shchecks each slice: it links under-force_loadand loads core_functions, json, parquet, icu and autocomplete offline.build-duckdb-ios.shlink-checks both slices without-force_load.libs-6:check-duckdb-extensions,check-duckdb-access-mode(sqlite_scanner autoinstalls from thev2.0.0folder),check-duckdb-value-api(36 types) andcheck-duckdb-storage-versionpass.check-sql-lexical-grammar.sh duckdbon the 2.0 CLI: 14 of 14, so the PEG parser lexes asSQLLexicalProfilesays.search_pathandschemaafterUSE, a nestedBEGINaborting withDUCKDB_ERROR_TRANSACTION,txid_current(), and no SERIAL or identity column.verify.sh ioswith the DuckDB suites: 32 of 32, including the newDuckDBDriverStorageVersionTests.check-column-type-corpus.sh duckdb, the real driver on 2.0.0: 352 of 352.check-duckdb-table-listing-parity.sh: PASS.check-duckdb-offline-metadata.sh: every schema query runs with no extension available.verify.sh plugins: PASS, andverify-plugin-loads.shloads all 43 plugins, DuckDBDriver and ParquetExport among them.verify.sh teston the DuckDB-related suites (NativeDump*, DuckDBDumpStatementTests, DatabaseFileClassifierTests, the statement gates, QueryClassifierLexicalTests, ScopedDriverRoutingTests, PluginMetadataRegistryCuratedCapabilityTests): 161 of 161.verify.sh build: PASS.verify.sh linton the changed Swift files: 0 violations.shellcheckon the changed scripts: clean.cargo fmt --checkpasses.tablepro-netdoes not compile on macOS (set_tcp_user_timeout), so the driver tests and clippy run in CI's Linux fast checks.