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

Method AppendInferred

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

Source from the content-addressed store, hash-verified

480 }
481
482 void AppendInferred() {
483 I8 = union_builder->AppendChild(i8_builder, "i8");
484 ASSERT_EQ(I8, 0);
485 AppendInt(33);
486 AppendInt(10);
487
488 STR = union_builder->AppendChild(str_builder, "str");
489 ASSERT_EQ(STR, 1);
490 AppendString("abc");
491 AppendString("");
492 AppendString("def");
493 AppendInt(-10);
494
495 DBL = union_builder->AppendChild(dbl_builder, "dbl");
496 ASSERT_EQ(DBL, 2);
497 AppendDouble(1.0);
498 AppendDouble(-1.0);
499 AppendDouble(0.5);
500
501 ASSERT_OK(union_builder->Finish(&actual));
502 ASSERT_OK(actual->ValidateFull());
503 ArrayFromVector<Int8Type, uint8_t>(expected_types_vector, &expected_types);
504
505 ASSERT_EQ(I8, 0);
506 ASSERT_EQ(STR, 1);
507 ASSERT_EQ(DBL, 2);
508 }
509
510 void AppendListOfInferred(std::shared_ptr<ListArray>* actual) {
511 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