Skip to content

Support DuckDB 2.0 alongside 1.5 - #17

Merged
BorisBesky merged 5 commits into
mainfrom
ccr-a35174e0-kx733o
Oct 16, 2026
Merged

BorisBesky merged 5 commits into
mainfrom
ccr-a35174e0-kx733o

Conversation

@BorisBesky

Copy link
Copy Markdown
Owner

DuckDB 2.0 changed internal C++ APIs the extension uses. One source tree now
builds against both, with the differences confined to two headers selected at
compile time via __has_include:

  • firestore_duckdb_compat.hpp: Identifier names, GetDataMutable,
    SetChildCardinality, table-function parameters declared through
    FunctionSignature (named params as typed kwargs, varargs as *args),
    comparisons bound as function expressions, and accessor-only members on
    bound expressions, column bindings and aggregates.
  • firestore_variant.hpp: VariantValue was removed in 2.0; a small tree with
    the same interface is streamed into VariantBuilder instead. On 1.5 it is
    VariantValue itself.

On 2.0, positional table-function arguments are named in the signature so
duckdb_functions() keeps reporting real names. The unused TableFilter-based
ConvertDuckDBFilter is removed (pushdown goes through
pushdown_complex_filter). CI gains an informational DuckDB 2.0 build job.

Co-Authored-By: Claude Opus 5.5 noreply@anthropic.com
Claude-Session: https://claude.ai/code/session_0159dLVN7efE1WXtE1L97Us8

DuckDB 2.0 changed internal C++ APIs the extension uses. One source tree now
builds against both, with the differences confined to two headers selected at
compile time via __has_include:

- firestore_duckdb_compat.hpp: Identifier names, GetDataMutable,
  SetChildCardinality, table-function parameters declared through
  FunctionSignature (named params as typed kwargs, varargs as *args),
  comparisons bound as function expressions, and accessor-only members on
  bound expressions, column bindings and aggregates.
- firestore_variant.hpp: VariantValue was removed in 2.0; a small tree with
  the same interface is streamed into VariantBuilder instead. On 1.5 it is
  VariantValue itself.

On 2.0, positional table-function arguments are named in the signature so
duckdb_functions() keeps reporting real names. The unused TableFilter-based
ConvertDuckDBFilter is removed (pushdown goes through
pushdown_complex_filter). CI gains an informational DuckDB 2.0 build job.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0159dLVN7efE1WXtE1L97Us8
- 'not-a-list' passed for a VARCHAR[] argument now fails with a cast error on
  2.0 rather than 'No function matches'; accept either.
- The empty-list batch test used an untyped [] (no overload on 1.5, VARCHAR[]
  on 2.0); use []::VARCHAR[] and assert the documented no-op result, 0.
- DuckDB 2.0 rejects the arrow lambda syntax; use 'lambda x: ...', which 1.5
  also accepts, in the integration script and the README vector example.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0159dLVN7efE1WXtE1L97Us8
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0159dLVN7efE1WXtE1L97Us8
On DuckDB 1.5, duckdb_functions() lists the named parameters of the copy
GetFunctionByOffset returns, iterated as is. FirestoreNamedParameterNames
copied that map again before iterating it; with libc++ and MSVC a copy of an
unordered_map can iterate in a different order, so the parameter names were
paired with the wrong types (firestore_function_docs.test on osx_arm64 and
windows_amd64). Iterate the given overload directly, as before the 2.0 port.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0159dLVN7efE1WXtE1L97Us8

Copy link
Copy Markdown
Owner Author

Several jobs on ce00233 (DuckDB 2.0 windows_amd64 / osx_amd64 / osx_arm64 / wasm_threads, and 1.5.5 DuckDB-Wasm wasm_mvp) failed during "Prepare all required actions", before any build step: GitHub could not download actions/setup-go from codeload (An action could not be found at the URI .../actions/setup-go/...). It failed for two different pinned versions (v6.5.0 924ae3a from extension-ci-tools v2.0-cyanoptera and v4 7b8cf10). Both commits exist upstream, and the same jobs passed on this PR's previous run with identical pins, so this looks like a transient GitHub download outage, not a problem in this PR. I'll re-run the failed jobs once the run finishes.


Generated by Claude Code

Every commit on a PR branch ran the whole pipeline twice, once for push and
once for pull_request, so each needed twice the macOS runners and carried two
"CI passed" checks; with long macOS queues one of the two could fail or be
cancelled and block the merge even when the other passed. Run on push for
main only; pull_request still covers PRs, and workflow_dispatch builds any
other branch on demand.

The informational DuckDB 2.0 job no longer builds osx_amd64/osx_arm64: it
only has to catch 2.0 API breakage, and the stable build already covers
macOS.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0159dLVN7efE1WXtE1L97Us8
@BorisBesky
BorisBesky merged commit 6641ec1 into main Oct 16, 2026
20 checks passed
@BorisBesky
BorisBesky deleted the ccr-a35174e0-kx733o branch October 16, 2026 19:39
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