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

Function TEST_F

cpp/src/arrow/scalar_test.cc:2097–2111  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2095class TestSparseUnionScalar : public TestUnionScalar<SparseUnionType> {};
2096
2097TEST_F(TestSparseUnionScalar, GetScalar) {
2098 ArrayVector children{ArrayFromJSON(utf8(), R"(["alpha", "", "beta", null, "gamma"])"),
2099 ArrayFromJSON(uint64(), "[1, 2, 11, 22, null]"),
2100 ArrayFromJSON(uint64(), "[100, 101, 102, 103, 104]")};
2101
2102 auto type_ids = ArrayFromJSON(int8(), "[3, 42, 3, 3, 42]");
2103 SparseUnionArray arr(type_, 5, children, type_ids->data()->buffers[1]);
2104 ASSERT_OK(arr.ValidateFull());
2105
2106 CheckGetValidUnionScalar(arr, 0, *union_alpha_, *alpha_);
2107 CheckGetValidUnionScalar(arr, 1, *union_two_, *two_);
2108 CheckGetValidUnionScalar(arr, 2, *union_beta_, *beta_);
2109 CheckGetNullUnionScalar(arr, 3);
2110 CheckGetNullUnionScalar(arr, 4);
2111}
2112
2113class TestDenseUnionScalar : public TestUnionScalar<DenseUnionType> {};
2114

Callers

nothing calls this directly

Calls 14

ArrayFromJSONFunction · 0.85
CheckGetValidUnionScalarFunction · 0.85
CheckGetNullUnionScalarFunction · 0.85
MakeNullScalarFunction · 0.85
CheckMakeNullScalarFunction · 0.85
AssertValidationFailsFunction · 0.85
MakeScalarFunction · 0.85
ASSERT_OK_AND_ASSIGNFunction · 0.70
ExtensionScalarFunction · 0.70
dataMethod · 0.45
ValidateFullMethod · 0.45
EqualsMethod · 0.45

Tested by

no test coverage detected