pub async fn call_do_get(
    address: &HCombAddress,
    hcomb_table: &HCombTableDesc,
    sql: String,
    source: String,
) -> Result<Pin<Box<dyn Stream<Item = ArrowResult<RecordBatch>>>>, Box<dyn Error>> {
    // Create Flight client
    let mut client = FlightServiceClient::connect(address.clone()).await?;

    let proto_plan = serde::serialize_hcomb(hcomb_table, sql, source);

    let mut buf = vec![];
    proto_plan.encode(&mut buf)?;

    // Call do_get to execute a SQL query and receive results
    let request = tonic::Request::new(Ticket { ticket: buf });
    let stream = client.do_get(request).await?.into_inner();
    let (_, record_batch_stream) = flight_utils::flight_to_batches(stream).await?;
    Ok(Box::pin(record_batch_stream))
}
/// Calls the hcomb do_get endpoint, expecting the first message to be the schema
Calls the hcomb do_get endpoint, expecting the first message to be the schema
Calls the hcomb do_get endpoint expecting the first message to be the schema
pub async fn call_do_get(
    address: &HCombAddress,
    hcomb_table: &HCombTableDesc,
    sql: String,
    source: String,
) -> Result<Pin<Box<dyn Stream<Item = ArrowResult<RecordBatch>>>>, Box<dyn Error>> {
    // Create Flight client
    let mut client = FlightServiceClient::connect(address.clone()).await?;
    let proto_plan = serde::serialize_hcomb(hcomb_table, sql, source);
    let mut buf = vec![];
    proto_plan.encode(&mut buf)?;
    // Call do_get to execute a SQL query and receive results
    let request = tonic::Request::new(Ticket { ticket: buf });
    let stream = client.do_get(request).await?.into_inner();
    let (_, record_batch_stream) = flight_utils::flight_to_batches(stream).await?;
    Ok(Box::pin(record_batch_stream))
}
pub async fn call_do_get ( address : & HCombAddress , hcomb_table : & HCombTableDesc , sql : String , source : String , ) -> Result < Pin < Box < dyn Stream < Item = ArrowResult < RecordBatch > > > > , Box < dyn Error > > { // Create Flight client let mut client = FlightServiceClient :: connect ( address . clone ( ) ) . await ? ; let proto_plan = serde :: serialize_hcomb ( hcomb_table , sql , source ) ; let mut buf = vec ! [ ] ; proto_plan . encode ( & mut buf ) ? ; // Call do_get to execute a SQL query and receive results let request = tonic :: Request :: new ( Ticket { ticket : buf } ) ; let stream = client . do_get ( request ) . await ? . into_inner ( ) ; let ( _ , record_batch_stream ) = flight_utils :: flight_to_batches ( stream ) . await ? ; Ok ( Box :: pin ( record_batch_stream ) ) }
Calls the hcomb do_get endpoint, expecting the first message to be the schema
Calls the hcomb do_get endpoint expecting the first message to be the schema
address
&HCombAddress
hcomb_table
&HCombTableDesc
sql
String
source
String
address
&HCombAddress
hcomb_table
&HCombTableDesc
sql
String
source
String