Skip to content

Commit

Permalink
fix: ignore metric flight message on client
Browse files Browse the repository at this point in the history
Signed-off-by: Ruihang Xia <[email protected]>
  • Loading branch information
waynexia authored and shuiyisong committed Jan 11, 2024
1 parent e6f1840 commit d7c2a44
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions src/client/src/database.rs
Original file line number Diff line number Diff line change
Expand Up @@ -307,14 +307,17 @@ impl Database {
let flight_message = flight_message
.map_err(BoxedError::new)
.context(ExternalSnafu)?;
let FlightMessage::Recordbatch(record_batch) = flight_message else {
yield IllegalFlightMessagesSnafu {reason: "A Schema message must be succeeded exclusively by a set of RecordBatch messages"}
match flight_message {
FlightMessage::Recordbatch(record_batch) => yield Ok(record_batch),
FlightMessage::Metrics(_) => {}
FlightMessage::AffectedRows(_) | FlightMessage::Schema(_) => {
yield IllegalFlightMessagesSnafu {reason: format!("A Schema message must be succeeded exclusively by a set of RecordBatch messages, flight_message: {:?}", flight_message)}
.fail()
.map_err(BoxedError::new)
.context(ExternalSnafu);
break;
};
yield Ok(record_batch);
break;
}
}
}
}));
let record_batch_stream = RecordBatchStreamWrapper {
Expand Down

0 comments on commit d7c2a44

Please sign in to comment.