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

Function MakeUuid

cpp/src/arrow/ipc/test_common.cc:1108–1124  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1106}
1107
1108Status MakeUuid(std::shared_ptr<RecordBatch>* out) {
1109 auto uuid_type = uuid();
1110 auto storage_type = checked_cast<const ExtensionType&>(*uuid_type).storage_type();
1111
1112 auto f0 = field("f0", uuid_type);
1113 auto f1 = field("f1", uuid_type, /*nullable=*/false);
1114 auto schema = ::arrow::schema({f0, f1});
1115
1116 auto a0 = std::make_shared<ExampleUuidArray>(
1117 uuid_type, ArrayFromJSON(storage_type, R"(["0123456789abcdef", null])"));
1118 auto a1 = std::make_shared<ExampleUuidArray>(
1119 uuid_type,
1120 ArrayFromJSON(storage_type, R"(["ZYXWVUTSRQPONMLK", "JIHGFEDBA9876543"])"));
1121
1122 *out = RecordBatch::Make(schema, a1->length(), {a0, a1});
1123 return Status::OK();
1124}
1125
1126Status MakeComplex128(std::shared_ptr<RecordBatch>* out) {
1127 auto type = complex128();

Callers 1

BatchesFunction · 0.85

Calls 8

ArrayFromJSONFunction · 0.85
storage_typeMethod · 0.80
schemaFunction · 0.70
uuidFunction · 0.50
fieldFunction · 0.50
MakeFunction · 0.50
OKFunction · 0.50
lengthMethod · 0.45

Tested by

no test coverage detected