wgtmac commented on code in PR #35825: URL: https://github.com/apache/arrow/pull/35825#discussion_r1241378152
########## cpp/src/parquet/arrow/arrow_reader_writer_test.cc: ########## @@ -1342,6 +1354,23 @@ TEST_F(TestUInt32ParquetIO, Parquet_1_0_Compatibility) { using TestStringParquetIO = TestParquetIO<::arrow::StringType>; +#if defined(_WIN64) || defined(__x86_64__) Review Comment: Sorry I have missed this discussion. What is the issue for adding this? ########## cpp/src/parquet/arrow/arrow_reader_writer_test.cc: ########## @@ -610,9 +609,20 @@ class ParquetIOTestBase : public ::testing::Test { } void ReaderFromSink(std::unique_ptr<FileReader>* out) { + return ReaderFromSink(out, default_arrow_reader_properties()); + } + + void ReaderFromSink(std::unique_ptr<FileReader>* out, + const ArrowReaderProperties& arrow_reader_properties) { ASSERT_OK_AND_ASSIGN(auto buffer, sink_->Finish()); - ASSERT_OK_NO_THROW(OpenFile(std::make_shared<BufferReader>(buffer), - ::arrow::default_memory_pool(), out)); + + FileReaderBuilder builder; + + ASSERT_OK_NO_THROW(builder.Open(std::make_shared<BufferReader>(buffer))); + + ASSERT_OK_NO_THROW(builder.properties(arrow_reader_properties) + ->memory_pool(::arrow::default_memory_pool()) + ->Build(out)); Review Comment: ```suggestion FileReaderBuilder builder; ASSERT_OK_NO_THROW(builder.Open(std::make_shared<BufferReader>(buffer))); ASSERT_OK_NO_THROW(builder.properties(arrow_reader_properties) ->memory_pool(::arrow::default_memory_pool()) ->Build(out)); ``` These empty lines seems to be unnecessary ########## cpp/src/parquet/encoding.cc: ########## @@ -2715,10 +2821,11 @@ std::shared_ptr<Buffer> DeltaLengthByteArrayEncoder<DType>::FlushValues() { // ---------------------------------------------------------------------- // DeltaLengthByteArrayDecoder -class DeltaLengthByteArrayDecoder : public DecoderImpl, - virtual public TypedDecoder<ByteArrayType> { +template <typename BAT> +class DeltaLengthByteArrayDecoderBase : public DecoderImpl, + virtual public TypedDecoder<BAT> { Review Comment: I think this file needs to run clang-format. ########## cpp/src/parquet/encoding.cc: ########## @@ -3200,6 +3311,9 @@ class DeltaByteArrayDecoder : public DecoderImpl, std::shared_ptr<ResizableBuffer> buffered_data_; }; +using DeltaByteArrayDecoder = DeltaByteArrayDecoderBase<ByteArrayType>; +using DeltaLargeByteArrayDecoder = DeltaByteArrayDecoderBase<LargeByteArrayType>; Review Comment: ditto ########## cpp/src/parquet/encoding.cc: ########## @@ -2847,6 +2954,9 @@ class DeltaLengthByteArrayDecoder : public DecoderImpl, std::shared_ptr<ResizableBuffer> buffered_length_; }; +using DeltaLengthByteArrayDecoder = DeltaLengthByteArrayDecoderBase<ByteArrayType>; +using DeltaLengthLargeByteArrayDecoder = DeltaLengthByteArrayDecoderBase<LargeByteArrayType>; Review Comment: Add a test? -- 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