You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2022/08/12 04:34:34 UTC

[GitHub] [spark] sadikovi commented on a diff in pull request #37485: [SPARK-40052] Handle direct byte buffers in VectorizedDeltaBinaryPackedReader

sadikovi commented on code in PR #37485:
URL: https://github.com/apache/spark/pull/37485#discussion_r944106161


##########
sql/core/src/main/java/org/apache/spark/sql/execution/datasources/parquet/VectorizedDeltaBinaryPackedReader.java:
##########
@@ -300,8 +300,12 @@ private void unpackMiniBlock() throws IOException {
         bitWidths[currentMiniBlock]);
     for (int j = 0; j < miniBlockSizeInValues; j += 8) {
       ByteBuffer buffer = in.slice(packer.getBitWidth());
-      packer.unpack8Values(buffer.array(),
-        buffer.arrayOffset() + buffer.position(), unpackedValuesBuffer, j);
+      if (buffer.hasArray()) {

Review Comment:
   Unfortunately, yes. ByteBufferInputStream does not have an API to check if it is backed by direct byte buffers. Let me check if I can have the boolean flag to be resolved once on the initialisation.



-- 
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: reviews-unsubscribe@spark.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org