Skip to content

[Bug] PostgreSQL time(n) with n<=3 incorrectly mapped to INT in PostgresRecordParser #8604

Description

@thswlsqls

Search before asking

  • I searched in the issues and found nothing similar.

Paimon version
master @ ec1d8ee / 2.0-SNAPSHOT

Compute Engine
Flink (CDC ingestion — PostgreSQL sync)

Minimal reproduce step
Run postgres_sync_table/postgres_sync_database on a table with a time(n) column where n <= 3. Debezium's default adaptive mode encodes it as the io.debezium.time.Time logical type (int32, millis-of-day). PostgresRecordParser.extractFieldType() (paimon-flink-cdc .../postgres/PostgresRecordParser.java line 159-163) handles only io.debezium.time.Date in the int32 branch and falls through to INT().

What doesn't meet your expectations?
Expected: the column maps to TIME(3), matching the JDBC bootstrap path PostgresTypeUtils.toDataType() which maps time to TIME(scale). Actual: it maps to INT, so the runtime and bootstrap schema paths disagree and the sync crashes on the first record with "Cannot convert field from TIME(3) to INT", looping on restart.

Anything else?
Incomplete-fix counterpart of merged PR #8222, which fixed the symmetric int64 Timestamp case. The int64 branch already maps Timestamp/MicroTimestamp/MicroTime; time(4..6) (MicroTime) is already handled.

Are you willing to submit a PR?

  • I'm willing to submit a PR!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions