Skip to content

feat: implement param binding for binary strings and UUIDs#61

Open
abonander wants to merge 7 commits into
mainfrom
ab/binary+uuid
Open

feat: implement param binding for binary strings and UUIDs#61
abonander wants to merge 7 commits into
mainfrom
ab/binary+uuid

Conversation

@abonander

@abonander abonander commented Jun 17, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Added support for binding binary strings as parameters.
  • Added support for binding the arrow.uuid extension type as a literal UUID.
  • Added clickhouse.client.output_string_as_string option to map to output_format_arrow_string_as_string setting.

fixes #3
fixes #32

Checklist

Delete items not relevant to your PR:

  • Unit and integration tests covering the common scenarios were added
  • A human-readable description of the changes was provided so that we can include it in CHANGELOG later

@abonander abonander marked this pull request as ready for review June 23, 2026 00:58
@abonander abonander requested a review from koletzilla as a code owner June 23, 2026 00:58
@abonander abonander changed the title WIP feat: implement param binding for binary strings and UUIDs feat: implement param binding for binary strings and UUIDs Jun 23, 2026
@abonander abonander requested a review from Copilot June 23, 2026 00:58

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR extends the ClickHouse ADBC driver’s parameter binding and Arrow schema interoperability by adding support for binary string parameters and UUID (via the arrow.uuid extension type), and by exposing a driver option that maps to ClickHouse’s output_format_arrow_string_as_string setting.

Changes:

  • Bind Arrow Binary/LargeBinary/FixedSizeBinary/BinaryView parameters as ClickHouse byte strings via serde_bytes.
  • Recognize FixedSizeBinary(16) + arrow.uuid metadata and bind as ClickHouse UUID parameters.
  • Add clickhouse.client.output_string_as_string option and an integration test covering UUID + binary round-trips.

Reviewed changes

Copilot reviewed 6 out of 7 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
src/statement.rs Adds binary/UUID parameter binding logic and uses ClickHouse settings for query/session IDs and output format.
src/options.rs Introduces OUTPUT_STRING_AS_STRING option and as_setting constants for server-side setting names.
src/lib.rs Switches to set_setting and wires connection-level options to server settings (contains a session-id mapping bug).
tests/it/params.rs Adds integration coverage for UUID + binary string parameter binding and round-trip output.
tests/it/main.rs Registers the new params integration test module.
Cargo.toml / Cargo.lock Adds serde_bytes and uuid dependencies required for new binding behavior.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/lib.rs
Comment thread src/lib.rs
Comment thread src/lib.rs Outdated
Comment thread src/statement.rs

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 6 out of 7 changed files in this pull request and generated 3 comments.

Comment thread src/lib.rs
Comment thread src/lib.rs Outdated
Comment thread src/statement.rs Outdated
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support UUID type (requires upstream support) Support binding binary strings

2 participants