mapleFU commented on PR #15124:
URL: https://github.com/apache/arrow/pull/15124#issuecomment-1369904454

   Seems that would causing our testing run a long time, should I make 
`kBatchSizes` configurable, and just using another `Execute`? Like:
   
   ```c++
   template <typename Type>
   class TestDeltaBitPackEncoding : public TestEncodingBase<Type> {
    public:
     using c_type = typename Type::c_type;
     static constexpr int TYPE = Type::type_num;
     static constexpr size_t ROUND_TRIP_TIMES = 3;
   
     void InitReadBatchSizedData(...);
   };
   
     void CheckRoundtrip() override {
       ...
       auto read_batch_sizes = extra_read_batch_sizes;
       read_batch_sizes.push_back(num_values_);
       for (size_t i = 0; i < ROUND_TRIP_TIMES; ++i) {
         for (int read_batch_size: read_batch_sizes) {
           encoder->Put(draws_, num_values_);
           encode_buffer_ = encoder->FlushValues();
   
           decoder->SetData(num_values_, encode_buffer_->data(),
                            static_cast<int>(encode_buffer_->size()));
   
           int values_decoded_sum = 0;
           while (values_decoded_sum < num_values_) {
             int values_decoded =
                 decoder->Decode(decode_buf_ + values_decoded_sum, 
read_batch_size);
             values_decoded_sum += values_decoded;
           }
           ASSERT_EQ(num_values_, values_decoded_sum);
           ASSERT_NO_FATAL_FAILURE(VerifyResults<c_type>(decode_buf_, draws_, 
num_values_));
         }
       }
     }
   ```
   
   and
   
   ```
   void ExecuteSteps(int nvalues, int repeats, std::vector<int> 
extra_read_batch_size) {
     this->InitReadBatchSizedData(nvalues, repeats, extra_read_batch_size);
     this->CheckRoundtrip();
   }
   ```
   
   I'm arguing this, because when I set `const std::vector<int> 
EXTRA_READ_BATCH_SIZES = {1, 10};` and make `CheckRoundTrip` run it every time, 
the testing will spend 5 minutes in debug mode, which makes me mad :( 
`ExecuteSteps` will only finished in one second


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