• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

plausible / ecto_ch / 377a7609bc1c29c0c3f6beb48e27cc2e4e4c2942
88%

Build:
DEFAULT BRANCH: master
Ran 05 May 2026 05:37PM UTC
Jobs 1
Files 12
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

05 May 2026 05:36PM UTC coverage: 87.98% (+0.05%) from 87.928%
377a7609bc1c29c0c3f6beb48e27cc2e4e4c2942

push

github

web-flow
Bound Decimal rendering to ClickHouse precision limits (#271)

The adapter previously emitted Decimal64(scale) for every Decimal parameter regardless of value size and rendered the coefficient with Decimal.to_string/2 verbatim. Both the inline literal path (expr/4) and the parameter type path (param_type/1) are now guarded by a shared decimal_precision_and_scale!/1 helper that:

- rejects non-finite values (NaN, Infinity) with ArgumentError
- rejects scale > 76 with ArgumentError
- rejects coefficients with more than 76 digits with ArgumentError
- rejects computed precision > 76 with ArgumentError

param_type/1 now emits Decimal(precision, scale) sized to the actual value (up to ClickHouse's Decimal256 ceiling of precision 76) instead of always Decimal64(scale). Rendering goes through a new decimal_to_string/1 helper that, when the upstream Decimal library exposes Decimal.to_string/3 with :max_digits, caps output at 77 digits and otherwise falls back to Decimal.to_string/2.

Behavioral change for callers: Decimal parameters and inlined Decimal literals that exceed ClickHouse's Decimal limits, or that are NaN or Infinity, now raise ArgumentError at render time instead of silently producing malformed SQL. No new public option or API surface is added.

Co-authored-by: Eric Meadows-Jönsson <eric.meadows.jonsson@gmail.com>

22 of 24 new or added lines in 1 file covered. (91.67%)

893 of 1015 relevant lines covered (87.98%)

662.26 hits per line

Uncovered Changes

Lines Coverage ∆ File
2
88.6
0.11% lib/ecto/adapters/clickhouse/connection.ex
Jobs
ID Job ID Ran Files Coverage
1 377a7609bc1c29c0c3f6beb48e27cc2e4e4c2942.1 05 May 2026 05:37PM UTC 12
87.98
GitHub Action Run
Source Files on build 377a7609bc1c29c0c3f6beb48e27cc2e4e4c2942
  • Tree
  • List 12
  • Changed 1
  • Source Changed 0
  • Coverage Changed 1
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • 377a7609 on github
  • Prev Build on master (#D6B4F83F...)
  • Next Build on master (#4A1C1B5C...)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc