goutamadwant opened a new pull request, #11917:
URL: https://github.com/apache/seatunnel/pull/11917
### Purpose of this pull request
Closes #11916.
The Doris sink already forwards `doris.config.partitions` to Stream Load,
but `data_save_mode = DROP_DATA` always truncated the complete target table
before writing. This could remove data from partitions that were not part of
the load.
This change:
- reuses `doris.config.partitions` for the pre-write cleanup
- truncates all configured formal partitions in one Doris statement
- keeps the existing whole-table truncate when no partitions are configured
- rejects blank or duplicate partition names before cleanup
- quotes partition identifiers and keeps the normalized cleanup and Stream
Load targets aligned
- documents the behavior in the English and Chinese Doris sink guides
### Does this PR introduce _any_ user-facing change?
Yes.
With `data_save_mode = DROP_DATA` and `doris.config.partitions` configured,
SeaTunnel now truncates only the listed formal Doris partitions before loading
into those same partitions. Without `doris.config.partitions`, the existing
whole-table cleanup remains unchanged.
### How was this patch tested?
Added unit coverage for partition-list normalization and validation,
partition-aware SQL generation and identifier quoting, whole-table fallback,
non-`DROP_DATA` behavior, and the newly-created-table lifecycle guard.
Verified the complete Doris connector unit suite with 130 passing tests:
`./mvnw -T1 -pl :connector-doris test`
Verified the Doris connector and its reactor dependencies:
`./mvnw -T1 -pl seatunnel-connectors-v2/connector-doris -am -DskipTests
verify`
### 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)
Not applicable. This change adds no dependency or binary package.
* [x] If necessary, please update the documentation to describe the new
feature. https://github.com/apache/seatunnel/tree/dev/docs
Updated the English and Chinese Doris sink documentation.
* [ ] If necessary, please update `incompatible-changes.md` to describe the
incompatibility caused by this PR.
Not applicable. The existing whole-table behavior remains the default when
no partitions are configured.
* [ ] 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)
Not applicable. This updates an existing Doris connector capability and
does not add a connector, dependency, distribution entry, or plugin mapping.
--
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]