private static AlterOperation parseAlterOperation(Alter statement,
            Map<String, Integer> sqlType, boolean isFirst) {

        List<AlterColumn> alterColumns = new ArrayList<>();
        statement.getAlterExpressions().forEach(alterExpression -> {
            switch (alterExpression.getOperation()) {
                case DROP:
                    if (alterExpression.getConstraintName() != null) {
                        alterColumns.add(new AlterColumn(AlterType.DROP_CONSTRAINT,
                                new Column(reformatName(alterExpression.getConstraintName()))));
                        break;
                    }
                    alterColumns.add(new AlterColumn(AlterType.DROP_COLUMN,
                            null,
                            Column.builder().name(reformatName(alterExpression.getColumnName()))
                                    .build()));
                    break;
                case ADD:
                    if (alterExpression.getIndex() != null) {
                        // only support constraint type now
                        // the sink connector doesn't support add constraint
                        alterColumns.add(new AlterColumn(AlterType.ADD_CONSTRAINT));
                        break;
                    }
                    alterColumns.add(new AlterColumn(AlterType.ADD_COLUMN,
                            parseColumnWithPosition(isFirst, sqlType,
                                    alterExpression.getColDataTypeList().get(0)),
                            null));
                    break;
                case RENAME:
                    alterColumns.add(new AlterColumn(AlterType.CHANGE_COLUMN,
                            new Column(reformatName(alterExpression.getColumnName())),
                            new Column(reformatName(alterExpression.getColumnOldName()))));
                    break;
                case MODIFY:
                    // modify column use change column type
                case CHANGE:
                    alterColumns.add(new AlterColumn(AlterType.CHANGE_COLUMN,
                            parseColumnWithPosition(isFirst, sqlType,
                                    alterExpression.getColDataTypeList().get(0)),
                            new Column(reformatName(alterExpression.getColumnOldName()))));
                    break;
                default:
                    LOG.warn("doesn't support alter operation {}, statement {}",
                            alterExpression.getOperation(), statement);
            }

        });

        return new AlterOperation(alterColumns);
    }
parse alter operation from Alter from sqlParser.
@param statement alter statement
@param sqlType sql types
@param isFirst whether the column is first
@return AlterOperation
inlong-sort/sort-flink/sort-flink-v1.13/sort-connectors/mysql-cdc/src/main/java/org/apache/inlong/sort/cdc/mysql/utils/OperationUtils.java