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

Method DoPut

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

Just echo the number of batches written. The client will try to call this method with different write options set.

Source from the content-addressed store, hash-verified

1063 // Just echo the number of batches written. The client will try to
1064 // call this method with different write options set.
1065 Status DoPut(const ServerCallContext& context,
1066 std::unique_ptr<FlightMessageReader> reader,
1067 std::unique_ptr<FlightMetadataWriter> writer) override {
1068 int counter = 0;
1069 while (true) {
1070 ARROW_ASSIGN_OR_RAISE(FlightStreamChunk chunk, reader->Next());
1071 if (chunk.data == nullptr) break;
1072 counter++;
1073 }
1074 auto metadata = Buffer::FromString(std::to_string(counter));
1075 return writer->WriteMetadata(*metadata);
1076 }
1077
1078 // Echo client data, but with write options set to limit the nesting
1079 // level.

Callers

nothing calls this directly

Calls 3

FromStringFunction · 0.85
to_stringFunction · 0.85
WriteMetadataMethod · 0.45

Tested by

no test coverage detected