roryqi opened a new pull request, #14935:
URL: https://github.com/apache/gravitino/pull/14935
### What changes were proposed in this pull request?
Validate create-table partition and sort transforms against their source
column types before dispatching the request. Report transform binding failures
as 400 Bad Request.
### Why are the changes needed?
For authenticated creates, the dispatcher rebuilds the request to set its
owner. An invalid transform can fail during this rebuild, before reaching the
existing catalog exception handling, and return 406 instead of 400.
Follow-up to #14432.
### Does this PR introduce _any_ user-facing change?
Invalid create-table transforms consistently return 400 with an Iceberg
ErrorModel. Unsupported operations continue to return 406.
### How was this patch tested?
Added regression coverage for 11 unsupported types, top-level and nested
columns, partition and sort transforms, supported truncate types, staged
creates, format versions 2/3, and rejected commits without metadata changes.
All 146 tests passed across `TestIcebergRESTUtils`,
`TestIcebergTableOperations`, `TestIcebergExceptionMapper`, and
`TestIcebergRequestBodyReaderInterceptor`:
```bash
./gradlew :iceberg:iceberg-rest-server:spotlessApply
:iceberg:iceberg-rest-server:test \
--tests 'org.apache.gravitino.iceberg.service.TestIcebergRESTUtils' \
--tests
'org.apache.gravitino.iceberg.service.rest.TestIcebergTableOperations' \
--tests 'org.apache.gravitino.iceberg.service.TestIcebergExceptionMapper' \
--tests
'org.apache.gravitino.iceberg.service.TestIcebergRequestBodyReaderInterceptor' \
-PskipITs -PskipWeb=true --max-workers=2
```
Module Spotless formatting and checks also passed.
--
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]