pitrou commented on a change in pull request #9432:
URL: https://github.com/apache/arrow/pull/9432#discussion_r577666626



##########
File path: cpp/src/parquet/column_reader_test.cc
##########
@@ -71,23 +71,30 @@ static inline bool vector_equal_with_def_levels(const 
std::vector<T>& left,
   return true;
 }
 
+template <typename Type>
 class TestPrimitiveReader : public ::testing::Test {
  public:
+  using c_type = typename Type::c_type;
+
   void InitReader(const ColumnDescriptor* d) {
     std::unique_ptr<PageReader> pager_;
     pager_.reset(new test::MockPageReader(pages_));
     reader_ = ColumnReader::Make(d, std::move(pager_));
   }
 
   void CheckResults() {
-    std::vector<int32_t> vresult(num_values_, -1);
+    std::vector<c_type> vresult(num_values_, -1);
+    std::vector<uint8_t> vresult_bool(num_values_, -1);
+    c_type* vresult_ptr = ResultsPointer(vresult, vresult_bool);

Review comment:
       It looks like the `PrimitiveTypedTest` class in `test_util.h` already 
has the necessary harnessing around `vector<bool> <-> vector<uint8_t>`. Perhaps 
you can try reusing it instead of reinventing similar routines here?




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

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to