zhangjun0x01 opened a new issue, #1605: URL: https://github.com/apache/incubator-paimon/issues/1605
### Search before asking - [X] I searched in the [issues](https://github.com/apache/incubator-paimon/issues) and found nothing similar. ### Paimon version master ### Compute Engine flink ### Minimal reproduce step 1. start a flink sync job to sync mysql database to paimon 2. create a mysql table with primary key, like this `create table t1(id int primary key, name varchar(10))` 3. can not sync the mysql table to paimon. ### What doesn't meet your expectations? can not sync the mysql table to paimon. ### Anything else? reason: `com.alibaba.druid.sql.SQLUtils` can not parse the create table ddl correctly, for example , we have the following test case: ``` String ddl = "create table t1(id int primary key, name varchar(10))"; SQLStatement statement = SQLUtils.parseSingleStatement(ddl, JdbcConstants.MYSQL); MySqlCreateTableStatement createTableStatement = (MySqlCreateTableStatement) statement; List<String> primaryKeys = createTableStatement.getPrimaryKeyNames(); System.out.println(primaryKeys); ``` the `primaryKeys` will be empty. if the ddl is like this , `CREATE TABLE t2 (k INT, v1 VARCHAR(10), PRIMARY KEY (k))` ,it can be parsed correctly. ### Are you willing to submit a PR? - [X] I'm willing to submit a PR! -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
