You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hop.apache.org by "sramazzina (via GitHub)" <gi...@apache.org> on 2026/07/16 20:39:45 UTC
[PR] Fix #6472: map SQLite column types by affinity, not driver JDBC type (hop)
sramazzina opened a new pull request, #7548:
URL: https://github.com/apache/hop/pull/7548
The SQLite JDBC driver reports columns whose declared type carries a size with a space before the parenthesis (e.g. "TEXT (50)") as Types.NUMERIC. The generic ValueMetaBase mapper then turns those into BigNumber/Integer, so the Database Explorer showed TEXT (50) as BigNumber instead of String (and, by the same mechanism, INTEGER (20) and REAL (10) were mistyped).
Override customizeValueFromSqlType in SqliteDatabaseMeta to re-derive the Hop value type from SQLite's name-based type affinity (datatype3.html section 3.1), which the driver still reports correctly, correcting only the columns the generic mapper got wrong:
- CHAR/CLOB/TEXT -> String
- INT -> Integer
- REAL/FLOA/DOUB -> Number
- NUMERIC/BLOB -> unchanged (generic mapping kept)
Add unit tests for the affinity mapping plus an end-to-end test that drives the real SQLite JDBC driver with the exact DDL from the report.
Fix #6472
------------------------
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: issues-unsubscribe@hop.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Fix #6472: map SQLite column types by affinity, not driver JDBC type (hop)
Posted by "sramazzina (via GitHub)" <gi...@apache.org>.
sramazzina closed pull request #7548: Fix #6472: map SQLite column types by affinity, not driver JDBC type
URL: https://github.com/apache/hop/pull/7548
--
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: issues-unsubscribe@hop.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org