gosnowflake
gosnowflake copied to clipboard
Change GetArrowBatches() in snowflakeRows to be public and blocking call
Description
Salesforce ticket 00396666
The GetArrowBatches() API was implemented to access data in arrow.Record format directly from queries (#544). However, the API is not public so it's not usable by customers. It is also not a blocking call which results in panic in async mode.
This PR adds the public interface SnowflakeRows and exposes the functions GetQueryID(), GetStatus() and GetArrowBatches(). This matches the functions that are exposed in SnowflakeResult. GetArrowBatches() is also changed to a blocking call to ensure the arrow batches are ready before fetching it. Customer has verified the changes in this branch.
Checklist
- [x] Code compiles correctly
- [ ] Run
make fmt
to fix inconsistent formats - [x] Run
make lint
to get lint errors and fix all of them - [x] Created tests which fail without the change (if possible)
- [x] All tests passing
- [ ] Extended the README / documentation, if necessary
CLA Assistant Lite bot All contributors have signed the CLA ✍️ ✅