och5351 opened a new pull request, #198:
URL: https://github.com/apache/flink-connector-jdbc/pull/198

   # What is the purpose of the change
   
   When using partitioned scan in Flink JDBC, if scan.partition.lower-bound and 
scan.partition.upper-bound are very large values (near Long range), integer 
arithmetic overflow causes the last partition to be silently dropped, resulting 
in one batch of data being lost.
   
   This fix was originally identified and implemented by @wangxiaojing in #174. 
Since the PR had been inactive for an extended period with no release progress, 
I am resubmitting it to move things forward. All credit for the investigation 
and fix goes to @wangxiaojing.
   
   # Brief change log
   
   - JdbcNumericBetweenParametersProvider.getParameterValues(): changed the 
loop to iterate batchNum - 1 times and explicitly set the last partition's 
upper bound to maxVal
   - Added regression test testBatchMaxMinTooLarge covering the overflow 
scenario with large Long values
   
   
   # Verifying this change
   
   - Run NumericBetweenParametersProviderTest#testBatchMaxMinTooLarge which 
covers the exact overflow case (lower=2260418954055131340, 
upper=3875220057236942850, batchNum=3)
   - All 7 existing tests in NumericBetweenParametersProviderTest pass


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