| 750 | } |
| 751 | |
| 752 | void GenerateInputData(double null_probability, double true_probability) { |
| 753 | ::arrow::random::RandomArrayGenerator rag(0); |
| 754 | expected_dense_ = rag.Boolean(kNumValues, true_probability, null_probability); |
| 755 | null_count_ = static_cast<int>(expected_dense_->null_count()); |
| 756 | valid_bits_ = expected_dense_->null_bitmap_data(); |
| 757 | |
| 758 | // Initialize input_data_ for the encoder from the expected_array_ values |
| 759 | const auto& boolean_array = |
| 760 | checked_cast<const ::arrow::BooleanArray&>(*expected_dense_); |
| 761 | input_data_.resize(boolean_array.length()); |
| 762 | |
| 763 | for (int64_t i = 0; i < boolean_array.length(); ++i) { |
| 764 | input_data_[i] = boolean_array.Value(i); |
| 765 | } |
| 766 | } |
| 767 | |
| 768 | // Setup encoder/decoder pair for testing with boolean encoding |
| 769 | void SetupEncoderDecoder(Encoding::type encoding) { |
nothing calls this directly
no test coverage detected