File tree Expand file tree Collapse file tree 4 files changed +10
-1
lines changed
Expand file tree Collapse file tree 4 files changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -66,7 +66,8 @@ impl Processor for ExchangeSourceReader {
6666
6767 if self . output . is_finished ( ) {
6868 if !self . finished {
69- return Ok ( Event :: Async ) ;
69+ self . finished = true ;
70+ self . flight_receiver . close ( ) ;
7071 }
7172
7273 return Ok ( Event :: Finished ) ;
Original file line number Diff line number Diff line change @@ -81,6 +81,8 @@ impl FlightClient {
8181 break ;
8282 }
8383 }
84+
85+ tx. close ( ) ;
8486 }
8587 } ) ;
8688
Original file line number Diff line number Diff line change @@ -146,6 +146,8 @@ impl FlightService for DatabendQueryFlightService {
146146 . create_session ( SessionType :: FlightRPC )
147147 . await ?;
148148 let ctx = session. create_query_context ( ) . await ?;
149+ // Keep query id
150+ ctx. set_id ( init_query_fragments_plan. executor_packet . query_id . clone ( ) ) ;
149151
150152 let spawner = ctx. clone ( ) ;
151153 match_join_handle ( spawner. spawn ( async move {
Original file line number Diff line number Diff line change @@ -200,6 +200,10 @@ impl QueryContext {
200200 self . shared . set_affect ( affect)
201201 }
202202
203+ pub fn set_id ( & self , id : String ) {
204+ * self . shared . init_query_id . write ( ) = id;
205+ }
206+
203207 pub fn set_executor ( & self , weak_ptr : Weak < PipelineExecutor > ) {
204208 self . shared . set_executor ( weak_ptr)
205209 }
You can’t perform that action at this time.
0 commit comments