You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@seatunnel.apache.org by "zhangsean (via GitHub)" <gi...@apache.org> on 2026/09/06 15:40:21 UTC

[PR] [Fix][Connector-V2][Jdbc] Support MySQL fulltext index creation [seatunnel]

zhangsean opened a new pull request, #12153:
URL: https://github.com/apache/seatunnel/pull/12153

   ### Purpose of this pull request
   
   This pull request preserves MySQL native index metadata when reading tables through the JDBC catalog and uses it while generating MySQL `CREATE TABLE` SQL. A source `FULLTEXT` index on a long `VARCHAR` column is now recreated as `FULLTEXT KEY` instead of being downgraded to a normal B-tree `KEY`, and MySQL prefix index lengths from `SUB_PART` are preserved when available.
   
   ### Does this PR introduce _any_ user-facing change?
   
   Yes. When JDBC sink auto-creates a MySQL table from MySQL catalog metadata with `create_index = true`, MySQL `FULLTEXT` indexes are generated as `FULLTEXT KEY`, and prefix index lengths are retained. This avoids failures such as `Specified key was too long; max key length is 3072 bytes` when a long `VARCHAR` source column had a valid fulltext index.
   
   ### How was this patch tested?
   
   Added `MysqlCreateTableSqlBuilderTest#testBuildCreateTableSqlWithMysqlFulltextAndPrefixIndexes` to verify that MySQL fulltext and prefix index metadata is rendered in the generated DDL.
   
   Local verification:
   
   - `git diff --check apache/dev...HEAD` passed.
   - `mvn -pl seatunnel-connectors-v2/connector-jdbc -DskipITs -Dtest=MysqlCreateTableSqlBuilderTest test` was attempted locally but did not complete before a 10-minute timeout in this environment.
   
   ### Check list
   
   * [ ] If any new Jar binary package adding in your PR, please add License Notice according
     [New License Guide](https://github.com/apache/seatunnel/blob/dev/docs/en/developer/new-license.md)
   * [ ] If necessary, please update the documentation to describe the new feature. https://github.com/apache/seatunnel/tree/dev/docs
   * [ ] If necessary, please update `incompatible-changes.md` to describe the incompatibility caused by this PR.
   * [ ] If you are contributing the connector code, please check that the following files are updated:
     1. Update [plugin-mapping.properties](https://github.com/apache/seatunnel/blob/dev/plugin-mapping.properties) and add new connector information in it
     2. Update the pom file of [seatunnel-dist](https://github.com/apache/seatunnel/blob/dev/seatunnel-dist/pom.xml)
     3. Add ci label in [label-scope-conf](https://github.com/apache/seatunnel/blob/dev/.github/workflows/labeler/label-scope-conf.yml)
     4. Add e2e testcase in [seatunnel-e2e](https://github.com/apache/seatunnel/tree/dev/seatunnel-e2e/seatunnel-connector-v2-e2e/)
     5. Update connector [plugin_config](https://github.com/apache/seatunnel/blob/dev/config/plugin_config)
   


-- 
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: commits-unsubscribe@seatunnel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [Fix][Connector-V2][Jdbc] Support MySQL fulltext index creation [seatunnel]

Posted by "davidzollo (via GitHub)" <gi...@apache.org>.
davidzollo commented on PR #12153:
URL: https://github.com/apache/seatunnel/pull/12153#issuecomment-5573207819

   Good job.
   
   Thanks a lot for your valuable contribution to Apache SeaTunnel!
   
   To pass the automated CI checks for this PR, could you please enable CI workflows in your forked repository first? You can refer to the check run link below as a reference for the required CI configuration https://github.com/apache/seatunnel/pull/12153/checks?check_run_id=101518918697
   
   If you run into any trouble enabling CI or encounter related errors during the process, feel free to leave a comment here. Contributors are always ready to offer help~
   
   <img width="2412" height="1472" alt="image" src="https://github.com/user-attachments/assets/6abd2ea1-da45-4d78-a81c-0158f2d7a851" />
   
   Please ignore the following message if you have joined in the SeaTunnel Slack~
   
   To facilitate focused communication among contributors, we’ve created a brand-new dedicated #contributors channel in official Slack workspace.
   Slack workspace link: https://s.apache.org/seatunnel-slack
   
   This channel is designed for technical discussions, feature design brainstorming, roadmap sync and direct communication with project core Contributors. Everyone who contributes code, docs, test cases or community ideas is warmly invited to join, share thoughts and collaborate together under The Apache Way. Welcome to join 😄


-- 
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: commits-unsubscribe@seatunnel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [Fix][Connector-V2][Jdbc] Support MySQL fulltext index creation [seatunnel]

Posted by "DanielLeens (via GitHub)" <gi...@apache.org>.
DanielLeens commented on PR #12153:
URL: https://github.com/apache/seatunnel/pull/12153#issuecomment-5627581051

   Hi @zhangsean — just circling back so the two remaining action items don't get lost in the repeated notification above (that message is an automated reminder, not something new from a person, so no need to worry it means something went wrong with your code).
   
   To get this PR to a mergeable state, two things are needed on your side, and both are quick:
   
   1. **Enable GitHub Actions on your fork** (`zhangsean/seatunnel`) — right now Actions has never run there, which is why the `Build` check shows `ACTION_REQUIRED` instead of pass/fail. GitHub's own guide: https://docs.github.com/en/actions/how-tos/manage-workflow-runs/disable-and-enable-a-workflow. David's comment above links the specific check-run reference for this PR.
   2. **Run `./mvnw spotless:apply -pl seatunnel-connectors-v2/connector-jdbc -am -nsu` locally and push the result** — your diff currently carries some unrelated line-ending/formatting changes that will fail the format-check step on their own, independent of the actual fix.
   
   To be clear about where things stand: the core logic fix (FULLTEXT/SPATIAL index handling in `MySqlCatalog` / `MysqlCreateTableSqlBuilder`) already looked correct and well-tested when I reviewed it — this is purely about getting CI able to actually run and pass, not about anything wrong with the fix itself. Once both of the above are done and a new commit lands, I'll take another look right away. Thanks again for the contribution, and don't hesitate to ask here if you hit any trouble enabling Actions or running spotless.


-- 
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: commits-unsubscribe@seatunnel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [Fix][Connector-V2][Jdbc] Support MySQL fulltext index creation [seatunnel]

Posted by "DanielLeens (via GitHub)" <gi...@apache.org>.
DanielLeens commented on PR #12153:
URL: https://github.com/apache/seatunnel/pull/12153#issuecomment-6285279698

   Pushed three commits on top of your branch, @zhangsean, so the PR is no longer conflicting and the format blocker is gone:
   
   1. `MysqlCreateTableSqlBuilder.java` and `MysqlCreateTableSqlBuilderTest.java` converted from CRLF to LF (this was the "hundreds of unrelated line changes" from Issue 1; after normalization the real diff is +213/-27 across 3 files).
   2. Merge of the current `dev`. The only remaining conflict was in `MysqlCreateTableSqlBuilderTest.java`, where `dev` added `testNullablePrimaryKeyColumnIsNotNullWhenCreateIndex` in the same place as your `testBuildCreateTableSqlWithMysqlFulltextAndPrefixIndexes`; both tests are kept in full.
   3. `./mvnw spotless:apply -pl seatunnel-connectors-v2/connector-jdbc` (`spotless:check` now passes locally for the module).
   
   No logic was changed. GitHub Actions is still disabled on your fork (`zhangsean/seatunnel` has never had a run), so no `Build` check can attach here until you enable it (Actions tab, then enable workflows) and push an empty commit or start the Build workflow by hand. Meanwhile I started a verification run of this exact head on my fork: https://github.com/DanielLeens/seatunnel/actions?query=branch%3Apr12153-verify-093724806b5


-- 
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: commits-unsubscribe@seatunnel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [Fix][Connector-V2][Jdbc] Support MySQL fulltext index creation [seatunnel]

Posted by "DanielLeens (via GitHub)" <gi...@apache.org>.
DanielLeens commented on PR #12153:
URL: https://github.com/apache/seatunnel/pull/12153#issuecomment-5577184556

   +1 to @davidzollo's note here — it matches what I found when I dug into this myself earlier (zero Actions runs on the `zhangsean/seatunnel` fork), so this is Actions needing to be enabled on the fork, not a hidden test failure.
   
   @zhangsean once Actions are enabled, there's one more thing needed before the `Build` check will actually pass end to end: please run `./mvnw spotless:apply -pl seatunnel-connectors-v2/connector-jdbc -am -nsu` locally and push the reformatted diff (see Issue 1 in my review above) — right now the diff carries a lot of unrelated line-ending changes that will fail the format-check step on their own, independent of whether the functional tests pass. The core logic fix (FULLTEXT/SPATIAL index handling in `MySqlCatalog` / `MysqlCreateTableSqlBuilder`) looks correct and well-tested as-is.
   
   No action needed from me right now — happy to take another look as soon as a new commit lands with CI actually running.
   


-- 
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: commits-unsubscribe@seatunnel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [Fix][Connector-V2][Jdbc] Support MySQL fulltext index creation [seatunnel]

Posted by "davidzollo (via GitHub)" <gi...@apache.org>.
davidzollo commented on PR #12153:
URL: https://github.com/apache/seatunnel/pull/12153#issuecomment-5595123095

   Good job.
   
   Thanks a lot for your valuable contribution to Apache SeaTunnel!
   
   To pass the automated CI checks for this PR, could you please enable CI workflows in your forked repository first? You can refer to the check run link below as a reference for the required CI configuration  https://github.com/apache/seatunnel/pull/12153/checks?check_run_id=101518918697
   
   If you run into any trouble enabling CI or encounter related errors during the process, feel free to leave a comment here. Contributors are always ready to offer help~
   
   <img width="2412" height="1472" alt="image" src="https://github.com/user-attachments/assets/6abd2ea1-da45-4d78-a81c-0158f2d7a851" />
   
   Please ignore the following message if you have joined in the SeaTunnel Slack~
   
   To facilitate focused communication among contributors, we’ve created a brand-new dedicated #contributors channel in official Slack workspace.
   Slack workspace link: https://s.apache.org/seatunnel-slack
   
   This channel is designed for technical discussions, feature design brainstorming, roadmap sync and direct communication with project core Contributors. Everyone who contributes code, docs, test cases or community ideas is warmly invited to join, share thoughts and collaborate together under The Apache Way. Welcome to join 😄


-- 
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: commits-unsubscribe@seatunnel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org