Repository navigation
Bring back to_arrow_table and to_arrow_reader on DB-API results over a re-feed of the rows - #702
Merged
Conversation
…a re-feed of the rows
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Brings back
to_arrow_table(batch_size)andto_arrow_reader(batch_size)on DB-API results, on the connection and as module functions, over a re-feed of the rows the result holds.The engine fixes a result's format at submission and
execute()submits in the chunk format, so a result can no longer become an Arrow one. Instead, the rows the result still holds are moved into oneColumnDataCollectionand submitted again in the Arrow format on the same connection, through theSession::Submitover a collection that 1dd1ab5 deleted. The conversion is the one the relational API's Arrow terminals use, so the two agree exactly: column names (duplicates included), batch sizes, types and settings. Each call emits aUserWarningpointing atcon.sql(query).to_arrow_table(); deprecating or promoting them is for after 2.0.0.Behavior against 1.5.x:
to_arrow_readerno longer streams: the query runs to its end before the first batch. A table takes about 1.5x the relational call's peak memory, same time.preserve_insertion_order = falsethe rows come back in a different block order per call.CONNECTmode refuse before anything is taken, rows still fetchable.