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

Function ValidateCount

cpp/src/arrow/compute/kernels/aggregate_test.cc:897–910  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

895}
896
897void ValidateCount(const Array& input, CountPair expected) {
898 CountOptions non_null;
899 CountOptions nulls(CountOptions::ONLY_NULL);
900 CountOptions all(CountOptions::ALL);
901
902 ASSERT_OK_AND_ASSIGN(Datum result, Count(input, non_null));
903 AssertDatumsEqual(result, Datum(expected.first));
904
905 ASSERT_OK_AND_ASSIGN(result, Count(input, nulls));
906 AssertDatumsEqual(result, Datum(expected.second));
907
908 ASSERT_OK_AND_ASSIGN(result, Count(input, all));
909 AssertDatumsEqual(result, Datum(expected.first + expected.second));
910}
911
912template <typename ArrowType>
913void ValidateCount(const char* json, CountPair expected) {

Callers 2

TESTFunction · 0.85
TYPED_TESTFunction · 0.85

Calls 7

AssertDatumsEqualFunction · 0.85
CountFunction · 0.85
ArrayFromJSONFunction · 0.85
NaiveCountFunction · 0.85
ASSERT_OK_AND_ASSIGNFunction · 0.70
type_singletonFunction · 0.70
DatumClass · 0.50

Tested by

no test coverage detected