Closed AristoDC closed 3 months ago
This issue has been automatically marked as stale because it has not had recent activity for 30 days. It will be closed in next 7 days if no further activity occurs.
This issue has been closed because it has not received response for too long time. You could reopen it if you encountered similar problems in the future.
@AristoDC how was this resolved
Search before asking
What happened
当表中存在唯一索引,但唯一索引中出现null值时 When a unique index exists in the table, but a null value appears in the unique index
org.apache.seatunnel.connectors.seatunnel.cdc.mysql.utils.MySqlUtils#skipReadAndSortSampleData |——Arrays.sort(resultsArray); #193
会出现NPE异常 This method will cause NPE exceptions
表格结构DDL -- auto-generated definition create table xx ( id bigint(11) not null primary key, out_biz_no varchar(128) null comment '业务单号', biz_type int null comment '业务数据类型',
) comment 'xx表' charset = utf8;
问题定位: identify the problem:
412行会根据唯一索引中可能为null值的biz_type赋值给splitColumn,导致最终按照biz_type进行拆分,引起后续的NPE
Row 412 will be assigned to splitColumn based on the biz_type that may be null in the unique index, resulting in eventual splitting based on biz_type, causing subsequent NPE.
SeaTunnel Version
2.3.4~2.3.5
SeaTunnel Config
Running Command
Error Exception
Zeta or Flink or Spark Version
No response
Java or Scala Version
java 1.8.0_391
Screenshots
Are you willing to submit PR?
Code of Conduct