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

Abierto
#18,872 1 comentario 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

@adiranjan25 ya está trabajando en esto.

Desde el 10/11/2026.

  • #18876 de @adiranjan25 — abierto

Evaluación

Dificultad
4/5
Tiempo estimado
3-5 días
Aptitud para principiantes
25/100
Tipo de issue
Error
Claridad
Bien especificado
Estado de actividad
Estancado
Stack tecnológico
java
Área
databases

Línea de trabajo

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.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

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
Lenguaje dominante
Java
Estrellas
9.4k
Forks
3.7k
Merge medio
2 d 15 h
PR fusionados (30 d)
169

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de apache/iceberg

Todos los issues de apache/iceberg

Issues similares

Más issues de Java

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.