RocMarshal commented on code in PR #174:
URL:
https://github.com/apache/flink-connector-jdbc/pull/174#discussion_r2596822822
##########
flink-connector-jdbc-core/src/test/java/org/apache/flink/connector/jdbc/split/NumericBetweenParametersProviderTest.java:
##########
@@ -115,6 +115,21 @@ void testBatchNumTooLarge() {
check(expected, actual);
}
+ @Test
+ void testBatchMaxMinTooLarge() {
+ JdbcNumericBetweenParametersProvider provider =
+ new JdbcNumericBetweenParametersProvider(2260418954055131340L,
3875220057236942850L)
+ .ofBatchSize(3);
+ Serializable[][] actual = provider.getParameterValues();
+
+ long[][] expected = {
+ new long[] {2260418954055131340L, 2798685988449068510L},
+ new long[] {2798685988449068511L, 3336953022843005681L},
+ new long[] {3336953022843005682L, 3875220057236942850L}
+ };
Review Comment:
```suggestion
long[][] expected = {
new long[] {2260418954055131340L, 2798685988449068491L},
new long[] {2798685988449068492L, 3336953022843005643L},
new long[] {3336953022843005644L, 3875220057236942850L}
};
```
<img width="1902" height="976" alt="image"
src="https://github.com/user-attachments/assets/8a489d58-ad8a-4800-af3e-26a3cffd884f"
/>
I tried to follow your train of thought to review this test case. Perhaps
you were trying to convey this expected outcome. Please let me know your
opinion.
##########
flink-connector-jdbc-core/src/test/java/org/apache/flink/connector/jdbc/split/NumericBetweenParametersProviderTest.java:
##########
@@ -115,6 +115,21 @@ void testBatchNumTooLarge() {
check(expected, actual);
}
+ @Test
+ void testBatchMaxMinTooLarge() {
+ JdbcNumericBetweenParametersProvider provider =
+ new JdbcNumericBetweenParametersProvider(2260418954055131340L,
3875220057236942850L)
+ .ofBatchSize(3);
Review Comment:
Do you mean that we should call the `ofBatchNum` method here?
--
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]