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

Function gaflight_info_new

c_glib/arrow-flight-glib/common.cpp:926–950  ·  view source on GitHub ↗

* gaflight_info_new: * @schema: A #GArrowSchema. * @descriptor: A #GAFlightDescriptor. * @endpoints: (element-type GAFlightEndpoint): A list of #GAFlightEndpoint. * @total_records: The number of total records. * @total_bytes: The number of total bytes. * @error: (nullable): Return location for a #GError or %NULL. * * Returns: (nullable): The newly created #GAFlightInfo, %NULL on error. *

Source from the content-addressed store, hash-verified

924 * Since: 5.0.0
925 */
926GAFlightInfo *
927gaflight_info_new(GArrowSchema *schema,
928 GAFlightDescriptor *descriptor,
929 GList *endpoints,
930 gint64 total_records,
931 gint64 total_bytes,
932 GError **error)
933{
934 auto arrow_schema = garrow_schema_get_raw(schema);
935 auto flight_descriptor = gaflight_descriptor_get_raw(descriptor);
936 std::vector<arrow::flight::FlightEndpoint> flight_endpoints;
937 for (auto node = endpoints; node; node = node->next) {
938 auto endpoint = GAFLIGHT_ENDPOINT(node->data);
939 flight_endpoints.push_back(*gaflight_endpoint_get_raw(endpoint));
940 }
941 auto flight_info_result = arrow::flight::FlightInfo::Make(*arrow_schema,
942 *flight_descriptor,
943 flight_endpoints,
944 total_records,
945 total_bytes);
946 if (!garrow::check(error, flight_info_result, "[flight-info][new]")) {
947 return NULL;
948 }
949 return gaflight_info_new_raw(&(*flight_info_result));
950}
951
952/**
953 * gaflight_info_equal:

Callers

nothing calls this directly

Calls 7

garrow_schema_get_rawFunction · 0.85
gaflight_info_new_rawFunction · 0.85
push_backMethod · 0.80
MakeFunction · 0.50
checkFunction · 0.50

Tested by

no test coverage detected