Skip to content

feat: add query-scoped extension import handlers - #3

Merged
aunjgr merged 1 commit into
matrixorigin:feature/26155-substrait-anti-joinsfrom
aunjgr:feature/28968-scoped-extension-import
Oct 2, 2026
Merged

aunjgr merged 1 commit into
matrixorigin:feature/26155-substrait-anti-joinsfrom
aunjgr:feature/28968-scoped-extension-import

Conversation

@aunjgr

@aunjgr aunjgr commented Oct 1, 2026

Copy link
Copy Markdown
Collaborator

What this PR does

Add a converter-scoped C++ extension handler for user-defined types, typed NULLs, literals, scalar functions and aggregates. Preserve resolved extension identities, full type/function parameters and declared result types for embedding consumers, without adding numeric coercion or global registrations.

Why

Embedded Sirius needs to preserve MatrixOne's approved exact-decimal semantics rather than let generic DuckDB decimal binding derive different types. This supplies the import boundary; the numeric implementation and capability advertisement remain in Sirius.

Refs matrixorigin/matrixone#28968 and matrixorigin/matrixone#28966. Numeric contract approved in matrixorigin/matrixone#29449, document revision 42a89f09a1d168d02b9583cb3ea7b4de6dbb5634.

Compatibility and scope

  • Targets feature/26155-substrait-anti-joins, the compatible branch pinned by Sirius at b131fd6659fe5fa0c6e39c52059e29ac903b2d59. Importer main has diverged; this PR deliberately does not synchronize dependencies or include unrelated commits.
  • Existing constructor and ordinary imports remain available. Consumers opt into the handler through the new overload; no global extension state is installed.
  • Duplicate anchors and unresolved URNs fail under opt-in import. Unknown user types/literals fail explicitly. Standard default import behavior is unchanged.
  • The importer owns a shared handler reference through conversion. C++ consumers must be rebuilt; no binary class-layout compatibility is claimed. No C ABI or numeric capability version is changed.

Verification

Built against Sirius's pinned DuckDB using its frozen mo Pixi environment. Sirius object/archive build passes. Direct C++ consumer test passes 60 assertions covering complete type parameters, typed NULL, payload identity, full scalar/aggregate signatures, ordinary-import controls and malformed/unhandled extensions. New tests are registered with the importer C++ test target. No Docker image build and no change to DuckDB itself.

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.

1 participant