Skip to content

Fix: unknown type variant - #86

Open
aersam wants to merge 1 commit into
duckdb:mainfrom
aersam:fix/variant-type
Open

Fix: unknown type variant#86
aersam wants to merge 1 commit into
duckdb:mainfrom
aersam:fix/variant-type

Conversation

@aersam

@aersam aersam commented Jun 11, 2026

Copy link
Copy Markdown

Summary

When querying tables that have a variant column, the following error is raised:

Not implemented Error:
Tried to fallback to unknown type for 'variant'

The fix maps variant to DuckDB's LogicalType::VARIANT().

Fixes #83

Related to #82 (same pattern, for timestamp_ntz).

Test plan

  • Added scripts/databricks_data_gen/custom_data_sources/variant_table.sql to generate a test table with a variant column on Databricks
  • Added test/sql/databricks/variant.test to verify reading such a table works end-to-end

🤖 Generated with Claude Code

Without this mapping, any table with a variant column raises:
  NotImplementedException: Tried to fallback to unknown type for 'variant'

Fixes duckdb#83

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@aersam

aersam commented Jun 11, 2026

Copy link
Copy Markdown
Author

Not very surpring, this is AI-generated, and I must admin I did not execute tests locally. I'm really not in C++, but the code looks simple, so it's worth a try :)

@JoeIlluminati

Copy link
Copy Markdown

Any updates on this PR getting reviewed? I'm experiencing this issue as well. Would be happy to test it in nightly if a maintainer reviewed and merged this 🙂

@getChan

getChan commented Jul 31, 2026

Copy link
Copy Markdown

@benfleis Hi, could you review this PR? DuckDB supports the VARIANT type,
but the Unity Catalog extension currently doesn’t map Unity Catalog’s variant type to DuckDB’s LogicalType::VARIANT.

@samansmink
samansmink requested a review from benfleis August 7, 2026 12:54
@benfleis

Copy link
Copy Markdown
Member

On it, I have some tweaks to add, will come back with review or push an update myself.

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.

_duckdb.NotImplementedException: Not implemented Error: Tried to fallback to unknown type for 'variant'

4 participants