jfz commented on code in PR #5282:
URL: https://github.com/apache/iceberg/pull/5282#discussion_r927851995


##########
aws/src/main/java/org/apache/iceberg/aws/s3/S3OutputStream.java:
##########
@@ -389,7 +391,9 @@ private void completeUploads() {
       S3RequestUtil.configureEncryption(awsProperties, requestBuilder);
       S3RequestUtil.configurePermission(awsProperties, requestBuilder);
 
-      s3.putObject(requestBuilder.build(), 
RequestBody.fromInputStream(contentStream, contentLength));
+      s3.putObject(
+          requestBuilder.build(),
+          RequestBody.fromContentProvider(contentProvider, contentLength, 
Mimetype.MIMETYPE_OCTET_STREAM));

Review Comment:
   The input stream here is a composition from multiple `stagingFiles`, is size 
of `stagingFiles` always 1 when it's not multipart? It's possible if that's the 
case, but I think the current way is a bit more elegant and flexible without 
that assumption.



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