Re: [PR] Read a numeric column's length as its total digits, fixes #8216Read a numeric column's length as its total digits, fixes #8216 (hop)
mattcasters closed pull request #8242: Read a numeric column's length as its total digits, fixes #8216Read a numeric column's length as its total digits, fixes #8216 URL: https://github.com/apache/hop/pull/8242 -- 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]
Re: [PR] Read a numeric column's length as its total digits, fixes #8216Read a numeric column's length as its total digits, fixes #8216 (hop)
mattcasters commented on PR #8242: URL: https://github.com/apache/hop/pull/8242#issuecomment-5515631591 The replacement is https://github.com/apache/hop/pull/8244 -- 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]
Re: [PR] Read a numeric column's length as its total digits, fixes #8216Read a numeric column's length as its total digits, fixes #8216 (hop)
mattcasters commented on PR #8242: URL: https://github.com/apache/hop/pull/8242#issuecomment-5515628645 Thanks for the investigation — the round-trip failure is real (#8216). This PR cannot land as written against current main. `numericLength()` is documented as **digits before the decimal** and dialect rules already depend on that (MySQL overscaled DOUBLE, PostgreSQL DOUBLE/NUMERIC, Oracle NUMBER(38)). Redefining it to JDBC precision would change those conditions. #8216 is fixed in mattcasters/hop#issue-8218 / the follow-up PR on apache/hop by: - keeping `numericLength()` as integer digits for rule conditions - storing JDBC precision as Hop Number length (`totalDigits()`) - changing PostgreSQL write from `NUMERIC(length + scale, scale)` to `NUMERIC(length, scale)` so it does not inflate once length is total digits again Please close this PR in favour of that one once it is up. -- 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]
[PR] Read a numeric column's length as its total digits, fixes #8216Read a numeric column's length as its total digits, fixes #8216 (hop)
fskorgen opened a new pull request, #8242: URL: https://github.com/apache/hop/pull/8242 numericLength() took the scale off the precision the database reports, so decimal(5,2) arrived as Hop length 3. Every getFieldDefinition writes a scaled column as DECIMAL(length, precision), and a length typed into a transform dialog means the same total — so the length read off a column matched neither. A table re-created from a read stopped round-tripping: decimal(24,15) becomes DECIMAL(9,15), which SQL Server refuses, and decimal(5,2) becomes DECIMAL(3,2), which is valid DDL that then rejects valid data. The subtraction is kept as integerDigits() for the two rules that test whether a declaration is possible at all, so no dialect rule changes behaviour. Oracle's two require scale <= 0, where it never applied. JdbcTypeMappingCharacterizationTest: 63 diverging lines become 16, and the live path now agrees with the legacy mapper on every numeric case. New MsSqlServerNumericRoundTripTest fails without this change with expected: but was: . Fixes [#8216](https://github.com/apache/hop/issues/8216) Thank you for your contribution! Follow this checklist to help us incorporate your contribution quickly and easily: - [ ] Run `mvn clean install apache-rat:check` to make sure basic checks pass. A more thorough check will be performed on your pull request automatically. - [ ] If you have a group of commits related to the same change, please squash your commits into one and force push your branch using `git rebase -i`. - [ ] Mention the appropriate issue in your description (for example: `addresses #123`), if applicable. To make clear that you license your contribution under the [Apache License Version 2.0, January 2004](http://www.apache.org/licenses/LICENSE-2.0) you have to acknowledge this by using the following check-box. - [ ] I hereby declare this contribution to be licensed under the [Apache License Version 2.0, January 2004](http://www.apache.org/licenses/LICENSE-2.0) - [ ] In any other case, please file an [Apache Individual Contributor License Agreement](https://www.apache.org/licenses/icla.pdf). -- 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]
