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

Method AppendInferred

cpp/src/arrow/array/array_union_test.cc:437–463  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

435 }
436
437 void AppendInferred() {
438 I8 = union_builder->AppendChild(i8_builder, "i8");
439 ASSERT_EQ(I8, 0);
440 AppendInt(33);
441 AppendInt(10);
442
443 STR = union_builder->AppendChild(str_builder, "str");
444 ASSERT_EQ(STR, 1);
445 AppendString("abc");
446 AppendString("");
447 AppendString("def");
448 AppendInt(-10);
449
450 DBL = union_builder->AppendChild(dbl_builder, "dbl");
451 ASSERT_EQ(DBL, 2);
452 AppendDouble(1.0);
453 AppendDouble(-1.0);
454 AppendDouble(0.5);
455
456 ASSERT_OK(union_builder->Finish(&actual));
457 ASSERT_OK(actual->ValidateFull());
458 ArrayFromVector<Int8Type, uint8_t>(expected_types_vector, &expected_types);
459
460 ASSERT_EQ(I8, 0);
461 ASSERT_EQ(STR, 1);
462 ASSERT_EQ(DBL, 2);
463 }
464
465 void AppendListOfInferred(std::shared_ptr<ListArray>* actual) {
466 ListBuilder list_builder(default_memory_pool(), union_builder);

Callers

nothing calls this directly

Calls 3

AppendChildMethod · 0.80
FinishMethod · 0.45
ValidateFullMethod · 0.45

Tested by

no test coverage detected