You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- Only append operations are supported (no upserts)
364
363
- Complex data types (nested structs, arrays, maps) have limited support
365
364
@@ -371,13 +370,45 @@ When using the `create_table_if_not_exists` option, please be aware of the follo
371
370
-**Partitioning**: The automatically created table will use default partitioning settings. You cannot specify custom partition or sort specifications during automatic creation.
372
371
-**Identifier Fields**: The automatically created table will not have any identifier fields specified. If you need identifier fields, you must create the Iceberg table manually beforehand.
373
372
373
+
## Schema Evolution
374
+
375
+
The Iceberg FDW supports [Apache Iceberg schema evolution](https://iceberg.apache.org/spec/#schema-evolution). When columns are added to an Iceberg table after data has already been written, rows from older data files will return `NULL` for those new columns, which matches Iceberg spec behavior.
376
+
377
+
For example, given a table that initially has `id` and `name` columns, and later gains a `score` column:
378
+
379
+
```sql
380
+
-- rows written before the column was added return NULL for 'score',
381
+
-- while newer rows return the actual value
382
+
select id, name, score fromiceberg.membersorder by id;
383
+
384
+
-- id | name | score
385
+
-- ----+-------+-------
386
+
-- 1 | alice | NULL
387
+
-- 2 | bob | NULL
388
+
-- 3 | carol | 42
389
+
-- 4 | dave | 99
390
+
```
391
+
392
+
Filter pushdown on newly-added columns also works correctly:
393
+
394
+
```sql
395
+
select name fromiceberg.memberswhere score >50;
396
+
397
+
-- name
398
+
-- ------
399
+
-- dave
400
+
```
401
+
402
+
!!! note
403
+
404
+
The foreign table definition in Postgres must include any new columns to read them. Re-run `import foreign schema` (which will refresh the `schema_id` option) or add the columns manually with `alter foreign table` and update or drop any pinned `schema_id` on the foreign table; otherwise, the FDW may still use an older schema and report `ColumnNotFound` for newly-evolved columns.
405
+
374
406
## Limitations
375
407
376
408
This section describes important limitations and considerations when using this FDW:
377
409
378
410
- Only supports specific data type mappings between Postgres and Iceberg
379
411
- UPDATE, DELETE, and TRUNCATE operations are not supported
380
-
-[Apache Iceberg schema evolution](https://iceberg.apache.org/spec/#schema-evolution) is not supported
381
412
- When using Iceberg REST catalog, only supports AWS S3 (or compatible) as the storage
382
413
- Materialized views using these foreign tables may fail during logical backups
0 commit comments