Search before asking
Paimon version
master @ ec1d8ee
Compute Engine
Flink (Postgres CDC — postgres_sync_table / postgres_sync_database)
Minimal reproduce step
Sync a Postgres table containing a numeric(50, 2) column (Postgres allows precision up to 1000).
PostgresTypeUtils.toDataType() (paimon-flink-cdc .../action/cdc/postgres/PostgresTypeUtils.java line 125-136) passes the JDBC COLUMN_SIZE precision straight into DataTypes.DECIMAL(precision, scale) with no upper-bound guard.
What doesn't meet your expectations?
Because Paimon DecimalType.MAX_PRECISION is 38, DataTypes.DECIMAL(50, 2) throws IllegalArgumentException("Decimal precision must be between 1 and 38"), so schema derivation fails and the whole CDC sink never starts. The sibling MySqlTypeUtils.toDataType() (line 259-261, same JdbcToPaimonTypeVisitor SPI) already guards this with length <= 38 ? DECIMAL : STRING; Postgres should behave the same and fall back to STRING (ARRAY(STRING) for _numeric).
Anything else?
N/A
Are you willing to submit a PR?
Search before asking
Paimon version
master @ ec1d8ee
Compute Engine
Flink (Postgres CDC — postgres_sync_table / postgres_sync_database)
Minimal reproduce step
Sync a Postgres table containing a
numeric(50, 2)column (Postgres allows precision up to 1000).PostgresTypeUtils.toDataType()(paimon-flink-cdc.../action/cdc/postgres/PostgresTypeUtils.javaline 125-136) passes the JDBCCOLUMN_SIZEprecision straight intoDataTypes.DECIMAL(precision, scale)with no upper-bound guard.What doesn't meet your expectations?
Because Paimon
DecimalType.MAX_PRECISIONis 38,DataTypes.DECIMAL(50, 2)throwsIllegalArgumentException("Decimal precision must be between 1 and 38"), so schema derivation fails and the whole CDC sink never starts. The siblingMySqlTypeUtils.toDataType()(line 259-261, sameJdbcToPaimonTypeVisitorSPI) already guards this withlength <= 38 ? DECIMAL : STRING; Postgres should behave the same and fall back to STRING (ARRAY(STRING) for_numeric).Anything else?
N/A
Are you willing to submit a PR?