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

Method DoEncode

cpp/src/parquet/encoding_benchmark.cc:1398–1413  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1396 public:
1397 template <typename PutValuesFunc>
1398 void DoEncode(PutValuesFunc&& put_values) {
1399 auto node = schema::ByteArray("name");
1400 descr_ = std::make_unique<ColumnDescriptor>(node, 0, 0);
1401
1402 auto encoder = MakeTypedEncoder<ByteArrayType>(Encoding::PLAIN,
1403 /*use_dictionary=*/true, descr_.get());
1404 put_values(encoder.get());
1405 buffer_ = encoder->FlushValues();
1406
1407 auto dict_encoder = dynamic_cast<DictEncoder<ByteArrayType>*>(encoder.get());
1408 ASSERT_NE(dict_encoder, nullptr);
1409 dict_buffer_ =
1410 AllocateBuffer(default_memory_pool(), dict_encoder->dict_encoded_size());
1411 dict_encoder->WriteDict(dict_buffer_->mutable_data());
1412 num_dict_entries_ = dict_encoder->num_entries();
1413 }
1414
1415 template <typename IndexType>
1416 void EncodeDictBenchmark(benchmark::State& state) {

Callers

nothing calls this directly

Calls 9

ByteArrayClass · 0.85
default_memory_poolFunction · 0.85
dict_encoded_sizeMethod · 0.80
num_entriesMethod · 0.80
AllocateBufferFunction · 0.70
getMethod · 0.45
FlushValuesMethod · 0.45
WriteDictMethod · 0.45
mutable_dataMethod · 0.45

Tested by

no test coverage detected