Martijn Visser created FLINK-40748:
--------------------------------------

             Summary: PreparedSplitterNumericParameters.withBatchSize reads 
past maxVal
                 Key: FLINK-40748
                 URL: https://issues.apache.org/jira/browse/FLINK-40748
             Project: Flink
          Issue Type: Bug
          Components: Connectors / JDBC
    Affects Versions: jdbc-4.1.0
            Reporter: Martijn Visser
            Assignee: Martijn Visser
             Fix For: jdbc-5.0.0, jdbc-4.1.1


`getParameterValues` uses the split formula 
`JdbcNumericBetweenParametersProvider` had before FLINK-38046; when the batch 
size does not divide the range, `bigBatchNum` goes negative and the last split 
ends above `maxVal`, so the source reads rows above the configured upper bound 
(`[5, 9]` in batches of 4 gives `[5,7],[8,10]`). `withBatchNum` is not affected 
(exhaustive check up to 200 values). 

Fix: the last split ends at `maxVal`, and `minVal > maxVal` is rejected as the 
provider does.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to