mattcasters commented on PR #8468:
URL: https://github.com/apache/hop/pull/8468#issuecomment-5750204553

   Thanks for the thorough review, @bamaer! All suggested changes have been 
addressed in the latest commit:
   
   - **Clean `calculateDefinition` signature:** Dropped the unused `sqlType` 
and `autoIncrement` parameters from `DatabaseColumn.calculateDefinition(...)`, 
leaving a 4-arg signature `(nativeTypeName, precision, scale, length)`. 
`autoIncrement` tracking on `DatabaseColumn` and 
`setOriginalAutoIncrement(...)` in `StandardJdbcTypeMapper` are kept intact.
   - **Decimal/Numeric precision:** Removed the arbitrary `<= 38` limit when 
`scale == 0` within precision 1000, allowing PostgreSQL `numeric(50)` to render 
as `numeric(50)`.
   - **Bit type formatting:** Sized bit types are now formatted properly — bare 
`bit` is kept when $size \le 1$, and sized `bit(n)` is rendered when $size > 1$ 
(e.g. MySQL `bit(8)` or PostgreSQL `varbit(16)`).
   - **Condition cleanups:**
     - Dropped redundant `size < 10000000` condition (`CLOB_LENGTH` is 
9,999,999).
     - Removed duplicate `DATE` check in branch 1 (already covered by 
`isUnsizedType`).
     - Simplified empty type name fallback in `calculateDefinition(IValueMeta)` 
to `Const.NVL(valueMeta.getTypeDesc(), "")`.
     - Simplified `fillColumns` to read directly from the pre-populated 
`definitions` map without redundant fallback recalculation.
   - **Catalog & Schema scoping in `readColumnDefinitions`:** Added row-level 
checks on `TABLE_NAME`, `TABLE_CAT`, and `TABLE_SCHEM` from `getColumns()` to 
prevent cross-schema contamination or collisions when drivers return 
multi-schema results under null schema patterns.
   - **Unit & Integration tests:**
     - Added tests in `DatabaseColumnTest` for sized bit types (`bit(8)`, 
`varbit(16)`) and `numeric(50)`.
     - Added integration tests in `DatabaseTableInfoTabTest` driving a 
table/schema name containing `_` and `%` wildcards through 
`loadColumnDefinitions`, as well as validating result set filtering on matching 
table and schema names.
   


-- 
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