Arun12-sketch opened a new pull request, #61651:
URL: https://github.com/apache/doris/pull/61651
## What problem does this PR solve?
**Issue Number:** close #61388
**Related PR:** N/A
**Problem Summary:**
When creating an Iceberg REST catalog, Doris was not forwarding custom HTTP
header properties to the Iceberg `RESTCatalog`. Properties like
`iceberg.rest.header.x-goog-user-project` were silently dropped, which blocked
integrations with catalogs like GCP BigLake Metastore that require request
headers on every call.
This PR fixes the issue by properly forwarding:
- `iceberg.rest.header.<Header-Name>` → `header.<Header-Name>`
The fix also includes unit test coverage to prevent regression.
## Release note
None
## Type of change
- [x] Bug fix
- [ ] New feature
- [ ] Breaking change
- [ ] Documentation update
## Check List (For Author)
### Test
- [ ] Regression test
- [x] Unit Test
- [ ] Manual test (add detailed scripts or steps below)
- [ ] No need to test or manual test. Explain why:
- [ ] This is a refactor/code format and no logic has been changed.
- [ ] Previous test can cover this change.
- [ ] No code files have been changed.
- [ ] Other reason
### Changes
- [ ] No behavior change
- [x] Yes, behavior changed:
- Iceberg REST catalogs now support custom header pass-through via
`iceberg.rest.header.*` properties. Users can now use:
```sql
CREATE CATALOG biglake_metastore PROPERTIES (
'type' = 'iceberg',
'iceberg.catalog.type' = 'rest',
'iceberg.rest.uri' =
'https://biglake.googleapis.com/iceberg/v1/restcatalog',
'warehouse' = 'gs://<warehouse-name>',
'iceberg.rest.header.x-goog-user-project' = '<BILLING_PROJECT>'
);
```
### Documentation
- [x] No documentation needed
- [ ] Yes, needs documentation. Link to PR:
## Files Changed
1. **IcebergRestProperties.java**
- Added `HEADER_PROPERTY_PREFIX` and
`ICEBERG_REST_HEADER_PROPERTY_PREFIX` constants
- Added `addCustomHeaderProperties()` method to forward header properties
- Integrated header forwarding into optional properties assembly
2. **IcebergRestPropertiesTest.java**
- Added `testCustomHeaderPropertiesForwarding()` to verify header
translation
## Check List (For Reviewer)
- [ ] Confirm the release note
- [ ] Confirm test cases
- [ ] Confirm documentation (if applicable)
- [ ] Add branch pick label (if needed for backport)
--
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]