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

Method TestDicts

cpp/src/arrow/flight/test_definitions.cc:800–814  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

798}
799
800void 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

Callers

nothing calls this directly

Calls 9

ArrayFromJSONFunction · 0.85
push_backMethod · 0.80
PathFunction · 0.70
dictionaryFunction · 0.50
schemaFunction · 0.50
fieldFunction · 0.50
MakeFunction · 0.50
typeMethod · 0.45
lengthMethod · 0.45

Tested by

no test coverage detected