201811510411lw commented on issue #10386:
URL: https://github.com/apache/seatunnel/issues/10386#issuecomment-3783496918
> The main cause of the current issue is: when table_path + query is used,
it goes through JdbcCatalogUtils.mergeCatalogTable to perform table schema
merging. For MySQL type mapping, LONGTEXT/LONGBLOB directly set columnLength to
2^32-1 . However, Column.columnLength itself is a Long, and casting it to int
during merging triggers an ArithmeticException: integer overflow.
>
> For now, if you are doing single-table synchronization, a temporary
workaround is to use the query directly for synchronization without adding
table_list. You can give this a try.
>
> ```
> env {
> job.name = "jdbc-longtext-repro"
> parallelism = 1
> job.mode = "BATCH"
> }
>
> source {
> Jdbc {
> url =
"jdbc:mysql://<host>:3306/<db>?useUnicode=true&characterEncoding=UTF-8&useSSL=false"
> driver = "com.mysql.cj.jdbc.Driver"
> user = "<user>"
> password = "<password>"
> query ="SELECT id, config FROM <db>.user"
> }
> }
>
> sink { Console {} }
> ```
<img width="1046" height="821" alt="Image"
src="https://github.com/user-attachments/assets/feb05729-5d7d-4403-b766-df6ac71b445a"
/>
--
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]