legendtkl commented on issue #1395:
URL:
https://github.com/apache/incubator-paimon/issues/1395#issuecomment-1610735364
Hi, @JingsongLi , this is implementation proposal:
Add a table conf `convert-tinyint-byte` in Action, such as
```bash
<FLINK_HOME>/bin/flink run \
/path/to/paimon-flink-action-0.5-SNAPSHOT.jar \
mysql-sync-table \
--warehouse hdfs:///path/to/warehouse \
--database test_db \
--table test_table \
--partition-keys pt \
--primary-keys pt,uid \
--computed-columns '_year=year(age)' \
--mysql-conf hostname=127.0.0.1 \
--mysql-conf username=root \
--mysql-conf password=123456 \
--mysql-conf database-name=source_db \
--mysql-conf table-name='source_table_.*' \
--catalog-conf metastore=hive \
--catalog-conf uri=thrift://hive-metastore:9083 \
--table-conf bucket=4 \
--table-conf changelog-producer=input \
--table-conf sink.parallelism=4 \
--table-conf convert-tinyint-byte=true
```
Then we pass the config into `MySqlTypeUtils#toDataType()` method for
handling `TINYINT` type.
--
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]