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

   ### Search before asking
   
   - [X] I had searched in the 
[issues](https://github.com/apache/seatunnel/issues?q=is%3Aissue+label%3A%22bug%22)
 and found no similar issues.
   
   
   ### What happened
   
   
https://github.com/apache/seatunnel/blob/4def0f9a69b158f5bce414f4fca9d1bbaff5224d/seatunnel-connectors-v2/connector-assert/src/main/java/org/apache/seatunnel/connectors/seatunnel/assertion/excecutor/AssertExecutor.java#L165-L168
   
   Never check the precision and scale of Decimal Type.
   If we fake row which has one field with `decimal(10, 2)` and assert the 
field type is `decimal(1,0)`,  it will pass `Assert` check yet. But rows faked 
is `decimal(10,2)` should never pass the field type assert.
   
   ### SeaTunnel Version
   
   dev
   
   ### SeaTunnel Config
   
   ```conf
   env {
     execution.parallelism = 1
     job.mode = BATCH
   }
   
   source {
     FakeSource {
       tables_configs = [
           {
               row.num = 1
               schema = {
                 table= "fake"
                 fields {
                   c_decimal = "decimal(10,2)"
                 }
               }
           }
       ]
   
     }
   }
   
   sink {
     Assert {
       source_table_name = "fake"
       rules =
         {
           row_rules = [
             {
                rule_type = MAX_ROW
                rule_value = 100
             }
           ],
           field_rules = [{
             field_name = c_decimal
             field_type = "decimal(1, 0)"
             field_value = [
                {
                  rule_type = NOT_NULL
                }
             ]
           }]
       }
     }
   }
   ```
   
   
   ### Running Command
   
   ```shell
   none
   ```
   
   
   ### Error Exception
   
   ```log
   none
   ```
   
   
   ### Zeta or Flink or Spark Version
   
   _No response_
   
   ### Java or Scala Version
   
   _No response_
   
   ### Screenshots
   
   _No response_
   
   ### Are you willing to submit PR?
   
   - [X] Yes I am willing to submit a PR!
   
   ### Code of Conduct
   
   - [X] I agree to follow this project's [Code of 
Conduct](https://www.apache.org/foundation/policies/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