amoeba commented on issue #26497:
URL: https://github.com/apache/arrow/issues/26497#issuecomment-1442563546

   Hey @lidavidm, I'm trying to do this and am running into an issue and I'm 
not sure we support this at the moment as it's currently documented:
   
   With C++ code,
   
   ```c++
   arrow::flight::FlightCallOptions options;
   options.headers.push_back(std::make_pair("X-MY-HEADER", "SOMEVAL"));
   ARROW_ASSIGN_OR_RAISE(listing, client->ListFlights(options, {}));
   ```
   
   or Python
   
   ```python
   client = flight.connect("grpc://localhost:61234")
   options = flight.FlightCallOptions(headers=[(b"X-MY-HEADER", b"SOMEVAL")])
   [info for info in client.list_flights(b"", options)]
   ```
   
   I get
   
   ```
   E0223 14:09:41.184318000 8048804160 call.cc:899]                       
validate_metadata: UNKNOWN:Illegal header key 
{created_time:"2023-02-23T14:09:41.183782-09:00", offset:0, raw_bytes:"58 2d 4d 
59 2d 48 45 41 44 45 52 \'X-MY-HEADER\'\x00"}
   E0223 14:09:41.184341000 8048804160 call_op_set.h:978]                 API 
misuse of type GRPC_CALL_ERROR_INVALID_METADATA observed
   E0223 14:09:41.184345000 8048804160 call_op_set.h:980]                 
assertion failed: false
   fish: Job 1, 'GRPC_VERBOSITY=info GRPC_TRACE=…' terminated by signal SIGABRT 
(Abort)
   ```
   
   <details>
   <summary>Full backtrace</summary>
   
   ```
   * thread #1, queue = 'com.apple.main-thread', stop reason = signal SIGABRT
     * frame #0: 0x000000018462e868 libsystem_kernel.dylib`__pthread_kill + 8
       frame #1: 0x0000000184665cec libsystem_pthread.dylib`pthread_kill + 288
       frame #2: 0x000000018459e2c8 libsystem_c.dylib`abort + 180
       frame #3: 0x0000000103ab1a68 
libgrpc++.1.51.dylib`grpc::CoreCodegen::assert_fail(char const*, char const*, 
int) + 48
       frame #4: 0x000000010025901c 
libarrow_flight.900.dylib`grpc::internal::CallOpSet<grpc::internal::CallOpSendInitialMetadata,
 grpc::internal::CallOpSendMessage, grpc::internal::CallOpClientSendClose, 
grpc::internal::CallNoOp<4>, grpc::internal::CallNoOp<5>, 
grpc::internal::CallNoOp<6> >::ContinueFillOpsAfterInterception() + 300
       frame #5: 0x000000010023fc4c 
libarrow_flight.900.dylib`arrow::flight::transport::grpc::(anonymous 
namespace)::GrpcClientInterceptorAdapter::Intercept(grpc::experimental::InterceptorBatchMethods*)
 + 360
       frame #6: 0x00000001002437d4 
libarrow_flight.900.dylib`grpc::internal::InterceptorBatchMethodsImpl::RunInterceptors()
 + 336
       frame #7: 0x0000000100258eac 
libarrow_flight.900.dylib`grpc::internal::CallOpSet<grpc::internal::CallOpSendInitialMetadata,
 grpc::internal::CallOpSendMessage, grpc::internal::CallOpClientSendClose, 
grpc::internal::CallNoOp<4>, grpc::internal::CallNoOp<5>, 
grpc::internal::CallNoOp<6> >::FillOps(grpc::internal::Call*) + 244
       frame #8: 0x00000001002652d8 
libarrow_flight.900.dylib`grpc::ClientReader<arrow::flight::protocol::FlightInfo>::ClientReader<arrow::flight::protocol::Criteria>(grpc::ChannelInterface*,
 grpc::internal::RpcMethod const&, grpc::ClientContext*, 
arrow::flight::protocol::Criteria const&) + 480
       frame #9: 0x000000010025b550 
libarrow_flight.900.dylib`arrow::flight::protocol::FlightService::Stub::ListFlightsRaw(grpc::ClientContext*,
 arrow::flight::protocol::Criteria const&) + 68
       frame #10: 0x000000010023d408 
libarrow_flight.900.dylib`arrow::flight::transport::grpc::(anonymous 
namespace)::GrpcClientImpl::ListFlights(arrow::flight::FlightCallOptions 
const&, arrow::flight::Criteria const&, 
std::__1::unique_ptr<arrow::flight::FlightListing, 
std::__1::default_delete<arrow::flight::FlightListing> >*) + 168
       frame #11: 0x000000010021ed1c 
libarrow_flight.900.dylib`arrow::flight::FlightClient::ListFlights(arrow::flight::FlightCallOptions
 const&, arrow::flight::Criteria const&) + 128
       frame #12: 0x0000000100002bf4 
client`DoPutFlightClient::ListFlights(this=0x0000600000c04de0) at client.cc:41:3
       frame #13: 0x00000001000026c4 client`RunMain(argc=1, 
argv=0x000000016fdfed68) at client.cc:79:13
       frame #14: 0x0000000100002f70 client`main(argc=1, 
argv=0x000000016fdfed68) at client.cc:92:18
       frame #15: 0x000000018433be50 dyld`start + 2544
   ```
   </details>
   
   Is my use what this issue is about?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to