You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@beam.apache.org by "ASF GitHub Bot (Jira)" <ji...@apache.org> on 2021/10/29 16:53:00 UTC

[jira] [Work logged] (BEAM-13149) JdbcIO.readWithPartitions supports only int ranges

     [ https://issues.apache.org/jira/browse/BEAM-13149?focusedWorklogId=672057&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-672057 ]

ASF GitHub Bot logged work on BEAM-13149:
-----------------------------------------

                Author: ASF GitHub Bot
            Created on: 29/Oct/21 16:52
            Start Date: 29/Oct/21 16:52
    Worklog Time Spent: 10m 
      Work Description: pabloem commented on a change in pull request #15832:
URL: https://github.com/apache/beam/pull/15832#discussion_r739395488



##########
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:
       I changed this to KVs because I left the `numPartitions` variable as Integer. This used to be represented as a list, but the list had to have a single type (all ints or all longs) - so that's why I changed it to KV<Integer, KV<Long, Long>> to represent (numPartitions, (Start, End))




-- 
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: github-unsubscribe@beam.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Issue Time Tracking
-------------------

            Worklog Id:     (was: 672057)
    Remaining Estimate: 0h
            Time Spent: 10m

> JdbcIO.readWithPartitions supports only int ranges
> --------------------------------------------------
>
>                 Key: BEAM-13149
>                 URL: https://issues.apache.org/jira/browse/BEAM-13149
>             Project: Beam
>          Issue Type: Task
>          Components: io-java-jdbc
>            Reporter: Pablo Estrada
>            Assignee: Pablo Estrada
>            Priority: P2
>          Time Spent: 10m
>  Remaining Estimate: 0h
>
> It would be easy to migrate this to `long` to increase the range that it supports



--
This message was sent by Atlassian Jira
(v8.3.4#803005)