| 5255 | } |
| 5256 | |
| 5257 | Result<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 | |
| 5288 | void TestSingleSegmentScalar(GroupByFunction group_by, |
| 5289 | std::function<Result<std::shared_ptr<Table>>()> get_table) { |
nothing calls this directly
no test coverage detected