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

Method C_PHONE

cpp/src/arrow/acero/tpch_node.cc:2991–3006  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2989 }
2990
2991 Status C_PHONE(size_t thread_index) {
2992 ThreadLocalData& tld = thread_local_data_[thread_index];
2993 if (tld.batch[CUSTOMER::C_PHONE].kind() == Datum::NONE) {
2994 RETURN_NOT_OK(C_NATIONKEY(thread_index));
2995 RETURN_NOT_OK(AllocateColumn(thread_index, CUSTOMER::C_PHONE));
2996 int32_t byte_width = kTypes[CUSTOMER::C_PHONE]->byte_width();
2997 const int32_t* c_nationkey = reinterpret_cast<const int32_t*>(
2998 tld.batch[CUSTOMER::C_NATIONKEY].array()->buffers[1]->data());
2999 char* c_phone = reinterpret_cast<char*>(
3000 tld.batch[CUSTOMER::C_PHONE].array()->buffers[1]->mutable_data());
3001 for (int64_t irow = 0; irow < tld.to_generate; irow++) {
3002 GeneratePhoneNumber(c_phone + irow * byte_width, tld.rng, c_nationkey[irow]);
3003 }
3004 }
3005 return Status::OK();
3006 }
3007
3008 Status C_ACCTBAL(size_t thread_index) {
3009 ThreadLocalData& tld = thread_local_data_[thread_index];

Callers

nothing calls this directly

Calls 7

GeneratePhoneNumberFunction · 0.85
OKFunction · 0.50
kindMethod · 0.45
byte_widthMethod · 0.45
dataMethod · 0.45
arrayMethod · 0.45
mutable_dataMethod · 0.45

Tested by

no test coverage detected