Skip to content

Commit aa0ad1c

Browse files
youngsofunsundy-li
andauthored
feat: the first resp may not contain schema. (#363)
feature: the first resp may not contain schema. Co-authored-by: sundyli <[email protected]>
1 parent 73b4c8d commit aa0ad1c

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

driver/src/rest_api.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -266,6 +266,9 @@ impl Stream for RestAPIRows {
266266
Some(ref mut next_page) => match Pin::new(next_page).poll(cx) {
267267
Poll::Ready(Ok(resp)) => {
268268
self.data = resp.data.into();
269+
if self.schema.fields().is_empty() {
270+
self.schema = Arc::new(resp.schema.try_into()?);
271+
}
269272
self.query_id = resp.id;
270273
self.next_uri = resp.next_uri;
271274
self.next_page = None;

0 commit comments

Comments
 (0)