ic4y opened a new issue, #2032:
URL: https://github.com/apache/incubator-seatunnel/issues/2032

   ### Search before asking
   
   - [X] I had searched in the 
[issues](https://github.com/apache/incubator-seatunnel/issues?q=is%3Aissue+label%3A%22bug%22)
 and found no similar issues.
   
   
   ### What happened
   
   
   After setting partition_column, it will cause data loss, and the data loss 
is equal to the number of partitions.
   
   The reason is that the sql partition read uses `partitionColumn  >= ? AND  
partitionColumn +  < ? `, which does not include the upper bound.
   
   But the upper and lower bounds are not repeated when splitting 
ParameterValues.
   
   For example
   ```
   partition_id=(1,2,3,4,5,6,7,8,9,10)
   partition number is 2
   ```
   
   Then ParameterValues=[[1,5][6,10]]
   
   Two SQL statements will be generated
   1、`partition_id  >= 1 AND  partition_id  < 5`
   2、`partition_id  >= 6 AND  partition_id  < 10`
   
   In this way, two data of id=5 and 10 will be lost. The lost data is equal to 
the number of partitions. The larger the number of partitions, the more data is 
lost.
   
   So sql also needs to include the upper bound,like `partitionColumn  >= ? AND 
 partitionColumn +  <= ? `
   
   
   
   ### SeaTunnel Version
   
   dev
   
   ### SeaTunnel Config
   
   ```conf
   None
   ```
   
   
   ### Running Command
   
   ```shell
   None
   ```
   
   
   ### Error Exception
   
   ```log
   None
   ```
   
   
   ### Flink or Spark Version
   
   _No response_
   
   ### Java or Scala Version
   
   _No response_
   
   ### Screenshots
   
   
![image](https://user-images.githubusercontent.com/83933160/174488004-ba8a4617-3308-43d8-815a-a181be8feb38.png)
   
![image](https://user-images.githubusercontent.com/83933160/174488010-70ae97db-0d43-4d18-b802-c0e66c950334.png)
   
   
   ### 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