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

plausible / ecto_ch / dc3ea20d3102b19034350a96ea40c8c599bb7624-PR-271
88%
master: 88%

Build:
Build:
LAST BUILD BRANCH: comment-column-option
DEFAULT BRANCH: master
Ran 05 May 2026 05:35PM 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:33PM UTC coverage: 87.98% (+0.05%) from 87.928%
dc3ea20d3102b19034350a96ea40c8c599bb7624-PR-271

Pull #271

github

ruslandoga
Bound Decimal rendering to ClickHouse precision limits

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.
Pull Request #271: Bound Decimal rendering to ClickHouse precision limits

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

893 of 1015 relevant lines covered (87.98%)

662.32 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 dc3ea20d3102b19034350a96ea40c8c599bb7624-PR-271.1 05 May 2026 05:35PM UTC 12
87.98
GitHub Action Run
Source Files on build dc3ea20d3102b19034350a96ea40c8c599bb7624-PR-271
  • Tree
  • List 12
  • Changed 1
  • Source Changed 0
  • Coverage Changed 1
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Pull Request #271
  • PR Base - master (#D6B4F83F...)
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