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

Function TEST_F

cpp/src/arrow/scalar_test.cc:2037–2051  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2035class TestSparseUnionScalar : public TestUnionScalar<SparseUnionType> {};
2036
2037TEST_F(TestSparseUnionScalar, GetScalar) {
2038 ArrayVector children{ArrayFromJSON(utf8(), R"(["alpha", "", "beta", null, "gamma"])"),
2039 ArrayFromJSON(uint64(), "[1, 2, 11, 22, null]"),
2040 ArrayFromJSON(uint64(), "[100, 101, 102, 103, 104]")};
2041
2042 auto type_ids = ArrayFromJSON(int8(), "[3, 42, 3, 3, 42]");
2043 SparseUnionArray arr(type_, 5, children, type_ids->data()->buffers[1]);
2044 ASSERT_OK(arr.ValidateFull());
2045
2046 CheckGetValidUnionScalar(arr, 0, *union_alpha_, *alpha_);
2047 CheckGetValidUnionScalar(arr, 1, *union_two_, *two_);
2048 CheckGetValidUnionScalar(arr, 2, *union_beta_, *beta_);
2049 CheckGetNullUnionScalar(arr, 3);
2050 CheckGetNullUnionScalar(arr, 4);
2051}
2052
2053class TestDenseUnionScalar : public TestUnionScalar<DenseUnionType> {};
2054

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