Skip to content

fix: add support for untyped snowflake arrays#2608

Merged
tobymao merged 2 commits intomainfrom
eakmanrq/schema_diff_support_nontyped_arrays
May 14, 2024
Merged

fix: add support for untyped snowflake arrays#2608
tobymao merged 2 commits intomainfrom
eakmanrq/schema_diff_support_nontyped_arrays

Conversation

@eakmanrq
Copy link
Collaborator

Prior to this change the schema differ assumed all arrays had a type which isn't true for Snowflake. This adds proper support for "untyped" arrays.

Also did some cleanup where old self referenced weren't renamed when methods were changed to classmethods.

)
if new_type.this == current_type.this == exp.DataType.Type.ARRAY:
# Some engines (i.e. Snowflake) don't support defining types on arrays
if not new_type.expressions or not current_type.expressions:
Copy link
Contributor

Choose a reason for hiding this comment

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

what if something is untyped and then it becomes typed?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

There is no known way to do this today. The only untyped example must remain untyped.

@tobymao tobymao merged commit 9076edb into main May 14, 2024
@tobymao tobymao deleted the eakmanrq/schema_diff_support_nontyped_arrays branch May 14, 2024 20:17
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