Skip to content

Native Iceberg write gate reads hdfs:/path as file, so the write fails natively instead of falling back #6140

Closed

Description

@andygrove

Describe the bug

The native Iceberg write gate and the native storage factory read the scheme of a data location differently, so some locations pass the gate and then fail at execution.

  • The gate (CometIcebergNativeWrite.storageScheme, CometIcebergNativeWrite.scala:310-315) takes the text before ://, and treats a location without :// as file.
  • The native side (scheme_of, iceberg_common.rs:229) takes the text before the first :.

Hadoop normalises hdfs:///warehouse/t to hdfs:/warehouse/t. For that location the gate sees no ://, calls it file and admits it. The native writer reads hdfs, which has no storage backend, and every task fails with Unsupported storage scheme: hdfs. The query fails instead of falling back to iceberg-java. The same applies to any scheme:/path form.

Steps to reproduce

Create an Iceberg table whose data location is written hdfs:/path (for example through LOCATION 'hdfs:/...', or a Hadoop catalog whose warehouse was normalised), enable spark.comet.iceberg.write.enabled, and insert into it.

Expected behavior

The write falls back to iceberg-java with an unsupported storage scheme: hdfs reason. The gate should use the same scheme rule as scheme_of, ideally one shared implementation.

Additional context

#6065 (closes #5541) moves the supported-scheme lists to the native factory and touches storageScheme, but it keeps the :// split, so it does not fix this. It would be a natural place to align the parsing too.

Found in an audit of the native Iceberg write path before enabling it by default. Part of #5649.

Activity

  1. added
    bug
    area:writer
    on Sep 23, 2026
  2. 0lai0 commented on Sep 24, 2026

    @0lai0
    Contributor

    take

  3. added
    priority:medium
    and removed on Sep 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

area:Icebergarea:writerbugpriority:medium

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions