fskorgen commented on issue #8216:
URL: https://github.com/apache/hop/issues/8216#issuecomment-5510820843

   Re-verified against main at 2f40c42157 (2026-09-02) — still reproduces, but 
the subtraction has moved to StandardJdbcTypeMapper.numericLength() (#8017, 
#8175), so the Database.java:2700 reference is 2.19-only.
   
   A quieter manifestation than the ones above: decimal(5,2) reads as length 3 
and is written back as DECIMAL(3,2), which is valid DDL. The table is created, 
then the insert fails on data the source held fine — BatchUpdateException: One 
or more values is out of range of values for the decimal SQL Server data type. 
Observed on SQL Server: source decimal(5,2) holding rates up to 25.00, 
re-created column holds 9.99. Columns with scale = 0 are unaffected, which is a 
useful signature.
   
   One clarification: PostgreSQL's NUMERIC(length + precision, precision) 
predates 2.19 by years, so the new meaning followed PostgreSQL, not the other 
way round. Either way PostgreSQL ends up the one dialect on the other side of 
length — probably its own issue.
   
   A PR follows: it restores the old meaning and keeps the subtraction as 
integerDigits() for the two rules that test whether a declaration is possible 
at all, so no dialect rule changes behaviour.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to