rmoff opened a new pull request, #16079:
URL: https://github.com/apache/iceberg/pull/16079
## Summary
Creating a materialized table in Flink using an Iceberg catalog currently
fails with a
cryptic `IllegalArgumentException: table should be resolved` from a
`Preconditions.checkArgument`
deep in `FlinkCatalog.createTable()`.
This adds an explicit `instanceof CatalogMaterializedTable` check before
that precondition,
throwing a clear `UnsupportedOperationException` with the message:
*"Materialized tables are not supported by Iceberg's Flink catalog."*
Implemented for Flink 2.1. Backports to v2.0 and v1.20 to follow if the
approach looks good.
## Before
```
Caused by: java.lang.IllegalArgumentException: table should be resolved
at
org.apache.iceberg.flink.FlinkCatalog.createTable(FlinkCatalog.java:429)
```
## After
```
UnsupportedOperationException: Materialized tables are not supported by
Iceberg's Flink catalog.
```
## Test plan
- [x] Added `testCreateMaterializedTableIsUnsupported` in
`TestFlinkCatalogTable` (runs across all 3 catalog parametrizations)
- [x] `spotlessCheck` passes
- [x] Existing `TestFlinkCatalogTable` tests unaffected
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]