wgtmac commented on code in PR #45351: URL: https://github.com/apache/arrow/pull/45351#discussion_r2039224033
########## cpp/src/parquet/column_writer.cc: ########## @@ -2383,29 +2391,45 @@ struct SerializeFunctor< int64_t non_null_count = array.length() - array.null_count(); int64_t size = non_null_count * ArrowType::kByteWidth; scratch_buffer = AllocateBuffer(ctx->memory_pool, size); - scratch = reinterpret_cast<int64_t*>(scratch_buffer->mutable_data()); + scratch_i32 = reinterpret_cast<int32_t*>(scratch_buffer->mutable_data()); + scratch_i64 = reinterpret_cast<int64_t*>(scratch_buffer->mutable_data()); Review Comment: Can't we perform the `reinterpret_cast` right before calling `::arrow::bit_util::ToBigEndian` to set it? At that time, you already know the byte_width. ########## cpp/src/parquet/arrow/schema_internal.h: ########## @@ -19,6 +19,7 @@ #include "arrow/result.h" #include "arrow/type_fwd.h" +#include "parquet/properties.h" Review Comment: Please use forward declaration instead of adding a new include. ########## cpp/src/parquet/arrow/reader_internal.cc: ########## @@ -731,9 +750,11 @@ template < std::is_same<ParquetIntegerType, Int64Type>::value>> static Status DecimalIntegerTransfer(RecordReader* reader, MemoryPool* pool, const std::shared_ptr<Field>& field, Datum* out) { - // Decimal128 and Decimal256 are only Arrow constructs. Parquet does not + // Decimal32 and Decimal64 are only Arrow constructs. Parquet does not Review Comment: The comment seems not correct? -- 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: github-unsubscr...@arrow.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org