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

   ### Purpose of this pull request
   
   Assert documents field_type as optional and AssertRuleParser leaves it unset 
when omitted. AssertExecutor.checkType dereferences the missing type for 
non-null data, so a valid rule containing field_name and field_value fails with 
NullPointerException.
   
   Use the incoming field schema only when field_type was omitted. Preserve 
explicit type mismatch checks, value rules, null rules and unknown-field 
rejection. Add parser-to-executor regressions and omit field_type in the 
existing Assert E2E fixture.
   
   Fixes #12668.
   
   ### Does this PR introduce _any_ user-facing change?
   
   Yes, on dev. Rules that omit field_type now validate non-null values using 
the input schema. Explicitly configured types, value checks and nullability 
rules keep their behavior. The existing FakeSource-to-Assert E2E resource now 
omits field_type for age; container execution has not yet been completed 
locally.
   
   English and Chinese connector documentation are updated.
   
   ### How was this patch tested?
   
   JDK 17: AssertExecutorTest (31) and AssertRuleParserTest (1) passed after 
the fix. The same tests fail against the original executor. Container E2E 
execution is not included in this result. Root ./mvnw -o -q -DskipTests verify 
passed. The offline flag avoids unavailable remote dependency metadata using 
the installed cache.
   
   ```shell
   ./mvnw -q spotless:apply
   ./mvnw -q -pl seatunnel-connectors-v2/connector-assert -am 
-Dtest=AssertExecutorTest,AssertRuleParserTest 
-Dsurefire.failIfNoSpecifiedTests=false package
   ```
   
   ### Check list
   
   - [x] Added regression tests.
   - [x] Updated English and Chinese documentation.
   - [x] Existing connector integration coverage updated where applicable.
   
   No new connector, dependency or binary package.
   
   AI assistance: DeepSeek performed implementation and initial review; Codex 
coordinated final review, validation and submission.
   


-- 
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]

Reply via email to