[
https://issues.apache.org/jira/browse/FLINK-38248?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18014037#comment-18014037
]
suhwan commented on FLINK-38248:
--------------------------------
I understand this issue. It seems like the fix will be in
[DorisMetadataApplier.java|https://github.com/apache/flink-cdc/blob/master/flink-cdc-connect/flink-cdc-pipeline-connectors/flink-cdc-pipeline-connector-doris/src/main/java/org/apache/flink/cdc/connectors/doris/sink/DorisMetadataApplier.java]
I'd be happy to take this on if you can assign it to me!
> The default value of '0000-00-00 00:00:00' for MySQL TIMESTAMP fields is not
> supported in downstream systems.
> -------------------------------------------------------------------------------------------------------------
>
> Key: FLINK-38248
> URL: https://issues.apache.org/jira/browse/FLINK-38248
> Project: Flink
> Issue Type: Improvement
> Components: Flink CDC
> Affects Versions: cdc-3.3.0, cdc-3.4.0
> Reporter: Yanquan Lv
> Priority: Major
>
> The default value of '0000-00-00 00:00:00' for MySQL TIMESTAMP fields is not
> supported in downstream systems like Doris & Paimon, we need to adjust this
> default value based on downstream systems.
> The current error stack is as follows:
> {code:java}
> Caused by:
> SchemaEvolveException{applyingEvent=CreateTableEvent{tableId=test.orders,
> schema=columns={order_id INT NOT NULL,order_date TIMESTAMP(0) NOT
> NULL,customer_name VARCHAR(255) NOT NULL,price DECIMAL(10, 5) NOT
> NULL,product_id INT NOT NULL,order_status BOOLEAN NOT NULL,ctime
> TIMESTAMP_LTZ(0) NOT NULL '0000-00-00 00:00:00',name VARCHAR(64) NOT NULL
> ''}, primaryKeys=order_id, options=()}, exceptionMessage='Failed to
> schemaChange, response: {"msg":"Error","code":1,"data":"Failed to execute
> sql: java.sql.SQLException: (conn=216) errCode = 2, detailMessage = date
> literal [0000-00-00 00:00:00] is invalid: Text '0000-00-00 00:00:00' could
> not be parsed: Invalid value for MonthOfYear (valid values 1 - 12):
> 0","count":0}',
> cause='org.apache.doris.flink.exception.DorisSchemaChangeException: Failed to
> schemaChange, response: {"msg":"Error","code":1,"data":"Failed to execute
> sql: java.sql.SQLException: (conn=216) errCode = 2, detailMessage = date
> literal [0000-00-00 00:00:00] is invalid: Text '0000-00-00 00:00:00' could
> not be parsed: Invalid value for MonthOfYear (valid values 1 - 12):
> 0","count":0}'}
> at
> org.apache.flink.cdc.connectors.doris.sink.DorisMetadataApplier.applyCreateTableEvent(DorisMetadataApplier.java:167)
> {code}
--
This message was sent by Atlassian Jira
(v8.20.10#820010)