| 49 | end |
| 50 | |
| 51 | def test_by_string |
| 52 | plan, reader = build_plan do |
| 53 | aggregations = [ |
| 54 | Arrow::Aggregation.new("hash_sum", nil, "number", "sum(number)"), |
| 55 | Arrow::Aggregation.new("hash_count", nil, "number", "count(number)"), |
| 56 | ] |
| 57 | Arrow::AggregateNodeOptions.new(aggregations, ["string"]) |
| 58 | end |
| 59 | execute(plan) do |
| 60 | assert_equal(build_table("string" => build_string_array(["a", "b"]), |
| 61 | "sum(number)" => build_int64_array([9, 6]), |
| 62 | "count(number)" => build_int64_array([3, 2])), |
| 63 | reader.read_all) |
| 64 | end |
| 65 | end |
| 66 | |
| 67 | def test_hash_first_with_single_thread |
| 68 | thread_pool = Arrow::ThreadPool.new(1) |