| 798 | } |
| 799 | |
| 800 | void DoPutTest::TestDicts() { |
| 801 | auto descr = FlightDescriptor::Path({"dicts"}); |
| 802 | RecordBatchVector batches; |
| 803 | auto dict_values = ArrayFromJSON(utf8(), "[\"foo\", \"bar\", \"quux\"]"); |
| 804 | auto ty = dictionary(int8(), dict_values->type()); |
| 805 | auto schema = arrow::schema({field("f1", ty)}); |
| 806 | // Make several batches |
| 807 | for (const char* json : {"[1, 0, 1]", "[null]", "[null, 1]"}) { |
| 808 | auto indices = ArrayFromJSON(int8(), json); |
| 809 | auto dict_array = std::make_shared<DictionaryArray>(ty, indices, dict_values); |
| 810 | batches.push_back(RecordBatch::Make(schema, dict_array->length(), {dict_array})); |
| 811 | } |
| 812 | |
| 813 | CheckDoPut(descr, schema, batches); |
| 814 | } |
| 815 | |
| 816 | // Ensure the server is configured to allow large messages by default |
| 817 | // Tests a 32 MiB batch |
nothing calls this directly
no test coverage detected