ebyhr commented on code in PR #19048:
URL: https://github.com/apache/iceberg/pull/19048#discussion_r4638066641
##########
gcp/src/main/java/org/apache/iceberg/gcp/gcs/GCSInputFile.java:
##########
@@ -64,7 +66,12 @@ static GCSInputFile fromLocation(
@Override
public long getLength() {
if (blobSize == null) {
- this.blobSize = getBlob().getSize();
Review Comment:
`GCSInputStream` has the same unchecked `storage.get(blobId).getSize()`.
Worth a follow-up?
https://github.com/apache/iceberg/blob/95aac2f4b100db7f8f37563d58d09daf01196d47/gcp/src/main/java/org/apache/iceberg/gcp/gcs/GCSInputStream.java#L182
##########
gcp/src/test/java/org/apache/iceberg/gcp/gcs/TestGcsInputFile.java:
##########
@@ -111,6 +113,24 @@ public void getLength() {
assertThat(inputFile.getLength()).isEqualTo(FILE_SIZE);
}
+ @Test
+ public void getLengthMissingBlob() {
Review Comment:
https://iceberg.apache.org/contribute/#conventions-and-recommendations
* Omit the public modifier for test classes, test methods, and lifecycle
methods for newly added tests.
```suggestion
void getLengthMissingBlob() {
```
--
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]