Yanquan Lv created FLINK-37837:
----------------------------------

             Summary: Always Add create.table to include.schema.changes option
                 Key: FLINK-37837
                 URL: https://issues.apache.org/jira/browse/FLINK-37837
             Project: Flink
          Issue Type: Improvement
          Components: Flink CDC
    Affects Versions: cdc-3.4.0
            Reporter: Yanquan Lv


`[include.schema.changes|https://nightlies.apache.org/flink/flink-cdc-docs-master/docs/core-concept/schema-evolution/#options]`
 indicate the support SchemaChange types of pipeline.

Sometime user may only want to catch and process AddColumnEvent in their job, 
and the config of their yaml file may be written like:
sink:
  type: starrocks
  ......
  include.schema.changes: [add.column] 


However, this job will meet the following exception because CreateTableEvent 
was ignored:

Caused by: java.lang.IllegalStateException: Unable to coerce data record from 
third_data.table (schema: ......) to ods_test.route_table (schema: null)
at 
org.apache.flink.cdc.runtime.operators.schema.regular.SchemaOperator.lambda$handleDataChangeEvent$1(SchemaOperator.java:214)
 ~[?:?]

I believe that CreateTableEvent is the foundation for all our subsequent 
processing, so we should always add it to supported schema change types.



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

Reply via email to