Skip to content

Snowflake: Parse structured OBJECT types - #2489

Open
osipovartem wants to merge 3 commits into
apache:mainfrom
Embucket:upstream-snowflake-structured-object-independent
Open

Snowflake: Parse structured OBJECT types#2489
osipovartem wants to merge 3 commits into
apache:mainfrom
Embucket:upstream-snowflake-structured-object-independent

Conversation

@osipovartem

Copy link
Copy Markdown
Contributor

Snowflake structured OBJECT types can contain named, nullable or NOT NULL fields and recursively nested OBJECT types. The generic Custom(Vec<String>) representation loses these boundaries.

This adds DataType::Object(Vec<ColumnDef>), a Snowflake dialect capability, recursive parsing and formatting, and leaves unstructured OBJECT unchanged.

Validated against:
https://docs.snowflake.com/en/sql-reference/data-types-structured#structured-object-types

Tests cover nested types, NOT NULL AST preservation, unstructured OBJECT, and malformed definitions.

AI assistance: Codex was used to prepare the implementation and tests.

Comment thread src/dialect/snowflake.rs Outdated
@osipovartem
osipovartem requested a review from iffyio September 10, 2026 10:12
Comment thread src/dialect/mod.rs Outdated
Comment thread tests/sqlparser_snowflake.rs Outdated
@osipovartem
osipovartem requested a review from iffyio September 11, 2026 13:47
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