Asthenia0412 opened a new pull request, #67974: URL: https://github.com/apache/doris/pull/67974
## Proposed changes Issue Number: close #67484 Problem Summary: `include_tables` / `exclude_tables` of `CREATE JOB ... ON STREAMING FROM MYSQL` currently support exact table-name matching only, so whole-database sync jobs must enumerate every backup/archive table explicitly. New backup tables created upstream after the job is created are silently picked up, and since these configs cannot be changed by `ALTER JOB`, keeping the exclusion list current requires dropping and recreating the job (and carefully preserving the binlog offset). This change parses each comma-separated element of `include_tables` / `exclude_tables` as a Java regex and full-matches it against the bare table name via `Pattern.matches()`: - Backward compatible: a pattern without regex metacharacters matches exactly one table, identical to the previous `contains()` behavior. - Patterns like `sys_config_bak_.*` or `user_[0-9]+` are now supported, aligning with Flink CDC's `tables` regex option. - Each element is trimmed and empty elements are ignored, so `"a, b"` behaves the same as `"a,b"` (previously the whitespace made the entry silently ineffective). - Invalid patterns fail fast with a `JobException` naming the offending pattern instead of leaking a raw `PatternSyntaxException`. ## Type of change - [x] Feature - [ ] Bugfix - [ ] Improvement - [ ] Refactor - [ ] Documentation ## How has this been tested? - [x] Unit test: `StreamingJobUtilsTest` (regex include, regex + trim exclude, invalid regex fails fast) - [ ] Regression test - [ ] Manual test ## Checklist - [x] I have read the [Contributing Guide](https://doris.apache.org/community/how-to-contribute/contribute/) - [x] The PR title follows the format `[type](module) short summary` - [x] The code follows the code style of this project -- 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] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
