You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@iceberg.apache.org by "bryanck (via GitHub)" <gi...@apache.org> on 2023/07/15 04:31:52 UTC

[GitHub] [iceberg] bryanck opened a new pull request, #8071: GCP: fix single byte read in GCSInputStream

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

   This PR fixes the conversion of a byte to an int when reading a single byte from GCSInputStream. Decoding integers in Parquet was throwing an exception because of this, in [this method](https://github.com/apache/parquet-mr/blob/1bdb3c6caf1bc45d66719ce6f77d25461216d697/parquet-common/src/main/java/org/apache/parquet/bytes/BytesUtils.java#L88).


-- 
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: issues-unsubscribe@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org


[GitHub] [iceberg] nastra commented on a diff in pull request #8071: GCP: fix single byte read in GCSInputStream

Posted by "nastra (via GitHub)" <gi...@apache.org>.
nastra commented on code in PR #8071:
URL: https://github.com/apache/iceberg/pull/8071#discussion_r1264379714


##########
gcp/src/main/java/org/apache/iceberg/gcp/gcs/GCSInputStream.java:
##########
@@ -117,7 +117,7 @@ public int read() throws IOException {
     readBytes.increment();
     readOperations.increment();
 
-    return singleByteBuffer.array()[0];
+    return singleByteBuffer.array()[0] & 0xFF;

Review Comment:
   +1



-- 
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: issues-unsubscribe@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org


[GitHub] [iceberg] danielcweeks merged pull request #8071: GCP: fix single byte read in GCSInputStream

Posted by "danielcweeks (via GitHub)" <gi...@apache.org>.
danielcweeks merged PR #8071:
URL: https://github.com/apache/iceberg/pull/8071


-- 
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: issues-unsubscribe@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org


[GitHub] [iceberg] danielcweeks commented on a diff in pull request #8071: GCP: fix single byte read in GCSInputStream

Posted by "danielcweeks (via GitHub)" <gi...@apache.org>.
danielcweeks commented on code in PR #8071:
URL: https://github.com/apache/iceberg/pull/8071#discussion_r1264338713


##########
gcp/src/main/java/org/apache/iceberg/gcp/gcs/GCSInputStream.java:
##########
@@ -117,7 +117,7 @@ public int read() throws IOException {
     readBytes.increment();
     readOperations.increment();
 
-    return singleByteBuffer.array()[0];
+    return singleByteBuffer.array()[0] & 0xFF;

Review Comment:
   Should we use `Byte.toUnsignedInt()` here to be more clear?



-- 
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: issues-unsubscribe@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org


[GitHub] [iceberg] dchristle commented on pull request #8071: GCP: fix single byte read in GCSInputStream

Posted by "dchristle (via GitHub)" <gi...@apache.org>.
dchristle commented on PR #8071:
URL: https://github.com/apache/iceberg/pull/8071#issuecomment-1687007123

   @bryanck Thank you for fixing this! It stymied my efforts to try to use GCSFileIO for several weeks.


-- 
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: issues-unsubscribe@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org