Skip to content

Match Snowflake Boolean-first CSV inference - #16

Merged
osipovartem merged 1 commit into
variant-get-nested-extensionfrom
arrow-csv-snowflake-boolean
Oct 8, 2026
Merged

osipovartem merged 1 commit into
variant-get-nested-extensionfrom
arrow-csv-snowflake-boolean

Conversation

@osipovartem

Copy link
Copy Markdown

Summary

Snowflake's CSV INFER_SCHEMA keeps BOOLEAN when a boolean row precedes literal 0 or 1, but infers TEXT in the reverse order or when the later value is 2, -1, or 1.0. Preserve this distinction in the opt-in ordered inference state, including chunk merges. Default CSV inference and scan code are unchanged.

Validation

  • Targeted Snowflake 10.36.101 probe covered ten boolean/number pairs in both orders. Temporary stage and file format were dropped, and the warehouse was suspended.
  • cargo +1.95.0 test --offline -p arrow-csv --lib: 100/100 pass.
  • cargo +1.95.0 clippy --offline -p arrow-csv --lib --quiet and cargo +1.95.0 fmt --check --all: pass with unrelated existing Clippy warnings.
  • Independent read-only review: approved, no blocking findings.

The opt-in inferred type is consumed by Rustice INFER_SCHEMA metadata. Arrow's ordinary Boolean CSV reader does not currently parse numeric 0/1 as booleans; this PR does not claim to change CSV loading behavior.

@github-actions github-actions Bot added the arrow label Oct 8, 2026
@osipovartem
osipovartem merged commit 2d76646 into variant-get-nested-extension Oct 8, 2026
19 of 26 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant