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

Binding arguments for AsyncInsert interface #1052

Merged
merged 4 commits into from
Aug 10, 2023
Merged

Conversation

mdonkers
Copy link
Contributor

@mdonkers mdonkers commented Aug 1, 2023

Summary

Proposal for #896, allowing argument replacement in INSERT query strings. To help constructing these for AsyncInserts.

Also adds parsing OrderedMap for binding as was done for other arguments here: #763

Includes tests, but not yet a changelog. First looking for feedback and will then cleanup where needed.

Checklist

Delete items not relevant to your PR:

@jkaflik jkaflik self-requested a review August 2, 2023 10:20
@jkaflik
Copy link
Contributor

jkaflik commented Aug 2, 2023

Thanks, @mdonkers
I will review this today/tomorrow.

Copy link
Contributor

@jkaflik jkaflik left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you. LGTM. Can we please add an explicit map test/example for both protos?

@mdonkers
Copy link
Contributor Author

mdonkers commented Aug 8, 2023

Thank you. LGTM. Can we please add an explicit map test/example for both protos?

The change for Async inserts for both protos are unrelated to the OrderedMap formatting. That one only applies to the string replacement / formatting. For which I added a test (see the .format test).

The Async insert changes are tested via the examples. Which I changed also to have (?, ?, ?) instead of fmt.Sprintf(...) to show the replacement.

Perhaps if clearer I can also split up in two separate PRs. Would be after my holiday then though :-)

@jkaflik jkaflik changed the title Proposal to allow binding arguments to AsyncInserts Binding arguments for AsyncInsert interface Aug 8, 2023
@jkaflik
Copy link
Contributor

jkaflik commented Aug 8, 2023

@mdonkers, right, it makes sense now. Would be good to have it as separate PRs, but let's push it this way.

@jkaflik jkaflik merged commit 4a2e8ff into ClickHouse:main Aug 10, 2023
12 of 14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants