thswlsqls opened a new pull request, #17056:
URL: https://github.com/apache/iceberg/pull/17056

   Closes #17054
   
   ## Summary
   
   - `EcsFileIO` never overrode `FileIO#newInputFile(String, long)`, so the 
known length passed by callers (`DataFile`/`DeleteFile`/`ManifestFile`) fell 
back to the `api/` default and was discarded.
   - `EcsInputFile#getLength()` had no cached length, so it issued a fresh 
`getObjectMetadata()` HEAD request to ECS on every call.
   - This matches `S3FileIO`/`GCSFileIO`/`ADLSFileIO`/`OSSFileIO`, which all 
override `newInputFile(String, long)` and cache the length (e.g. 
`aliyun/.../OSSFileIO.java`, `OSSInputFile.java`).
   
   ## Testing done
   
   - Added `TestEcsInputFile#testKnownLengthAvoidsHeadRequest` (length is 
returned from cache without the mock backend ever creating the object) and 
`TestEcsInputFile#testNegativeLengthIsRejected` (negative length throws 
`ValidationException`).
   - `./gradlew :iceberg-dell:check` — 27 tests passed, 0 failures.
   


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

Reply via email to