Skip to content

Snowlake table wrapper#31

Merged
osipovartem merged 3 commits into
mainfrom
aosipov/iceberg_snowflake_provider
Nov 22, 2025
Merged

Snowlake table wrapper#31
osipovartem merged 3 commits into
mainfrom
aosipov/iceberg_snowflake_provider

Conversation

@osipovartem
Copy link
Copy Markdown
Contributor

Added TableProvider adapter that rewrites column names to match Snowflake's case-insensitive semantics.

Snowflake stores schemas in uppercase, while queries are typically written in lowercase. DataFusion treats identifiers as case-sensitive, which causes mismatches between the logical projection expressions (lowercase) and the physical input schema (uppercase). This adapter:

  • Rewrites column references in filter expressions to the original schema casing before delegating to the underlying table provider.
  • Wraps the produced physical plan in a projection that aliases columns to lowercase names, so the output schema matches the logical expectations.

Comment thread crates/catalog/src/snowflake_table.rs Outdated

let table_provider: Arc<dyn TableProvider> =
Arc::new(IcebergDataFusionTable::new(tabular, None, None, None));
Arc::new(SnowflakeCaseInsensitiveTable::new(Arc::new(
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.

Does it apply to all tables? Question if s3 table buckets still work in this case?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Yes

@osipovartem osipovartem changed the title Snowdlake table wrapper Snowlake table wrapper Nov 22, 2025
@osipovartem osipovartem merged commit 3bc4bd9 into main Nov 22, 2025
3 checks passed
@osipovartem osipovartem deleted the aosipov/iceberg_snowflake_provider branch November 22, 2025 13:55
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