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

Function GetSingleSegmentKeyOutput

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

Source from the content-addressed store, hash-verified

5255}
5256
5257Result<std::shared_ptr<ChunkedArray>> GetSingleSegmentKeyOutput() {
5258 return ChunkedArrayFromJSON(struct_({
5259 field("key_1", int64()),
5260 field("key_0", int64()),
5261 field("hash_count", int64()),
5262 field("hash_sum", float64()),
5263 field("hash_min_max", struct_({
5264 field("min", float64()),
5265 field("max", float64()),
5266 })),
5267 field("hash_first_last", struct_({
5268 field("first", float64()),
5269 field("last", float64()),
5270 })),
5271 field("hash_first", float64()),
5272 field("hash_last", float64()),
5273 }),
5274 {R"([
5275 [1, 1, 2, 4.25, {"min": 1.0, "max": 3.25}, {"first": 1.0, "last": 3.25}, 1.0, 3.25 ],
5276 [1, 2, 3, -0.125, {"min": -0.25, "max": 0.125}, {"first": 0.0, "last": -0.25}, 0.0, -0.25],
5277 [1, 3, 0, null, {"min": null, "max": null}, {"first": null, "last": null}, null, null],
5278 [1, null, 2, 4.75, {"min": 0.75, "max": 4.0}, {"first": 4.0, "last": 0.75}, 4.0, 0.75]
5279 ])",
5280 R"([
5281 [0, 1, 2, 4.25, {"min": 1.0, "max": 3.25}, {"first": 1.0, "last": 3.25}, 1.0, 3.25 ],
5282 [0, 2, 3, -0.125, {"min": -0.25, "max": 0.125}, {"first": 0.0, "last": -0.25}, 0.0, -0.25],
5283 [0, 3, 0, null, {"min": null, "max": null}, {"first": null, "last": null}, null, null],
5284 [0, null, 2, 4.75, {"min": 0.75, "max": 4.0}, {"first": 4.0, "last": 0.75}, 4.0, 0.75]
5285 ])"});
5286}
5287
5288void TestSingleSegmentScalar(GroupByFunction group_by,
5289 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