(&self)
| 423 | } |
| 424 | |
| 425 | fn fake_flight_info(&self) -> Result<FlightInfo, ArrowError> { |
| 426 | let batch = Self::fake_result()?; |
| 427 | |
| 428 | Ok(FlightInfo::new() |
| 429 | .try_with_schema(batch.schema_ref()) |
| 430 | .expect("encoding schema") |
| 431 | .with_endpoint( |
| 432 | FlightEndpoint::new().with_ticket(Ticket::new( |
| 433 | FetchResults { |
| 434 | handle: String::from("part_1"), |
| 435 | } |
| 436 | .as_any() |
| 437 | .encode_to_vec(), |
| 438 | )), |
| 439 | ) |
| 440 | .with_endpoint( |
| 441 | FlightEndpoint::new().with_ticket(Ticket::new( |
| 442 | FetchResults { |
| 443 | handle: String::from("part_2"), |
| 444 | } |
| 445 | .as_any() |
| 446 | .encode_to_vec(), |
| 447 | )), |
| 448 | ) |
| 449 | .with_total_records(batch.num_rows() as i64) |
| 450 | .with_total_bytes(batch.get_array_memory_size() as i64) |
| 451 | .with_ordered(false)) |
| 452 | } |
| 453 | } |
| 454 | |
| 455 | fn serialize_schema(schema: &Schema) -> Result<Bytes, ArrowError> { |
no test coverage detected