Skip to content

Commit

Permalink
feat: the first resp may not contain schema. (#363)
Browse files Browse the repository at this point in the history
feature: the first resp may not contain schema.

Co-authored-by: sundyli <543950155@qq.com>
  • Loading branch information
youngsofun and sundy-li authored Mar 13, 2024
1 parent 73b4c8d commit aa0ad1c
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions driver/src/rest_api.rs
Original file line number Diff line number Diff line change
Expand Up @@ -266,6 +266,9 @@ impl Stream for RestAPIRows {
Some(ref mut next_page) => match Pin::new(next_page).poll(cx) {
Poll::Ready(Ok(resp)) => {
self.data = resp.data.into();
if self.schema.fields().is_empty() {
self.schema = Arc::new(resp.schema.try_into()?);
}
self.query_id = resp.id;
self.next_uri = resp.next_uri;
self.next_page = None;
Expand Down

0 comments on commit aa0ad1c

Please sign in to comment.