@@ -2,6 +2,7 @@ use crate::{
22 ArrowFlightEndpoint , BoxCloneSyncChannel , ChannelResolver , DistributedExt ,
33 DistributedSessionBuilderContext ,
44} ;
5+ use arrow_flight:: flight_service_client:: FlightServiceClient ;
56use arrow_flight:: flight_service_server:: FlightServiceServer ;
67use async_trait:: async_trait;
78use datafusion:: common:: DataFusionError ;
@@ -15,7 +16,7 @@ const DUMMY_URL: &str = "http://localhost:50051";
1516/// tokio duplex rather than a TCP connection.
1617#[ derive( Clone ) ]
1718pub struct InMemoryChannelResolver {
18- channel : BoxCloneSyncChannel ,
19+ channel : FlightServiceClient < BoxCloneSyncChannel > ,
1920}
2021
2122impl Default for InMemoryChannelResolver {
@@ -39,7 +40,7 @@ impl InMemoryChannelResolver {
3940 } ) ) ;
4041
4142 let this = Self {
42- channel : BoxCloneSyncChannel :: new ( channel) ,
43+ channel : FlightServiceClient :: new ( BoxCloneSyncChannel :: new ( channel) ) ,
4344 } ;
4445 let this_clone = this. clone ( ) ;
4546
@@ -73,10 +74,10 @@ impl ChannelResolver for InMemoryChannelResolver {
7374 Ok ( vec ! [ url:: Url :: parse( DUMMY_URL ) . unwrap( ) ] )
7475 }
7576
76- async fn get_channel_for_url (
77+ async fn get_flight_client_for_url (
7778 & self ,
7879 _: & url:: Url ,
79- ) -> Result < BoxCloneSyncChannel , DataFusionError > {
80+ ) -> Result < FlightServiceClient < BoxCloneSyncChannel > , DataFusionError > {
8081 Ok ( self . channel . clone ( ) )
8182 }
8283}
0 commit comments