-
-
Notifications
You must be signed in to change notification settings - Fork 214
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
Add parameter chunk_size and default as 1 #315
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And of course test is required for this feature. See existing tests for execute_iter
.
clickhouse_driver/client.py
Outdated
@@ -376,11 +377,11 @@ def execute_iter( | |||
""" | |||
|
|||
with self.disconnect_on_error(query, settings): | |||
return self.iter_process_ordinary_query( | |||
return chunks(self.iter_process_ordinary_query( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If chunk_size is 1 it should be no additional overhead
rv = self.iter_process_ordinary_query(...)
return chunks(rv, chunk_size) if chunk_size > 1 else rv
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, it's much better.
I am sorry, but I have no idea for testing it. May I use docker images that contain clickhouse and use Class tests.test_blocks.IteratorTestCase? I am a flashman as a contributor. |
Quite simple test for emitting You can also run tests locally: https://clickhouse-driver.readthedocs.io/en/latest/development.html |
Oh, I see. I overlook development and look through How to Contribute. |
Hi, i using https://raw.githubusercontent.com/mymarilyn/clickhouse-driver/master/tests/docker-compose.yml. I replace "$ORG" to yandex and "$VERSION" to 21.12.3.32. When it started, I run |
And I also reference https://clickhouse-driver.readthedocs.io/en/latest/development.html and try it in docker, but I got the same Error. For test clickhouse, I user |
Okay. You can use github actions in your forked repo: https://clickhouse-driver.readthedocs.io/en/latest/development.html#github-actions-in-forked-repository |
Good job! |
Thanks for you! I learn a lot of skills about contribution. |
No description provided.