Skip to content

Conversation

@slvrtrn
Copy link
Contributor

@slvrtrn slvrtrn commented Nov 6, 2025

Summary

All schema validators now emit clickhouse::error::Error::SchemaMismatch instead of a panic in case of validation errors.

Closes #294. Duplicates: #335, #341.

Checklist

  • 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
  • Fix the last panic in Drop

@slvrtrn
Copy link
Contributor Author

slvrtrn commented Nov 6, 2025

➜  clickhouse-rs git:(rbwnat-replace-panics-with-err) cargo bench --bench mocked_select -- --baseline main
    Finished `bench` profile [optimized + debuginfo] target(s) in 0.06s
     Running benches/mocked_select.rs (target/release/deps/mocked_select-1f28991e1973b432)
Gnuplot not found, using plotters backend
rows/validation=off/uncompressed
                        time:   [8.4485 ns 8.4818 ns 8.5126 ns]
                        thrpt:  [2.6257 GiB/s 2.6353 GiB/s 2.6456 GiB/s]
                 change:
                        time:   [+1.8405% +3.3242% +4.6321%] (p = 0.00 < 0.05)
                        thrpt:  [−4.4270% −3.2173% −1.8073%]
                        Performance has regressed.
Found 6 outliers among 100 measurements (6.00%)
  1 (1.00%) low mild
  3 (3.00%) high mild
  2 (2.00%) high severe
rows/validation=off/lz4 time:   [9.7708 ns 9.8126 ns 9.8576 ns]
                        thrpt:  [2.2675 GiB/s 2.2779 GiB/s 2.2876 GiB/s]
                 change:
                        time:   [−0.6857% +1.1440% +2.7511%] (p = 0.21 > 0.05)
                        thrpt:  [−2.6775% −1.1310% +0.6904%]
                        No change in performance detected.
Found 5 outliers among 100 measurements (5.00%)
  2 (2.00%) high mild
  3 (3.00%) high severe
rows/validation=on/uncompressed
                        time:   [16.104 ns 16.135 ns 16.172 ns]
                        thrpt:  [1.3821 GiB/s 1.3853 GiB/s 1.3880 GiB/s]
                 change:
                        time:   [+6.2932% +7.9043% +9.3253%] (p = 0.00 < 0.05)
                        thrpt:  [−8.5298% −7.3253% −5.9206%]
                        Performance has regressed.
Found 16 outliers among 100 measurements (16.00%)
  1 (1.00%) low mild
  4 (4.00%) high mild
  11 (11.00%) high severe
rows/validation=on/lz4  time:   [17.297 ns 17.359 ns 17.428 ns]
                        thrpt:  [1.2825 GiB/s 1.2876 GiB/s 1.2922 GiB/s]
                 change:
                        time:   [+4.5881% +7.2624% +9.7421%] (p = 0.00 < 0.05)
                        thrpt:  [−8.8773% −6.7707% −4.3868%]
                        Performance has regressed.
Found 5 outliers among 100 measurements (5.00%)
  1 (1.00%) high mild
  4 (4.00%) high severe

mbytes/uncompressed     time:   [69.668 µs 71.747 µs 73.604 µs]
                        thrpt:  [13.268 GiB/s 13.611 GiB/s 14.017 GiB/s]
                 change:
                        time:   [+0.6238% +5.2174% +9.6674%] (p = 0.02 < 0.05)
                        thrpt:  [−8.8152% −4.9587% −0.6199%]
                        Change within noise threshold.
mbytes/lz4              time:   [101.21 µs 101.70 µs 102.25 µs]
                        thrpt:  [9.5505 GiB/s 9.6027 GiB/s 9.6485 GiB/s]
                 change:
                        time:   [−1.8262% +0.4842% +2.5740%] (p = 0.71 > 0.05)
                        thrpt:  [−2.5095% −0.4819% +1.8601%]
                        No change in performance detected.
Found 8 outliers among 100 measurements (8.00%)
  4 (4.00%) high mild
  4 (4.00%) high severe

@slvrtrn slvrtrn marked this pull request as ready for review November 6, 2025 18:02
@slvrtrn slvrtrn requested a review from abonander November 6, 2025 18:02
@slvrtrn slvrtrn merged commit 01531b2 into main Nov 6, 2025
6 checks passed
@slvrtrn slvrtrn deleted the rbwnat-replace-panics-with-err branch November 6, 2025 18:28
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.

Change RBWNAT type mismatch from panic to an error

3 participants