ianmcook commented on code in PR #43950:
URL: https://github.com/apache/arrow/pull/43950#discussion_r1743745123
##########
docs/source/format/Columnar.rst:
##########
@@ -1385,6 +1385,36 @@ have two entries in each RecordBatch. For a RecordBatch
of this schema with
buffer 13: col2 data
+Compression
+-----------
+
+There are three different options for record batch body
+buffers compression: buffers can be uncompressed, can use
+``lz4`` or ``zstd`` compression codec. All buffers in the flat
+sequence of the message body are compressed separately with the
+same codec.
+
+The difference between compressed and uncompressed buffers in the
+serialized form is as follows:
+
+* If the buffers in the ``RecordBatch`` message are **compressed**
+
+ - the ``data header`` includes the length and memory offset
+ of each **compressed buffer** in the record batch's body
+
+ - the ``body`` includes a flat sequence of **compressed memory
+ buffers** together with the **length of uncompressed buffer**
+ stored in the first 8 bytes for each buffer in the sequence
+
+* If the buffers in the ``RecordBatch`` message are **uncompressed**
+
+ - the ``data header`` includes the length and memory offset
+ of each **uncompressed buffer** in the record batch's body
+
+ - the ``body`` includes a flat sequence of **uncompressed memory
+ buffers** with the first 8 bytes empty or equal to ``-1`` to
+ indicate that the buffer is uncompressed
Review Comment:
Small suggestion: consistently use the phrase "buffer" or "memory buffer"
instead of mixing and matching
--
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]