File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1616
1717from altertable_flightsql .generated import arrow_flight_sql_pb2 as sql_pb2
1818
19+ GRPC_MAX_MESSAGE_LENGTH = 512 * 1024 * 1024
20+
1921
2022def _pack_command (cmd ) -> bytes :
2123 """Pack a Flight SQL command into an Any protobuf message."""
@@ -137,7 +139,14 @@ def __init__(
137139 self ._transaction = None
138140
139141 auth_middleware = BearerAuthMiddlewareFactory ()
140- self ._client = flight .FlightClient (location , middleware = [auth_middleware ])
142+ self ._client = flight .FlightClient (
143+ location ,
144+ middleware = [auth_middleware ],
145+ generic_options = [
146+ ("grpc.max_send_message_length" , GRPC_MAX_MESSAGE_LENGTH ),
147+ ("grpc.max_receive_message_length" , GRPC_MAX_MESSAGE_LENGTH ),
148+ ],
149+ )
141150 self ._client .authenticate_basic_token (self ._username , self ._password )
142151
143152 options = {}
You can’t perform that action at this time.
0 commit comments