aromanenko-dev commented on a change in pull request #15832: URL: https://github.com/apache/beam/pull/15832#discussion_r739328198
########## File path: CHANGES.md ########## @@ -60,6 +60,9 @@ ## I/Os * Support for X source added (Java/Python) ([BEAM-X](https://issues.apache.org/jira/browse/BEAM-X)). +* We changed the data type for ranges in `JdbcIO.readWithPartitions` from `int` to `long`. This is a relatively minor Review comment: Perhaps, it will be better to move or mention it on `Breaking Changes` section? ########## File path: sdks/java/io/jdbc/src/main/java/org/apache/beam/sdk/io/jdbc/JdbcIO.java ########## @@ -1060,53 +1060,36 @@ public void populateDisplayData(DisplayData.Builder builder) { getUpperBound() - getLowerBound() >= getNumPartitions(), "The specified number of partitions is more than the difference between upper bound and lower bound"); - if (getUpperBound() == MAX_VALUE || getLowerBound() == 0) { - refineBounds(input); - } - - int stride = (getUpperBound() - getLowerBound()) / getNumPartitions(); - PCollection<List<Integer>> params = + PCollection<KV<Integer, KV<Long, Long>>> params = input.apply( Create.of( Collections.singletonList( - Arrays.asList(getLowerBound(), getUpperBound(), getNumPartitions())))); - PCollection<KV<String, Iterable<Integer>>> ranges = + KV.of(getNumPartitions(), KV.of(getLowerBound(), getUpperBound()))))); Review comment: Moving to KVs - is it just a refactoring? ########## File path: sdks/java/io/jdbc/src/main/java/org/apache/beam/sdk/io/jdbc/JdbcIO.java ########## @@ -1060,53 +1060,36 @@ public void populateDisplayData(DisplayData.Builder builder) { getUpperBound() - getLowerBound() >= getNumPartitions(), "The specified number of partitions is more than the difference between upper bound and lower bound"); - if (getUpperBound() == MAX_VALUE || getLowerBound() == 0) { Review comment: Why this code was removed? -- 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]
