liupoyi-1031 opened a new pull request, #6216:
URL: https://github.com/apache/datafusion-comet/pull/6216
## Which issue does this PR close?
Closes #6144.
## Rationale for this change
The native Iceberg writer always places files at `<data location>/<partition
path>/<file>` and does not consult Iceberg's `LocationProvider`. The
eligibility gate only rejected a custom provider when
`write.location-provider.impl` was set. A custom `TableOperations` can return
one directly without that property, so the gate admitted the write and the
native path produced a different layout than iceberg-java.
FileIO and encryption already inspect instantiated table state for the same
reason.
## What changes are included in this PR?
- Resolve `table.locationProvider()` in `IcebergReflection`.
- Admit the native write only when the provider is Iceberg's built-in
`DefaultLocationProvider`.
- Include the provider class name in the fallback reason.
- Document the instantiated-state check in the Iceberg write eligibility
docs.
## How are these changes tested?
- `./mvnw -ntp test -Dtest=none
-Dsuites="org.apache.comet.iceberg.IcebergReflectionSuite,org.apache.comet.CometIcebergWriteDetectionSuite"`
- 78 tests passed.
- Added a detection-suite case for a custom `TableOperations` location
provider with no `write.location-provider.impl` property.
- Added reflection-suite coverage for resolving a custom provider and
failing closed when `locationProvider()` is missing.
--
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]