rewrite_table_path fails for JDBC tables created with a file:/// warehouse

Aperta
#18,872 1 commento 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

@adiranjan25 ci sta già lavorando.

Dal 10/11/2026.

  • #18876 di @adiranjan25 — aperta

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
25/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Ferma
Stack tecnologico
java
Ambito
databases

Direzione di ricerca

The issue identifies rewrite_table_path as the failing entry point and provides repro_file_uri.py. Read the path rewriting implementation and its tests, then run the reproduction with uv and Java. Done means a table created with a file:/// warehouse is relocated successfully despite equivalent file:/ and file:/// spellings; an open linked pull request indicates work is already underway.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

bug
Apache Iceberg version

1.12.0 (latest release)

Query engine

Spark 4.1

Problem

Creating a table with a file:///... JDBC catalog warehouse produces mixed URI spellings: the metadata JSON's location uses file:///..., while metadata file paths use file:/....

Both forms are valid local file URIs (RFC 8089), but rewrite_table_path compares prefixes textually. A file:/... source prefix matches file paths but not location; a file:///... prefix has the opposite problem.

Reproduction

Run the attached script with uv and Java installed:

uv run --script repro_file_uri.py

It downloads dependencies, creates a temporary SQLite JDBC catalog with a local file:///... warehouse, creates a table, inserts one row, and calls rewrite_table_path. No metadata is manually modified.

The script exits with:

IllegalArgumentException: Path file:///tmp/iceberg-file-uri-.../warehouse/db/t/
does not start with file:/tmp/iceberg-file-uri-.../warehouse/
Expected behavior

rewrite_table_path should handle equivalent local file URI spellings consistently and relocate a normally created table without manual metadata changes.

repro_file_uri.py

Willingness to contribute
  • I can contribute a fix for this bug independently
  • I would be willing to contribute a fix for this bug with guidance from the Iceberg community
  • I cannot contribute a fix for this bug at this time
Lingua principale
Java
Stelle
9.4k
Fork
3.7k
Merge medio
2g 15h
PR unite (30g)
169

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di apache/iceberg

Tutte le issue di apache/iceberg

Issue simili

Altre issue su Java

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.