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

plausible / ecto_ch
88%
master: 88%

Build:
Build:
LAST BUILD BRANCH: comment-column-option
DEFAULT BRANCH: master
Repo Added 14 Apr 2026 06:33PM UTC
Files 12
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

LAST BUILD ON BRANCH ruslandoga+conductor/apply-eric-patch
branch: ruslandoga+conductor/apply-eric-patch
CHANGE BRANCH
x
Reset
  • ruslandoga+conductor/apply-eric-patch
  • codex/experimental-transactions
  • comment-column-option
  • coveralls
  • decimals-decimals-decimals
  • fix-ch-types
  • improved-in-params
  • master
  • ruslandoga+conductor/scientific-decimals
  • ruslandoga-conductor/adapt-new-ch-readme

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

Relevant lines Covered
Build:
Build:
1015 RELEVANT LINES 893 COVERED LINES
662.32 HITS PER LINE
Source Files on ruslandoga+conductor/apply-eric-patch
  • Tree
  • List 12
  • Changed 1
  • Source Changed 0
  • Coverage Changed 1
Coverage ∆ File Lines Relevant Covered Missed Hits/Line

Recent builds

Builds Branch Commit Type Ran Committer Via Coverage
dc3ea20d... ruslandoga+conductor/apply-eric-patch 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 pa... Pull #271 05 May 2026 05:35PM UTC ruslandoga github
87.98
See All Builds (36)
  • Repo on GitHub
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