Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
wudi committed Nov 30, 2023
1 parent 9e62978 commit c41806a
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 9 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
// Licensed to the Apache Software Foundation (ASF) under one
// or more contributor license agreements. See the NOTICE file
// distributed with this work for additional information
// regarding copyright ownership. The ASF licenses this file
// to you under the Apache License, Version 2.0 (the
// "License"); you may not use this file except in compliance
// with the License. You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing,
// software distributed under the License is distributed on an
// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
// KIND, either express or implied. See the License for the
// specific language governing permissions and limitations
// under the License.

package org.apache.doris.flink.sink.writer;

public enum EventType {
ALTER,
CREATE
}
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
import org.apache.doris.flink.sink.schema.SchemaChangeHelper;
import org.apache.doris.flink.sink.schema.SchemaChangeHelper.DDLSchema;
import org.apache.doris.flink.sink.schema.SchemaChangeManager;
import org.apache.doris.flink.sink.writer.EventType;
import org.apache.doris.flink.tools.cdc.SourceConnector;
import org.apache.doris.flink.tools.cdc.SourceSchema;
import org.apache.doris.flink.tools.cdc.mysql.MysqlType;
Expand Down Expand Up @@ -279,9 +280,6 @@ public List<String> extractDDLList(JsonNode record) throws IOException{
if (Objects.isNull(tableChange) || Objects.isNull(ddl)) {
return null;
}
if(!EventType.ALTER.equals(extractEventType(record))){
return null;
}

JsonNode columns = tableChange.get("table").get("columns");
if (firstSchemaChange) {
Expand Down Expand Up @@ -714,10 +712,4 @@ private String handleType(String type) {
return type;

}

enum EventType{
ALTER,
CREATE
}

}

0 comments on commit c41806a

Please sign in to comment.