The GitHub Actions job "CI" on 
grails-core.git/fix/gorm-numeric-column-dialect-precision has failed.
Run started by GitHub user borinquenkid (triggered by borinquenkid).

Head commit for run:
43c6d17dcface0f6b6a9bca35ce45c8fa3f64d81 / Walter Duque de Estrada 
<[email protected]>
fix(grails-data-hibernate7): stop conflating decimal and bit precision for 
numeric columns

NumericColumnConstraintsBinder applied one hand-rolled default precision (15,
126 for Oracle) to every Number subtype when no explicit precision/constraints
were configured. That conflates two different meanings of "precision": NUMERIC/
DECIMAL (BigDecimal/BigInteger) precision is a decimal digit count, but FLOAT/
DOUBLE precision is a bit count (IEEE-754) - and Hibernate converts whatever
decimal-digit value it's given into bits when rendering float(n) DDL. Feeding a
decimal-oriented default (Hibernate's own 19/38, or naively a dialect's already-
bit-valued getFloatPrecision()/getDoublePrecision()) overflows H2/PostgreSQL's
53-bit ceiling and produces DDL those dialects reject - silently, since
hibernate.hbm2ddl.auto only logs the failure rather than throwing, so the table
is never created.

Float/Double now leave precision unset, letting Hibernate fall back to the
dialect's own correct float/double DDL type directly. BigDecimal/BigInteger
default from Dialect.getDefaultDecimalPrecision(), which every dialect already
computes correctly - removing the need for the Oracle-specific special case.

Adds GormNumericTypeColumnPrecisionSpec (H2, no container) covering the default-
precision behavior for all three type families, and 
GormNumericTypeColumnIntegrationSpec
(Postgres/MySQL/MariaDB via Testcontainers, Oracle excluded per the existing
RLikeHibernate7Spec precedent) confirming valid, creatable DDL across dialects.
Reproduced the original bug directly: reverting to Hibernate's own
Size.DEFAULT_PRECISION (19) produces `float(64)` DDL, which H2 rejects with
"Precision (64) must be between 1 and 53 inclusive".

Co-Authored-By: Claude Sonnet 5 <[email protected]>

Report URL: https://github.com/apache/grails-core/actions/runs/29763938517

With regards,
GitHub Actions via GitBox

Reply via email to