MCPcopy Create free account
hub / github.com/apache/arrow / GenerateInputData

Method GenerateInputData

cpp/src/parquet/encoding_test.cc:752–766  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 5

resizeMethod · 0.80
BooleanMethod · 0.45
null_countMethod · 0.45
lengthMethod · 0.45
ValueMethod · 0.45

Tested by

no test coverage detected