Skip to content

Change UTC_TIME_ZONE constant from "+00:00" to "UTC" for compatibility with Snowflake #2167

Closed

Description

@vovacf201

Apache Iceberg Rust version

Latest

Describe the bug

Arrow in iceberg-rust uses "+00:00" constant as UTC which is not compatible with Snowflake.
https://github.com/apache/iceberg-rust/blob/main/crates/iceberg/src/arrow/schema.rs#L45

Expected behavior

Proposal is to change it to "UTC" (how it's done in Spark)

Willingness to contribute

Happy to contribute with community review

Activity

  1. added
    bug
    on Feb 23, 2026
  2. blackmwk commented on Feb 24, 2026

    @blackmwk
    Contributor

    Thanks @vovacf201 for bringing this up. I'm not familiar with Snowflake, could you elaborate how Snowflake handles it?

  3. vovacf201 commented on Feb 24, 2026

    @vovacf201
    Author

    @blackmwk Snowflake just rejects parquet files with "+00:00" tz as invalid and expects "UTC". From Spark spec seems both strings are valid representations of UTC. I wonder if we can switch to "UTC" constant or make it configurable.

    From Spark spec:

    tz Column or literal string
    A string detailing the time zone ID that the input should be adjusted to. It should be in the format of either region-based zone IDs or zone offsets. Region IDs must have the form ‘area/city’, such as ‘America/Los_Angeles’. Zone offsets must be in the format ‘(+|-)HH:mm’, for example ‘-08:00’ or ‘+01:00’. Also ‘UTC’ and ‘Z’ are supported as aliases of ‘+00:00’. Other short names are not recommended to use because they can be ambiguous.
    
  4. kevinjqliu commented on Feb 24, 2026

    @kevinjqliu
    Contributor

    @vovacf201 do you mind sharing your table definition? And the setup including where this breaks.

  5. kevinjqliu commented on Feb 24, 2026

    @kevinjqliu
    Contributor

    So the issue is likely in Snowflake's Arrow schema reader — specifically how it deserializes the embedded Arrow schema from the Parquet footer and maps the timezone annotation to a Snowflake type. Snowflake is probably reading the Arrow metadata to get richer type information (like timezone), and its Arrow schema parser doesn't recognize "+00:00" as a valid timezone.

    The native Parquet schema itself doesn't store a timezone string at all — it just has isAdjustedToUTC as a boolean. So the "+00:00" string can only be coming from the Arrow schema embedded in the footer, which means the failure point is in how Snowflake processes that Arrow metadata.

    This also explains why Spark works fine — Spark writes "UTC" in its embedded Arrow schema, so Snowflake's Arrow reader handles it without issue.

    From claude, this makes sense. The issue is with reading the schema annotation and not from reading the parquet file with timestamptz

    I wonder if we can switch to "UTC" constant or make it configurable.

    I think this is reasonable. Or we can change the default to "UTC"

  6. blackmwk commented on Feb 25, 2026

    @blackmwk
    Contributor

    I think it's reasonable to change to "UTC" if spark is compatible with both. But I still don't understand why it's not compatible with snowflake? This constant is used when converting iceberg schema to arrow schema, @vovacf201 could you elaborate how it can fail snowflake?

  7. blackmwk commented on Feb 25, 2026

    @blackmwk
    Contributor

    @blackmwk Snowflake just rejects parquet files with "+00:00" tz as invalid and expects "UTC". From Spark spec seems both strings are valid representations of UTC. I wonder if we can switch to "UTC" constant or make it configurable.

    From Spark spec:

    tz Column or literal string
    A string detailing the time zone ID that the input should be adjusted to. It should be in the format of either region-based zone IDs or zone offsets. Region IDs must have the form ‘area/city’, such as ‘America/Los_Angeles’. Zone offsets must be in the format ‘(+|-)HH:mm’, for example ‘-08:00’ or ‘+01:00’. Also ‘UTC’ and ‘Z’ are supported as aliases of ‘+00:00’. Other short names are not recommended to use because they can be ambiguous.
    

    Oh, do you mean that it will leads to saving "UTC" in parquet file?

  8. vovacf201 commented on Feb 25, 2026

    @vovacf201
    Author

    @blackmwk my understanding it stored in parquet footer which Snowflake can't read

  9. blackmwk commented on Feb 26, 2026

    @blackmwk
    Contributor

    Thanks for the explaination, I'm fine with this change.

  10. vovacf201 commented on Apr 1, 2026

    @vovacf201
    Author

    we recently tested latest version of SnowFlake and no issues anymore, so I'm closing this because we can just switch to latest

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions