Skip to content

Conversation

@gliga
Copy link
Contributor

@gliga gliga commented Apr 7, 2025

As the newly added tests shows, we might end up with a schema (create view) and yet no rows in which case we would still have an issue #2173

This PR changes so we check if the number of rows is empty (and keep the schema).

Note: The potential issue with using Schema vs. TotalRows is the same (as the comment says for both of the fields they might not be initialized in some cases before the first call to Next).

@gliga gliga requested a review from zeroshade as a code owner April 7, 2025 20:44
@github-actions github-actions bot added this to the ADBC Libraries 18 milestone Apr 7, 2025
@felipecrv felipecrv changed the title fix: Use number of rows (rather than schema) to check if we need an empty arrow iterator fix(go/adbc/driver/bigquery): Use number of rows (rather than schema) to check if we need an empty arrow iterator Apr 7, 2025
@felipecrv
Copy link
Contributor

I like this fix much more than the previous one -- empty record batch readers may have a schema.

I think the BigQuery Go SDK assumes that the caller knows that the SQL being passed is not going to produce a result set which is not the case from the ADBC driver code just forwarding SQL it receives.

@felipecrv felipecrv merged commit 93edbde into apache:main Apr 7, 2025
39 of 41 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants