Skip to content

Mark DuckDb INET type (from inet extension) as unknown type#9384

Merged
mscolnick merged 1 commit into
marimo-team:mainfrom
iggylari:main
Apr 27, 2026
Merged

Mark DuckDb INET type (from inet extension) as unknown type#9384
mscolnick merged 1 commit into
marimo-team:mainfrom
iggylari:main

Conversation

@iggylari

@iggylari iggylari commented Apr 25, 2026

Copy link
Copy Markdown
Contributor

📝 Summary

When using INET extension for DuckDB, I got a warning about inet type:
image

I marked this type as 'unknown' and updated tests (also for string types)

✅ Merge Checklist

  • I have read the contributor guidelines.
  • Documentation has been updated where applicable, including docstrings for API changes.
  • Tests have been added for the changes made.

Copilot AI review requested due to automatic review settings April 25, 2026 16:47
@vercel

vercel Bot commented Apr 25, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
marimo-docs Ready Ready Preview, Comment Apr 25, 2026 4:48pm

Request Review

@github-actions

Copy link
Copy Markdown


Thank you for your submission, we really appreciate it. Like many open-source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution. You can sign the CLA by just posting a Pull Request Comment same as the below format.


I have read the CLA Document and I hereby sign the CLA


You can retrigger this bot by commenting recheck in this Pull Request. Posted by the CLA Assistant Lite bot.

@iggylari

Copy link
Copy Markdown
Contributor Author

I have read the CLA Document and I hereby sign the CLA

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates Marimo’s DuckDB dataset introspection to treat DuckDB’s INET (from the inet extension) as a known-but-unsupported/unknown data type, preventing warning spam, and expands test coverage for additional string type aliases.

Changes:

  • Classify DuckDB inet as an "unknown" type in _db_type_to_data_type (no warning emitted).
  • Add/expand test assertions for additional DuckDB string type aliases (char, bpchar, string, uuid) and for inet.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
marimo/_data/get_datasets.py Adds inet to the set of DuckDB types explicitly mapped to "unknown" to avoid warning logs.
tests/_data/test_get_datasets.py Extends _db_type_to_data_type tests to cover more string aliases and the inet extension type.

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 2 files

Architecture diagram
sequenceDiagram
    participant UI as Marimo Frontend
    participant DS as Dataset Service (get_datasets.py)
    participant DB as DuckDB Engine
    participant Ext as DuckDB INET Extension

    Note over UI,Ext: Data Discovery Flow

    UI->>DS: Request schema/metadata
    DS->>DB: Query table/column metadata
    
    opt If INET extension is loaded
        DB->>Ext: Resolve custom types
    end
    
    DB-->>DS: Return column types (e.g., 'inet', 'uuid', 'varchar')

    Note over DS: NEW: Type Classification Logic
    
    DS->>DS: _db_type_to_data_type(column_type)
    
    alt Type is known string (uuid, char, bpchar, etc.)
        DS->>DS: Map to "string"
    else Type is in _UNKNOWN_TYPES (row, geometry, inet, null)
        DS->>DS: CHANGED: Map 'inet' to "unknown"
    else Standard types
        DS->>DS: Map to numeric/boolean/datetime
    end

    DS-->>UI: Return normalized schema (JSON)
    UI->>UI: Render Data Explorer (no warnings)
Loading

@iggylari

Copy link
Copy Markdown
Contributor Author

I have read the CLA Document and I hereby sign the CLA

@iggylari

Copy link
Copy Markdown
Contributor Author

recheck

@Light2Dark Light2Dark added the bug Something isn't working label Apr 27, 2026
@mscolnick mscolnick merged commit 2dbb958 into marimo-team:main Apr 27, 2026
44 of 50 checks passed
@github-actions

Copy link
Copy Markdown

🚀 Development release published. You may be able to view the changes at https://marimo.app?v=0.23.4-dev7

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants