201811510411lw opened a new issue, #10386: URL: https://github.com/apache/seatunnel/issues/10386
### Search before asking - [x] I had searched in the [issues](https://github.com/apache/seatunnel/issues?q=is%3Aissue+label%3A%22bug%22) and found no similar issues. ### What happened Using SeaTunnel JDBC source with MySQL, when a table has a LONGTEXT column and the config includes both `table_path` and `query`, the job fails during startup. The stack trace shows `java.lang.ArithmeticException: integer overflow` caused by `Math.toIntExact(column.getColumnLength())` in JdbcCatalogUtils.mergeCatalogTable. ### SeaTunnel Version 2.3.12-release ### SeaTunnel Config ```conf 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>" table_list = [ { table_path = "<db>.user" query = """ SELECT id, config FROM <db>.user """ } ] } } sink { Console {} } ``` ### Running Command ```shell bin/start-seatunnel-flink-15-connector-v2.sh --config script/longtext.conf ``` ### Error Exception ```log Caused by: java.lang.ArithmeticException: integer overflow at java.lang.Math.toIntExact(Math.java:1011) at org.apache.seatunnel.connectors.seatunnel.jdbc.utils.JdbcCatalogUtils.lambda$mergeCatalogTable$5(JdbcCatalogUtils.java:341) at java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:193) at java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1382) at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:481) at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:471) at java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:708) at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234) at java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:499) at org.apache.seatunnel.connectors.seatunnel.jdbc.utils.JdbcCatalogUtils.mergeCatalogTable(JdbcCatalogUtils.java:356) at org.apache.seatunnel.connectors.seatunnel.jdbc.utils.JdbcCatalogUtils.getCatalogTable(JdbcCatalogUtils.java:210) at org.apache.seatunnel.connectors.seatunnel.jdbc.utils.JdbcCatalogUtils.getTables(JdbcCatalogUtils.java:94) at org.apache.seatunnel.connectors.seatunnel.jdbc.source.JdbcSource.<init>(JdbcSource.java:66) at org.apache.seatunnel.connectors.seatunnel.jdbc.source.JdbcSourceFactory.lambda$createSource$0(JdbcSourceFactory.java:59) at org.apache.seatunnel.api.table.factory.FactoryUtil.createAndPrepareSource(FactoryUtil.java:180) at org.apache.seatunnel.api.table.factory.FactoryUtil.restoreAndPrepareSource(FactoryUtil.java:136) ... 25 more ``` ### Zeta or Flink or Spark Version _No response_ ### Java or Scala Version _No response_ ### Screenshots _No response_ ### Are you willing to submit PR? - [ ] Yes I am willing to submit a PR! ### Code of Conduct - [x] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct) -- 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]
