bharos commented on issue #9666:
URL: https://github.com/apache/gravitino/issues/9666#issuecomment-3730452669
## Proposed Fix
Planning to issue a PR with:
### Fix 1: Preserve `stageCreate` flag in IcebergTableOperationExecutor
**File:**
`core/src/main/java/org/apache/gravitino/catalog/lakehouse/iceberg/ops/IcebergTableOperationExecutor.java`
When the executor rebuilds a `CreateTableRequest` to override the owner, it
should now preserves the `stageCreate=true` flag:
```java
if (createTableRequest.stageCreate()) {
builder.stageCreate(); // Preserve staging flag
}
```
Fix 2: Custom staging implementation for JDBC catalogs
File: IcebergCatalogWrapper.java
Add stageTableCreateWithoutCommit() method that bypasses Iceberg's
CatalogHandlers.stageTableCreate() (which incorrectly calls createTransaction()
for JDBC catalogs). This custom implementation:
Computes table location without accessing the catalog (which would trigger a
commit)
Builds TableMetadata with proper defaults (Iceberg automatically adds
timestamps)
Returns staged metadata without catalog registration, allowing the 3-phase
migration protocol to work correctly
--
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]