pitrou commented on code in PR #48203:
URL: https://github.com/apache/arrow/pull/48203#discussion_r2556402672


##########
cpp/src/parquet/decoder.cc:
##########
@@ -406,9 +407,20 @@ int PlainDecoder<DType>::DecodeArrow(
       VisitBitRuns(valid_bits, valid_bits_offset, num_values,
                    [&](int64_t position, int64_t run_length, bool is_valid) {
                      if (is_valid) {
+#if ARROW_LITTLE_ENDIAN
                        RETURN_NOT_OK(builder->AppendValues(
                            reinterpret_cast<const value_type*>(data), 
run_length));
                        data += run_length * sizeof(value_type);
+#else
+                       // On big-endian systems, we need to byte-swap each 
value
+                       // since Parquet data is stored in little-endian format

Review Comment:
   This is fine, but of course this is less performant than calling 
`AppendValues` on the run.



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

Reply via email to