Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Aling/test pandas perf #1990

Draft
wants to merge 9 commits into
base: main
Choose a base branch
from
Draft
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
test
sfc-gh-aling committed Jul 2, 2024
commit fc0130f7a6bdc8d219d2b2d54980a423457c5db6
9 changes: 1 addition & 8 deletions src/snowflake/connector/result_set.py
Original file line number Diff line number Diff line change
@@ -64,20 +64,13 @@ def result_set_iterator(

with ThreadPoolExecutor(prefetch_thread_num) as pool:
logger.debug("beginning to schedule result batch downloads")
for _ in range(min(prefetch_thread_num, len(unfetched_batches))):
logger.debug(
f"queuing download of result batch id: {unfetched_batches[0].id}"
)
unconsumed_batches.append(
pool.submit(unfetched_batches.popleft().create_iter, **kw)
)
yield from first_batch_iter
while unfetched_batches:
logger.debug(
f"queuing download of result batch id: {unfetched_batches[0].id}"
)
future = pool.submit(unfetched_batches.popleft().create_iter, **kw)
unconsumed_batches.append(future)
yield from first_batch_iter
_, _ = wait(unconsumed_batches, return_when=ALL_COMPLETED)
i = 1
while unconsumed_batches: