Skip to content

CometScanRule: decline native V1 scans on object_store-unsupported filesystem schemes (fall back to Spark) #4520

@schenksj

Description

@schenksj

Why this is needed (surfaced by the Delta integration)

When a Delta table is opened with custom Hadoop filesystem options — DeltaTable.forPath(spark, path, fsOptions) against a custom scheme such as fake:// — Delta internally reads its own _delta_log/*.checkpoint.parquet files via ordinary V1 parquet scans. CometScanRule claims those scans for native execution, but Comet's native reader goes through object_store, which doesn't know the custom scheme, so it crashes at execution with Generic URL error: Unable to recognise URL "fake:///...". There is no graceful recovery once native execution has started — the scan must be declined at planning time so Spark's Hadoop-FS-aware reader handles it.

Concretely this blocks DeltaTableSuite "dropFeatureSupport - with filesystem options".

Also a baseline fix (standalone)

This isn't Delta-specific in mechanism: any V1 parquet scan on a filesystem object_store can't parse crashes Comet's native reader the same way on main today, rather than falling back. So the fix stands on its own as general robustness for custom Hadoop FileSystem schemes.

Proposed implementation

Decline the scan at planning when its root-path scheme isn't natively readable. Rather than hardcode the object_store-supported scheme set in the planner (a mirror that drifts — e.g. gcs/oss aren't object_store schemes, while http/az/memory are), answer from object_store itself via a small JNI helper (NativeBase.isObjectStoreSchemeSupported, backed by ObjectStoreScheme::parse — the same path prepare_object_store_with_configs uses). Union in the user's libhdfs scheme config (spark.hadoop.fs.comet.libhdfs.schemes) on the JVM side; cache per scheme; assume supported if native can't be consulted.

Priority

Standalone, but required by the in-progress contrib/delta integration (which carries this change today). Extracting it lets it land independently and the Delta work rebase onto it — please prioritize accordingly.

Tests

  • ParquetReadFromFakeHadoopFsSuite (libhdfs scheme regression guard) passes.
  • Add a custom-scheme decline test (fake:// → falls back to Spark, not a crash).

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:scanParquet scan / data readingpriority:highCrashes, panics, segfaults, major functional breakage

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions