Mao Jiayi created FLINK-40130:
---------------------------------

             Summary: Fix missing primary key type compatibility check of 
Paimon sink
                 Key: FLINK-40130
                 URL: https://issues.apache.org/jira/browse/FLINK-40130
             Project: Flink
          Issue Type: Bug
          Components: Flink CDC
            Reporter: Mao Jiayi


When writing to an existing Paimon table, the Paimon sink may continue with 
record coercion even if the upstream primary key column type is incompatible 
with the primary key column type of the existing Paimon table.

The issue happens in {*}{{BucketAssignOperator}}{*}. The current implementation 
compares the upstream schema with the Paimon physical table schema and attempts 
to coerce records when the schemas are different. However, it does not 
explicitly validate whether primary key columns are type-compatible before 
coercing records.

This issue may not be exposed when the primary key types are identical or 
safely compatible, but it can fail or behave unexpectedly when the existing 
Paimon table has a primary key type such as *{{INT}}* while the upstream schema 
provides the same primary key column as {*}{{STRING}}{*}. In such cases, the 
sink should reject the incompatible primary key type early with a clear error 
instead of continuing into the record conversion path.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to