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

Function GetSingleSegmentKeyOutput

cpp/src/arrow/acero/hash_aggregate_test.cc:5334–5363  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

5332}
5333
5334Result<std::shared_ptr<ChunkedArray>> GetSingleSegmentKeyOutput() {
5335 return ChunkedArrayFromJSON(struct_({
5336 field("key_1", int64()),
5337 field("key_0", int64()),
5338 field("hash_count", int64()),
5339 field("hash_sum", float64()),
5340 field("hash_min_max", struct_({
5341 field("min", float64()),
5342 field("max", float64()),
5343 })),
5344 field("hash_first_last", struct_({
5345 field("first", float64()),
5346 field("last", float64()),
5347 })),
5348 field("hash_first", float64()),
5349 field("hash_last", float64()),
5350 }),
5351 {R"([
5352 [1, 1, 2, 4.25, {"min": 1.0, "max": 3.25}, {"first": 1.0, "last": 3.25}, 1.0, 3.25 ],
5353 [1, 2, 3, -0.125, {"min": -0.25, "max": 0.125}, {"first": 0.0, "last": -0.25}, 0.0, -0.25],
5354 [1, 3, 0, null, {"min": null, "max": null}, {"first": null, "last": null}, null, null],
5355 [1, null, 2, 4.75, {"min": 0.75, "max": 4.0}, {"first": 4.0, "last": 0.75}, 4.0, 0.75]
5356 ])",
5357 R"([
5358 [0, 1, 2, 4.25, {"min": 1.0, "max": 3.25}, {"first": 1.0, "last": 3.25}, 1.0, 3.25 ],
5359 [0, 2, 3, -0.125, {"min": -0.25, "max": 0.125}, {"first": 0.0, "last": -0.25}, 0.0, -0.25],
5360 [0, 3, 0, null, {"min": null, "max": null}, {"first": null, "last": null}, null, null],
5361 [0, null, 2, 4.75, {"min": 0.75, "max": 4.0}, {"first": 4.0, "last": 0.75}, 4.0, 0.75]
5362 ])"});
5363}
5364
5365void TestSingleSegmentScalar(GroupByFunction group_by,
5366 std::function<Result<std::shared_ptr<Table>>()> get_table) {

Callers

nothing calls this directly

Calls 3

ChunkedArrayFromJSONFunction · 0.85
struct_Function · 0.85
fieldFunction · 0.50

Tested by

no test coverage detected