You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The problem of testing applications working with data encoding lays in data dimension and not in scenario one. Having a good line coverage for encode is not so important than running tests with wide range of data. When encoder works it usually applies rules to data to transform it into one of the forms (encoding or decoding). While rules can be simple they might not fit all input data. Line coverage shows only partial success and sometime it is less than 50% of real world. Most easy option for solving the problem is using biggest possible set of data in tests.
This PR adds two things to client-v2 project:
Test support code to generate datasets for different data types and create metadata (like validation rules) for tests later
Tests that use this new datasets to verify work of implemented readers
This PR is too large for Bugbot to review. It changes 142,868 lines and 2,121,201 characters. Split the change into smaller pull requests to get a review.
AI review gate — Human approval in place of AI review
Approved on the head commit by joe-clickhouse (write access, not the author), standing in for the AI review:
Cursor Bugbot has not posted a review on this commit yet.
What to do:
Nothing to do yet if the review is running. The gate turns green when it finishes clean.
No review showing up? Post bugbot run as a new top-level PR comment. If that does nothing, Bugbot is probably not enabled for this repository: ask a repository administrator.
Evaluated at a31d1b15. This required workflow does not re-run on its own once the AI review later concludes — check the Cursor Bugbot check on this commit directly for its current state.
Summary
Adds a data-centric testing framework for client-v2 readers/writers: new test-support code in clickhouse-client test sources (DataTypeGenerator(s), GenerateTestDataSet, TestDataSet, ~3k lines) that generates per-type datasets with validation metadata, ~100 generated TSV dataset resources (one file alone is 65,536 lines), a generate-datasets.sh script, and new dataset-driven reader/writer tests in client-v2 (datatypes/readers/*, datatypes/writers/*). The motivation (per the PR body; no linked issue) is that line coverage poorly measures encoder/decoder correctness, so tests should instead exercise wide ranges of real-world data. No production (src/main) code is changed; total deletions are 1 line (a small BaseIntegrationTest helper refactor adding getClusterName()).
What this impacts
Test code and resources only: clickhouse-client test tree (generators + TSV datasets) and client-v2 test tree (new reader/writer data-set tests, additions to existing format-reader tests).
Build/CI test runtime and repo size: ~146k added lines of test data; a new clickhouse-logo.png binary added to test resources.
Developer tooling: new clickhouse-client/scripts/generate-datasets.sh, README documentation, and a new .cursor/skills/write-cluster-compatible-tests/SKILL.md agent-instruction file.
Concerns
High rule fired: Large diff — 100+ files and ~146k added lines (several thousand lines of new test Java alone, far beyond the 400-LOC threshold). Per rubric, request a split (e.g., framework/support code, generated datasets, and per-reader test suites as separate PRs) even though the change is test-only.
No linked issue for a significant, non-trivial change — context comes only from the PR body.
Mild intent drift: body says the PR adds code "to client-v2 project", but the bulk of the generator framework and all datasets land in clickhouse-client test sources; also bundles unrelated artifacts (.cursor skill file, BaseIntegrationTest cluster-name refactor, a binary PNG resource) that reviewers should inspect separately.
Generated TSV datasets are committed rather than produced at build time; reviewers should confirm the generation script output is reproducible and the repo-size cost is intended.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The problem of testing applications working with data encoding lays in data dimension and not in scenario one. Having a good line coverage for encode is not so important than running tests with wide range of data. When encoder works it usually applies rules to data to transform it into one of the forms (encoding or decoding). While rules can be simple they might not fit all input data. Line coverage shows only partial success and sometime it is less than 50% of real world. Most easy option for solving the problem is using biggest possible set of data in tests.
This PR adds two things to client-v2 project: