| 928 | } |
| 929 | |
| 930 | Status MakeMapOfDictionary(std::shared_ptr<RecordBatch>* out) { |
| 931 | // Exercises ARROW-9660 |
| 932 | constexpr int64_t kNumRows = 3; |
| 933 | std::shared_ptr<Array> a0, a1; |
| 934 | |
| 935 | auto key_array = DictArrayFromJSON(dictionary(int32(), utf8()), "[0, 1, 0, 2, 0, 3]", |
| 936 | R"(["k1", "k2", "k3", "k4"])"); |
| 937 | auto item_array = ArrayFromJSON(int16(), "[0, -1, 2, -3, 4, null]"); |
| 938 | RETURN_NOT_OK(MakeRandomMapArray(key_array, item_array, kNumRows, |
| 939 | /*include_nulls=*/false, default_memory_pool(), &a0)); |
| 940 | RETURN_NOT_OK(MakeRandomMapArray(key_array, item_array, kNumRows, |
| 941 | /*include_nulls=*/true, default_memory_pool(), &a1)); |
| 942 | auto f0 = field("f0", a0->type()); |
| 943 | auto f1 = field("f1", a1->type()); |
| 944 | *out = RecordBatch::Make(::arrow::schema({f0, f1}), kNumRows, {a0, a1}); |
| 945 | return Status::OK(); |
| 946 | } |
| 947 | |
| 948 | Status MakeDates(std::shared_ptr<RecordBatch>* out) { |
| 949 | std::vector<bool> is_valid = {true, true, true, false, true, true, true}; |
nothing calls this directly
no test coverage detected