Verify logicalType for semi-structured columns in datacontract test#1373
Merged
Conversation
Snowflake OBJECT/ARRAY (and equivalent map/array types on other backends) now pass the field_type check instead of failing with "column type could not be determined". Dynamically-typed columns (VARIANT/JSON, and Databricks Variant) fail with an actionable message directing to physicalType. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…pe-check failure Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…/ARRAY columns Reads the nested type tree from SHOW COLUMNS, which ibis collapses to map<string, json> / array<json>. Contracts declaring nested fields on a dynamically-typed column now fail instead of silently passing.
…r structs An ibis struct whose fields are all unrepresentable collapsed to properties=None, the same value used for an untyped map, so a contract declaring nested fields on such a column was told its structure could not be verified. Reserve None for the map and give a struct its field list. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
The object path was interpolated unquoted, so a case-sensitive table was never found and a structured OBJECT silently fell back to the collapsed ibis dtype. Contract-supplied parts also reached raw_sql unescaped. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
A field whose type carries no ODCS logical type (VARIANT, binary, json) was dropped from the reconstructed tree, so a present column was reported as missing. Keep it, marked unverifiable, and name the offending type in a single failure message shared by the top-level and nested paths. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…nd diagnostics Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
The catalog reports a structured OBJECT/ARRAY as its bare token, so a parameterized physicalType always failed and the fallback that was meant to consume the recovered tree was never reached. Feed the rendered native type in as the actual instead. A leaf with no verifiable logical type is now kept too, so a VARIANT column names itself instead of ibis's json. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…s' into fix/snowflake-complex-type-checks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Makes the
datacontract testfield_type (logicalType) check work for semi-structured columns:OBJECT/ARRAY(and equivalent map/array types on other backends) now pass instead of failing with "column type could not be determined".VARIANT/JSON, DatabricksVariant) fail with an actionable message directing tophysicalType.Fix lives at the backend-agnostic ibis-dtype layer. Verified live against Snowflake.
🤖 Generated with Claude Code