goutamadwant opened a new pull request, #11099:
URL: https://github.com/apache/seatunnel/pull/11099
### Purpose of this pull request
Enhances #11045.
This PR adds `rule_match_mode` for multi-table transform matching.
Changes:
- adds `FIRST_MATCH` and `ALL_MATCH` modes for repeated `table_transform`
entries with the same exact `table_path`
- keeps `FIRST_MATCH` as the default behavior
- keeps `table_match_regex` as the fallback when no exact `table_transform`
rule matches
- applies `ALL_MATCH` rules in declaration order, so later rules consume the
schema and row produced by earlier rules
- wires the new option into transform factories that support multi-table
transform
- updates English and Chinese docs with an `ALL_MATCH` example
- adds focused common resolver tests and a real
`CopyFieldMultiCatalogTransform` regression test
### Does this PR introduce _any_ user-facing change?
Yes.
Users can now configure `rule_match_mode = "ALL_MATCH"` when multiple
`table_transform` entries target the same exact `table_path`.
The default remains `FIRST_MATCH`, so existing valid configs continue to use
the first matching table-specific rule and then skip the outer
`table_match_regex` rule for that table.
### How was this patch tested?
Added unit coverage for:
- default `FIRST_MATCH` behavior
- explicit `FIRST_MATCH`
- `ALL_MATCH` sequential rule application
- deterministic declaration order
- fallback to outer `table_match_regex`
- no-match identity behavior
- real Copy transform chaining where the second rule reads a field produced
by the first rule
Verified with:
```shell
JAVA_HOME=$(/usr/libexec/java_home -v 11) PATH="$JAVA_HOME/bin:$PATH" ./mvnw
-pl seatunnel-transforms-v2
-Dtest=org.apache.seatunnel.transform.copy.CopyFieldMultiCatalogTransformTest,org.apache.seatunnel.transform.common.AbstractMultiCatalogTransformTest
test
```
### 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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]