-
Notifications
You must be signed in to change notification settings - Fork 5
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
added option to disable flatten nested #63
added option to disable flatten nested #63
Conversation
901caee
to
01a722b
Compare
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.
@tmahany419 hello, thanks for the PR!
Could you also please:
- Add a changelog fragment
- Add a test task to https://github.com/ansible-collections/community.clickhouse/blob/main/tests/integration/targets/clickhouse_client/tasks/initial.yml
thanks
Co-authored-by: Andrew Klychkov <aaklychkov@mail.ru>
Co-authored-by: Andrew Klychkov <aaklychkov@mail.ru>
Co-authored-by: Andrew Klychkov <aaklychkov@mail.ru>
@Andersson007 Thank you for the feedback! I committed the changes you proposed. I've made unit test and it works against a local clickhouse db. I added it to the file you linked in the branch I am working on. Is there a way to test it before updating the PR? |
@tmahany419 thanks! |
@tmahany419 you still need to make CI green before we can consider merging the PR, try to start with merging my suggesting above, maybe it'll fix some failures |
7b07b49
to
2b2b2ee
Compare
@Andersson007 I merged the change you mentioned. I've also added a test as requested. |
@tmahany419 I don't see the tests, maybe you forgot to add a change to your commit? |
Co-authored-by: Andrew Klychkov <aaklychkov@mail.ru>
2b2b2ee
to
6a872a1
Compare
@Andersson007 I updated the wrong branch yesterday, it should be there now. |
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.
@tmahany419 there's still unit tests failures but I'll fix them myself.
Thanks a lot for the contribution!
You're welcome in future for more contributions/feedback!
@Andersson007 Maybe it is more correct to implement the transfer of not a specific parameter, but the desired list of parameters? |
@aleksvagachev good catch, something like the following
? |
@Andersson007 Yes, something similar. Shall we try to implement this in 1.0.0? |
@aleksvagachev as this change hasn't been released yet, we can do it right now. Thoughts? Would you like to take it? |
@Andersson007 I'll try to do it, but not before Monday |
SUMMARY
I could not find a way to run multiple queries from the same context using this module. There's no way to create a table with
flatten_nested
disabled without running multiple queries. This PR adds a field calledflatten_nested
forclickhouse_client
that sets this setting before running the query.ISSUE TYPE
COMPONENT NAME
Flatten Nested
ADDITIONAL INFORMATION
This is clickhouse's document explaining options for nested fields: https://clickhouse.com/docs/en/sql-reference/data-types/nested-data-structures/nested. The behavior with
flatten_nested
enabled and disabled is explained there. The only way to disable it is by runningset flatten_nested=0;
before creating a table.