Skip to content

Apache DataFusion SQL Query Engine

ARROW-4626: [Flight] Add application-defined metadata to DoGet/DoPut

David Li178d52b309bf
diff --git a/format/Flight.proto b/format/Flight.proto
index 7f0488b86c..0c8f28e531 100644
--- a/format/Flight.proto
+++ b/format/Flight.proto
@@ -77,7 +77,7 @@ service FlightService {
* number. In the latter, the service might implement a 'seal' action that
* can be applied to a descriptor once all streams are uploaded.
*/
- rpc DoPut(stream FlightData) returns (PutResult) {}
+ rpc DoPut(stream FlightData) returns (stream PutResult) {}
/*
* Flight services can support an arbitrary number of simple actions in
@@ -285,6 +285,11 @@ message FlightData {
*/
bytes data_header = 2;
+ /*
+ * Application-defined metadata.
+ */
+ bytes app_metadata = 3;
+
/*
* The actual batch of Arrow data. Preferably handled with minimal-copies
* coming last in the definition to help with sidecar patterns (it is
@@ -295,7 +300,8 @@ message FlightData {
}
/**
- * The response message (currently empty) associated with the submission of a
- * DoPut.
+ * The response message associated with the submission of a DoPut.
*/
-message PutResult {}
+message PutResult {
+ bytes app_metadata = 1;
+}
diff --git a/integration/integration_test.py b/integration/integration_test.py
index a4763c98c8..aca05747c7 100644
--- a/integration/integration_test.py
+++ b/integration/integration_test.py
@@ -1152,7 +1152,7 @@ def get_generated_json_files(tempdir=None, flight=False):
generate_interval_case(),
generate_map_case(),
generate_nested_case(),
- generate_dictionary_case().skip_category(SKIP_FLIGHT),
+ generate_dictionary_case(),
generate_nested_dictionary_case().skip_category(SKIP_ARROW)
.skip_category(SKIP_FLIGHT),
]