hutiefang76 opened a new issue, #12668:
URL: https://github.com/apache/seatunnel/issues/12668

   ## Search before asking
   
   - [x] Searched existing issues and pull requests; no existing fix for this 
reproduction was found.
   
   ## What happened
   
   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.
   
   ## SeaTunnel Version
   
   dev at 760c33a94433db85b974ae4d6622d05b726a4a47
   
   ## SeaTunnel Config
   
   ```text
   field_rules = [{field_name = name, field_value = [{rule_type = NOT_NULL}]}]
   ```
   
   ## Running Command / reproduction
   
   Parse a field rule {field_name=name,field_value=[{rule_type=NOT_NULL}]} with 
AssertRuleParser, then validate a row whose schema declares name as STRING and 
whose value is "jared". Expected success; actual NullPointerException at the 
type check. A failing MIN_LENGTH rule must still fail after the fix.
   
   Regression command after adding the test:
   
   ```shell
   ./mvnw -q -pl seatunnel-connectors-v2/connector-assert -am 
-Dtest=AssertExecutorTest,AssertRuleParserTest 
-Dsurefire.failIfNoSpecifiedTests=false package
   ```
   
   ## Error Exception
   
   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.
   
   ## Java or Scala Version
   
   JDK 17, macOS.
   
   ## Are you willing to submit PR?
   
   - [x] Yes
   
   ## Code of Conduct
   
   - [x] I agree to follow the Apache Code of Conduct.
   


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