tejanshrana opened a new issue, #8910:
URL: https://github.com/apache/paimon/issues/8910

   ### Search before asking
   
   - [x] I searched in the [issues](https://github.com/apache/paimon/issues) 
and found nothing similar.
   
   
   ### Paimon version
   
   master, commit a8074ed60
   
   ### Compute Engine
   
   Flink
   
   ### Minimal reproduce step
   
   1. Create a Paimon table in a database whose location does not follow the 
<db>.db warehouse layout e.g. an externally-provisioned or cross-account 
catalog database such as s3://bucket/ingest/mydb/mytable.
   2. Configure Iceberg metadata generation with 
metadata.iceberg.storage-location=table-location (metadata written beside the 
table, not under a warehouse-relative path).
   3. Commit to the table.
   
   ### What doesn't meet your expectations?
   
   `IcebergCommitCallback.catalogDatabasePath()` throws 
`UnsupportedOperationException: Storage type ... can only be used on Paimon 
tables in a Paimon warehouse` even though table-location storage writes Iceberg 
metadata beside the table and never derives a warehouse-relative iceberg/<db>/ 
path, so it has no actual dependency on the <db>.db layout. Only 
catalog-storage mode derives that path (by stripping the .db suffix), so only 
that mode should require it. Today the .db check runs unconditionally before 
the storage-mode switch, so table-location is incorrectly rejected for any 
non-warehouse database.
   
   ### Anything else?
   
   I have a fix ready (moves the .db guard into the catalog-storage branch 
only, with a clearer error message there, and adds unit tests for both storage 
modes against a non-warehouse database) and will open a PR shortly.
   
   ### Are you willing to submit a PR?
   
   - [x] I'm willing to submit a PR!


-- 
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]

Reply via email to