pitrou commented on code in PR #48205:
URL: https://github.com/apache/arrow/pull/48205#discussion_r2555472890
##########
cpp/src/parquet/column_writer.cc:
##########
@@ -2578,13 +2579,31 @@ struct SerializeFunctor<
if constexpr (std::is_same_v<ArrowType, ::arrow::Decimal64Type>) {
*p++ = ::arrow::bit_util::ToBigEndian(u64_in[0]);
} else if constexpr (std::is_same_v<ArrowType, ::arrow::Decimal128Type>)
{
+#if ARROW_LITTLE_ENDIAN
Review Comment:
Please take a step back and read the comments above:
```c++
// Requires a custom serializer because decimal in parquet are in big-endian
// format. Thus, a temporary local buffer is required.
```
If we're on a big-endian system, this entire code is unnecessary and we can
just use the FIXED_LEN_BYTE_ARRAY `SerializeFunctor`.
--
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]