SEPURI-SAI-KRISHNA commented on issue #13022: URL: https://github.com/apache/seatunnel/issues/13022#issuecomment-6488550828
@SEZ9 confirmed. Precision and scale are not taken from the stripped name; they come from the `COLUMN_SIZE` and `DECIMAL_DIGITS` columns of `DatabaseMetaData.getColumns`, which `getTable` already reads and passes to `convertDatabendType`. `normalizeTypeName` only builds the key for the switch. databend-jdbc 0.3.7 fills those two columns by parsing the same `TYPE_NAME` string (`DatabendRawType`). I ran the driver's parser on the strings Databend reports: | TYPE_NAME | COLUMN_SIZE | DECIMAL_DIGITS | | --- | --- | --- | | `decimal(10, 2)` | 10 | 2 | | `decimal(38, 0)` | 38 | 0 | | `decimal(76, 10)` | 76 | 10 | | `Nullable(decimal(10, 2))` | 10 | 2 | So the `DECIMAL` branch returns `DecimalType(10, 2)` for a `DECIMAL(10, 2)` column, not a default. The unit test asserts `new DecimalType(10, 2)` and `new DecimalType(38, 0)`, and `DecimalType.equals` compares precision and scale, so a wrong precision or scale fails it. -- 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]
