Add streaming support for arrow batches #44
+114
−7
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
PRs adds
exec_streamed
method that returns Arrow Batches via stream while downloading/converting response. This reduces memory usage for large datasets as the records can be processed by chunks and improves performance by giving access for already loaded records.MAX_CHUNK_DOWNLOAD_WORKERS(10)
download workers are used: https://github.com/snowflakedb/gosnowflake/blob/master/rows.go#L22RawQueryResult
to always return result via stream but then realized that there is a polars dependency that requires RawQueryResult in bytes as it can't use async functionality to convert stream to bytes (defines TryFrom that is always sync)snowflake_sample_data.tpch_sf100
dataset.