shawnding commented on a change in pull request #723: Arrow changes for supporting vectorized reads URL: https://github.com/apache/incubator-iceberg/pull/723#discussion_r383646541
########## File path: parquet/src/main/java/org/apache/iceberg/parquet/ValuesAsBytesReader.java ########## @@ -76,12 +91,29 @@ public final boolean readBoolean() { return value; } + /** + * + * @return 1 if true, 0 otherwise + */ + public final int readBooleanAsInt() { + if (bitOffset == 0) { + currentByte = getByte(); + } + int value = (currentByte & (1 << bitOffset)) >> bitOffset; + bitOffset += 1; + if (bitOffset == 8) { + bitOffset = 0; + } + return value; + } + private byte getByte() { try { return (byte) valuesInputStream.read(); } catch (IOException e) { throw new ParquetDecodingException("Failed to read a byte", e); } } + Review comment: maybe unnecessary empty line. ---------------------------------------------------------------- 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@iceberg.apache.org For additional commands, e-mail: issues-h...@iceberg.apache.org