[Bug] Iceberg metadata unreadable by Snowflake
- Vorherrschende Sprache
- Java
- Sterne
- 3.4k
- Forks
- 1.4k
- Ø Merge
- 1 T. 9 Std.
- Gemergte PRs (30 T.)
- 423
Beschreibung
### Search before asking
- [x] I searched in the [issues](https://github.com/apache/paimon/issues) and found nothing similar.
### Paimon version
2.0.0-rc4
### Compute Engine
Flink 2.2
### Minimal reproduce step
Create a Paimon table with Iceberg compatibility enabled, try to read the table from Snowflake.
### What doesn't meet your expectations?
Snowflake cannot read the Iceberg metadata, returning this error: `Unsupported: external field ID in metadata file cannot be zero.`
It looks like Snowflake enforces all field IDs to be > 0 (which is how the Iceberg implementation works), but Paimon generates metadata with field IDs starting from 0, so Snowflake treats that as invalid metadata.
### Anything else?
I'm not really sure what the best option is here. Looks like field mappings are encoded in Parquet footers, so maybe an option could be to specify an option at table creation to start all field IDs from 1 rather than 0 in order to produce more universally Iceberg-compatible layout?
### Are you willing to submit a PR?
- [x] I'm willing to submit a PR!
Beitragsleitfaden
Für dieses Repository ist kein Beitragsleitfaden indexiert
Rechercherichtung
Reproduziere den Fehler mit Paimon 2.0.0-rc4, Flink 2.2, aktivierter Iceberg-Kompatibilität und Snowflake. Verfolge die Generierung der Iceberg-Metadaten und die Behandlung der Feld-IDs und überprüfe anschließend, dass die resultierenden Metadaten von Snowflake ohne den Zero-ID-Fehler akzeptiert werden. Da keine Quelldateien oder Tests genannt sind, gehört es zur Arbeit, den relevanten Kompatibilitätscode und die Regressionstests zu finden.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- java
- Bereich
- data-engineering
- Issue-Typ
- Bug
- Schwierigkeit
- 4/5
- Geschätzter Aufwand
- 3-5 Tage
- Aktivitätsstatus
- Aktiv
- Klarheit
- Größtenteils klar
- Anfängerfreundlichkeit
- 50/100