dusukang commented on PR #19741:
URL: https://github.com/apache/flink/pull/19741#issuecomment-1143211688
Thanks @fsk119 for the test cases and @RocMarshal reply. I test different
versions of MySQL 5.6.51 and 5.7.35 and 8.0.16 and 8.0.26 locally. It works
normally in my test cases, here:
```
CREATE TABLE flinksql_test01.order_info (
`order_id` bigint(20) NOT NULL,
`order_name` varchar(128) DEFAULT NULL,
`pro_id` bigint(20) DEFAULT NULL,
`pro_name` varchar(128) DEFAULT NULL,
PRIMARY KEY (`order_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE flinksql_test02.order_info (
`order_id` bigint(20) DEFAULT NULL,
`order_name` varchar(128) DEFAULT NULL,
`pro_id` bigint(20) NOT NULL,
`pro_name` varchar(128) DEFAULT NULL,
PRIMARY KEY (`pro_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
```
```
import org.apache.flink.connector.jdbc.catalog.MySqlCatalog;
import org.apache.flink.table.catalog.CatalogBaseTable;
import org.apache.flink.table.catalog.ObjectPath;
import org.apache.flink.table.catalog.exceptions.TableNotExistException;
public class MySqlCatalogTest {
public static void main(String[] args) throws TableNotExistException {
MySqlCatalog mySqlCatalog =
new MySqlCatalog(
"mysql-catalog",
"flinksql_test01",
"root",
"123456",
"jdbc:mysql://127.0.0.1:3307");
CatalogBaseTable table =
mySqlCatalog.getTable(new ObjectPath("flinksql_test01",
"order_info"));
System.out.println(table.getUnresolvedSchema());
}
}
```
@RocMarshal could you have a look?
--
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]