Skip to content

feat: implement Connection::get_info() (#9) - #69

Open
ylw510 wants to merge 5 commits into
ClickHouse:mainfrom
ylw510:feat/get-info
Open

feat: implement Connection::get_info() (#9)#69
ylw510 wants to merge 5 commits into
ClickHouse:mainfrom
ylw510:feat/get-info

Conversation

@ylw510

@ylw510 ylw510 commented Aug 7, 2026

Copy link
Copy Markdown

Summary

  • Implement Connection::get_info() for ADBC driver/vendor metadata (closes Implement Connection::get_info() #9).
  • Return VendorVersion via SELECT version(), plus driver name/version/Arrow/ADBC info; omit unsupported Substrait / vendor Arrow version codes.
  • Resolve DriverArrowVersion at build time with cargo_metadata (from the resolved arrow-array package) instead of a hardcoded string.

ylw510 and others added 2 commits August 7, 2026 02:50
Expose driver/vendor metadata (including server version via SELECT version())
so ADBC clients can discover ClickHouse capabilities.

Co-authored-by: Cursor <cursoragent@cursor.com>
Avoid hardcoding the Arrow crate version; emit it from build.rs using
cargo metadata.

Co-authored-by: Cursor <cursoragent@cursor.com>
ylw510 added 2 commits August 7, 2026 16:02
ClickHouse Arrow output no longer includes PARQUET:logical_type on UUID
columns, which broke binary_strings_round_trip under assert_eq!.
Comment thread build.rs
Comment on lines +10 to +13
let metadata = MetadataCommand::new()
.manifest_path("Cargo.toml")
.exec()
.expect("failed to run cargo metadata");

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I'm not a huge fan of this:

  • Hard dependency on Cargo. In my experience there are users out there employing non-Cargo build systems; they're generally happy enough to take on the dependency management but invoking Cargo directly tends to complicate things.
  • The build script itself is an extra compilation target, adding overhead to clean builds.
  • This would be trivial for Arrow to add themselves as, e.g. const VERSION_STRING: &str = env!("CARGO_PACKAGE_VERSION") and it would be useful for everyone implementing Rust ADBC drivers.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Totally aggree.
I create a pr in: apache/arrow-rs#10957.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

It's really neat of them to merge that so quickly but we can't really use it until the next release anyway. We'd also have to upgrade arrow-* to 59.4.0, so that would have to wait until we start on 0.2.0 (using a version range is unfortunately a non-starter: #68 (comment)).

That kind of leaves us only a couple options:

  • Merge as-is with a FIXME comment, or:
  • Leave this field unpopulated for now (also with a FIXME comment).

If this field is really needed I suppose we could merge it as-is, but I don't think any field is strictly required in the interface contract here, so I think I'd rather just omit it.

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.

Implement Connection::get_info()

2 participants