hutiefang76 opened a new pull request, #12870:
URL: https://github.com/apache/seatunnel/pull/12870
Yes, contributing this fix to Apache SeaTunnel.
### Purpose of this pull request
Fixes #12868. Reusing a Canal or Maxwell serializer could copy a previous
row's database, table and event time into a row that did not contain that
metadata. For example, serializing a row with `db1.t1` and an event time, then
a plain row, made the plain row claim the same table and timestamp.
Write each metadata slot from the current row on every serialization,
clearing missing values to null. Provided metadata, timestamp units, operation
mapping and update merging remain unchanged. The existing Canal/Maxwell suites
cover full, missing, table-only and timestamp-only metadata through one reused
instance. English and Chinese format docs describe the behavior.
### Does this PR introduce any user-facing change?
Rows without table ID or event time emit null for the corresponding metadata
fields rather than values from another record. No schema shape, option,
default, public API or dependency changes.
### How was this patch tested?
JDK 17.0.18:
- Both serializers reproduced stale metadata before the fix, with
provided-metadata controls.
- All JSON format suites: 57 tests, zero failures/errors/skips.
- Scoped `spotless:apply` and build-time format checks passed.
- Root `./mvnw -q -DskipTests verify` passed; this root command skips tests.
- Complete eight-file diff independently reviewed and checked before
submission.
```sh
./mvnw -B -pl seatunnel-formats/seatunnel-format-json -am \
'-Dtest=org.apache.seatunnel.format.json.**.*Test' \
-Dsurefire.failIfNoSpecifiedTests=false package
```
### Check list
- [x] Regression coverage added to existing format suites.
- [x] English and Chinese user documentation updated.
- [x] Local formatting and required root verification completed.
- No new dependencies or connector registration.
<sub>Implementation and tests assisted by DeepSeek and Codex; this
description was drafted and posted by an AI assistant for @hutiefang76.</sub>
--
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]