You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@beam.apache.org by "shubham-j-sde (via GitHub)" <gi...@apache.org> on 2025/03/23 10:49:23 UTC

[PR] Feature: Yaml JdbcIO partitioning for ReadRows [beam]

shubham-j-sde opened a new pull request, #34393:
URL: https://github.com/apache/beam/pull/34393

   addresses #34349 Beam Yaml JdbcIO partitioning
   
   - [x] Extend [ReadRows](https://github.com/apache/beam/blob/master/sdks/java/io/jdbc/src/main/java/org/apache/beam/sdk/io/jdbc/JdbcIO.java#L730) to accept partitioning.
   - [ ] Adding test in [JdbcIOTest](https://github.com/apache/beam/blob/master/sdks/java/io/jdbc/src/test/java/org/apache/beam/sdk/io/jdbc/JdbcIOTest.java).
   - [ ] Extend [JdbcReadSchemaTransformProvider](https://github.com/Polber/beam/blob/master/sdks/java/io/jdbc/src/main/java/org/apache/beam/sdk/io/jdbc/JdbcReadSchemaTransformProvider.java) to accept this as a parameter.
   - [ ] Update the mapping in [standard_io.yaml](https://github.com/apache/beam/blob/master/sdks/python/apache_beam/yaml/standard_io.yaml#L195)
   
   ------------------------
   
   Thank you for your contribution! Follow this checklist to help us incorporate your contribution quickly and easily:
   
    - [ ] Mention the appropriate issue in your description (for example: `addresses #123`), if applicable. This will automatically add a link to the pull request in the issue. If you would like the issue to automatically close on merging the pull request, comment `fixes #<ISSUE NUMBER>` instead.
    - [ ] Update `CHANGES.md` with noteworthy changes.
    - [ ] If this contribution is large, please file an Apache [Individual Contributor License Agreement](https://www.apache.org/licenses/icla.pdf).
   
   See the [Contributor Guide](https://beam.apache.org/contribute) for more tips on [how to make review process smoother](https://github.com/apache/beam/blob/master/CONTRIBUTING.md#make-the-reviewers-job-easier).
   
   To check the build health, please visit [https://github.com/apache/beam/blob/master/.test-infra/BUILD_STATUS.md](https://github.com/apache/beam/blob/master/.test-infra/BUILD_STATUS.md)
   
   GitHub Actions Tests Status (on master branch)
   ------------------------------------------------------------------------------------------------
   [![Build python source distribution and wheels](https://github.com/apache/beam/actions/workflows/build_wheels.yml/badge.svg?event=schedule&&?branch=master)](https://github.com/apache/beam/actions?query=workflow%3A%22Build+python+source+distribution+and+wheels%22+branch%3Amaster+event%3Aschedule)
   [![Python tests](https://github.com/apache/beam/actions/workflows/python_tests.yml/badge.svg?event=schedule&&?branch=master)](https://github.com/apache/beam/actions?query=workflow%3A%22Python+Tests%22+branch%3Amaster+event%3Aschedule)
   [![Java tests](https://github.com/apache/beam/actions/workflows/java_tests.yml/badge.svg?event=schedule&&?branch=master)](https://github.com/apache/beam/actions?query=workflow%3A%22Java+Tests%22+branch%3Amaster+event%3Aschedule)
   [![Go tests](https://github.com/apache/beam/actions/workflows/go_tests.yml/badge.svg?event=schedule&&?branch=master)](https://github.com/apache/beam/actions?query=workflow%3A%22Go+tests%22+branch%3Amaster+event%3Aschedule)
   
   See [CI.md](https://github.com/apache/beam/blob/master/CI.md) for more information about GitHub Actions CI or the [workflows README](https://github.com/apache/beam/blob/master/.github/workflows/README.md) to see a list of phrases to trigger workflows.
   


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


Re: [PR] Feature: Yaml JdbcIO partitioning for ReadRows [beam]

Posted by "shubham-j-sde (via GitHub)" <gi...@apache.org>.
shubham-j-sde closed pull request #34393: Feature: Yaml JdbcIO partitioning for ReadRows
URL: https://github.com/apache/beam/pull/34393


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


Re: [PR] Feature: Yaml JdbcIO partitioning for ReadRows [beam]

Posted by "claudevdm (via GitHub)" <gi...@apache.org>.
claudevdm commented on PR #34393:
URL: https://github.com/apache/beam/pull/34393#issuecomment-2746637872

   > @claudevdm -- it seems necessary as the end goal of this, as described in #34349 is to expose this to Beam YAML, which uses the ReadRows Transform when reading from JDBC.
   
   This PR seems like adds a new ReadRowsWithPartitions, which achieves the same as ReadWithPartitions.withRowOutput(). Can you help me understand why are we adding a new ReadRowsWithPartitions with almost the exact same code as ReadWithPartitions?
   
   ReadWithPartitions.withRowOutput() can be used from  https://github.com/apache/beam/blob/3595a3303df6d2e4c8e77482ca8120994d0d5881/sdks/java/io/jdbc/src/main/java/org/apache/beam/sdk/io/jdbc/JdbcReadSchemaTransformProvider.java#L49 can it not?


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


Re: [PR] Feature: Yaml JdbcIO partitioning for ReadRows [beam]

Posted by "svetakvsundhar (via GitHub)" <gi...@apache.org>.
svetakvsundhar commented on PR #34393:
URL: https://github.com/apache/beam/pull/34393#issuecomment-2746528399

   @claudevdm -- it seems necessary as the end goal of this, as described in https://github.com/apache/beam/issues/34349 is to expose this to Beam YAML, which uses the ReadRows Transform when reading from JDBC. 


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


Re: [PR] Feature: Yaml JdbcIO partitioning for ReadRows [beam]

Posted by "claudevdm (via GitHub)" <gi...@apache.org>.
claudevdm commented on PR #34393:
URL: https://github.com/apache/beam/pull/34393#issuecomment-2746526250

   Hi, is this change necessary? The current ReadWithPartitions already has the ability to output a row, by specifying withRowOutput [1]. Here is an example of it being used in a separate cross language transform [2]
   
   [1] https://github.com/apache/beam/blob/3595a3303df6d2e4c8e77482ca8120994d0d5881/sdks/java/io/jdbc/src/main/java/org/apache/beam/sdk/io/jdbc/JdbcIO.java#L1432
   [2] https://github.com/apache/beam/blob/3595a3303df6d2e4c8e77482ca8120994d0d5881/sdks/java/io/jdbc/src/main/java/org/apache/beam/sdk/io/jdbc/JdbcSchemaIOProvider.java#L131


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


Re: [PR] Feature: Yaml JdbcIO partitioning for ReadRows [beam]

Posted by "shubham-j-sde (via GitHub)" <gi...@apache.org>.
shubham-j-sde commented on PR #34393:
URL: https://github.com/apache/beam/pull/34393#issuecomment-2746144784

   @svetakvsundhar, I have extended said class per my understanding, please let me know for any required changes. proceeding to write tests.
   Thank you


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


Re: [PR] Feature: Yaml JdbcIO partitioning for ReadRows [beam]

Posted by "shubham-j-sde (via GitHub)" <gi...@apache.org>.
shubham-j-sde commented on PR #34393:
URL: https://github.com/apache/beam/pull/34393#issuecomment-2746595118

   Thank you for the inputs. on it!


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


Re: [PR] Feature: Yaml JdbcIO partitioning for ReadRows [beam]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #34393:
URL: https://github.com/apache/beam/pull/34393#issuecomment-2746161804

   Assigning reviewers. If you would like to opt out of this review, comment `assign to next reviewer`:
   
   R: @Abacn for label java.
   R: @johnjcasey for label io.
   
   Available commands:
   - `stop reviewer notifications` - opt out of the automated review tooling
   - `remind me after tests pass` - tag the comment author after tests pass
   - `waiting on author` - shift the attention set back to the author (any comment or push by the author will return the attention set to the reviewers)
   
   The PR bot will only process comments in the main thread (not review comments).


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


Re: [PR] Feature: Yaml JdbcIO partitioning for ReadRows [beam]

Posted by "svetakvsundhar (via GitHub)" <gi...@apache.org>.
svetakvsundhar commented on code in PR #34393:
URL: https://github.com/apache/beam/pull/34393#discussion_r2009269295


##########
sdks/java/io/jdbc/src/main/java/org/apache/beam/sdk/io/jdbc/JdbcIO.java:
##########
@@ -889,6 +927,305 @@ public void populateDisplayData(DisplayData.Builder builder) {
     }
   }
 
+  /** Implementation of {@link #readRowsWithPartitions}. */
+  @AutoValue
+  public abstract static class ReadRowsWithPartitions<PartitionColumnT>
+      extends PTransform<PBegin, PCollection<Row>> {
+
+    @Pure
+    abstract @Nullable SerializableFunction<Void, DataSource> getDataSourceProviderFn();
+
+    @Pure
+    abstract int getFetchSize();
+
+    @Pure
+    abstract boolean getDisableAutoCommit();
+
+    @Pure
+    abstract @Nullable Schema getSchema();
+
+    @Pure
+    abstract @Nullable Integer getNumPartitions();
+
+    @Pure
+    abstract @Nullable String getPartitionColumn();
+
+    @Pure
+    abstract @Nullable PartitionColumnT getLowerBound();
+
+    @Pure
+    abstract @Nullable PartitionColumnT getUpperBound();
+
+    @Pure
+    abstract @Nullable String getTable();
+
+    @Pure
+    abstract @Nullable TypeDescriptor<PartitionColumnT> getPartitionColumnType();
+
+    @Pure
+    abstract @Nullable JdbcReadWithPartitionsHelper<PartitionColumnT> getPartitionsHelper();
+
+    @Pure
+    abstract boolean getUseBeamSchema();
+
+    @Pure
+    abstract Builder<PartitionColumnT> toBuilder();
+
+    @AutoValue.Builder
+    abstract static class Builder<PartitionColumnT> {
+
+      abstract Builder<PartitionColumnT> setDataSourceProviderFn(
+          SerializableFunction<Void, DataSource> dataSourceProviderFn);
+
+      abstract Builder<PartitionColumnT> setFetchSize(int fetchSize);
+
+      abstract Builder<PartitionColumnT> setNumPartitions(int numPartitions);
+
+      abstract Builder<PartitionColumnT> setPartitionColumn(String partitionColumn);
+
+      abstract Builder<PartitionColumnT> setLowerBound(PartitionColumnT lowerBound);
+
+      abstract Builder<PartitionColumnT> setUpperBound(PartitionColumnT upperBound);
+
+      abstract Builder<PartitionColumnT> setUseBeamSchema(boolean useBeamSchema);
+
+      abstract Builder<PartitionColumnT> setTable(String tableName);
+
+      abstract Builder<PartitionColumnT> setPartitionColumnType(
+          TypeDescriptor<PartitionColumnT> partitionColumnType);
+
+      abstract Builder<PartitionColumnT> setPartitionsHelper(
+          JdbcReadWithPartitionsHelper<PartitionColumnT> partitionsHelper);
+
+      abstract Builder<PartitionColumnT> setDisableAutoCommit(boolean disableAutoCommit);
+
+      abstract Builder<PartitionColumnT> setSchema(@Nullable Schema schema);
+
+      abstract ReadRowsWithPartitions<PartitionColumnT> build();
+    }
+
+    public ReadRowsWithPartitions<PartitionColumnT> withDataSourceConfiguration(
+        final DataSourceConfiguration config) {
+      return withDataSourceProviderFn(new DataSourceProviderFromDataSourceConfiguration(config));
+    }
+
+    public ReadRowsWithPartitions<PartitionColumnT> withDataSourceProviderFn(
+        SerializableFunction<Void, DataSource> dataSourceProviderFn) {
+      return toBuilder().setDataSourceProviderFn(dataSourceProviderFn).build();
+    }
+
+    /**
+     * The number of partitions. This, along with withLowerBound and withUpperBound, form partitions
+     * strides for generated WHERE clause expressions used to split the column withPartitionColumn
+     * evenly. When the input is less than 1, the number is set to 1.
+     */
+    public ReadRowsWithPartitions<PartitionColumnT> withNumPartitions(int numPartitions) {
+      checkArgument(numPartitions > 0, "numPartitions can not be less than 1");
+      return toBuilder().setNumPartitions(numPartitions).build();
+    }
+
+    /** The name of a column of numeric type that will be used for partitioning. */
+    public ReadRowsWithPartitions<PartitionColumnT> withPartitionColumn(String partitionColumn) {
+      checkNotNull(partitionColumn, "partitionColumn can not be null");
+      return toBuilder().setPartitionColumn(partitionColumn).build();
+    }
+
+    /** The number of rows to fetch from the database in the same {@link ResultSet} round-trip. */
+    public ReadRowsWithPartitions<PartitionColumnT> withFetchSize(int fetchSize) {
+      checkArgument(fetchSize > 0, "fetchSize can not be less than 1");
+      return toBuilder().setFetchSize(fetchSize).build();
+    }
+
+    /**
+     * Whether to disable auto commit on read. Defaults to true if not provided. The need for this
+     * config varies depending on the database platform. Informix requires this to be set to false
+     * while Postgres requires this to be set to true.
+     */
+    public ReadRowsWithPartitions<PartitionColumnT> withDisableAutoCommit(
+        boolean disableAutoCommit) {
+      return toBuilder().setDisableAutoCommit(disableAutoCommit).build();
+    }
+
+    /** Data output type is {@link Row}, and schema is auto-inferred from the database. */
+    public ReadRowsWithPartitions<PartitionColumnT> withRowOutput() {
+      return toBuilder().setUseBeamSchema(true).build();
+    }
+
+    public ReadRowsWithPartitions<PartitionColumnT> withLowerBound(PartitionColumnT lowerBound) {
+      return toBuilder().setLowerBound(lowerBound).build();
+    }
+
+    public ReadRowsWithPartitions<PartitionColumnT> withUpperBound(PartitionColumnT upperBound) {
+      return toBuilder().setUpperBound(upperBound).build();
+    }
+
+    /** Name of the table in the external database. Can be used to pass a user-defined subqery. */
+    public ReadRowsWithPartitions<PartitionColumnT> withTable(String tableName) {
+      checkNotNull(tableName, "table can not be null");
+      return toBuilder().setTable(tableName).build();
+    }
+
+    public ReadRowsWithPartitions<PartitionColumnT> withSchema(Schema schema) {
+      return toBuilder().setSchema(schema).build();
+    }
+
+    private static final int EQUAL = 0;

Review Comment:
   Can we add a comment as to what this variable is for?



##########
sdks/java/io/jdbc/src/test/java/org/apache/beam/sdk/io/jdbc/JdbcIOTest.java:
##########
@@ -515,6 +515,110 @@ public void testIncompatibleSchemaThrowsError() {
         assertThrows(PipelineExecutionException.class, () -> pipeline.run().waitUntilFinish());
   }
 
+  @Test
+  public void testReadRowsPartitions() {
+    PCollection<Row> rows =
+        pipeline.apply(
+            JdbcIO.readRowsWithPartitions()
+                .withDataSourceConfiguration(DATA_SOURCE_CONFIGURATION)
+                .withTable(READ_TABLE_NAME)
+                .withNumPartitions(1)
+                .withPartitionColumn("id")
+                .withLowerBound(0L)
+                .withUpperBound(1000L));
+    PAssert.thatSingleton(rows.apply("Count All", Count.globally())).isEqualTo(1000L);
+    pipeline.run();
+  }
+
+  @Test
+  public void testReadRowsPartitionsWithExplicitSchema() {
+    Schema customSchema =
+        Schema.of(
+            Schema.Field.of("CUSTOMER_NAME", Schema.FieldType.STRING).withNullable(true),
+            Schema.Field.of("CUSTOMER_ID", Schema.FieldType.INT32).withNullable(true));
+    PCollection<Row> rows =
+        pipeline.apply(
+            JdbcIO.readRowsWithPartitions()
+                .withDataSourceConfiguration(DATA_SOURCE_CONFIGURATION)
+                .withTable(String.format("(select name,id from %s) as subq", READ_TABLE_NAME))
+                .withNumPartitions(5)
+                .withPartitionColumn("id")
+                .withLowerBound(0L)
+                .withUpperBound(1000L)
+                .withRowOutput()
+                .withSchema(customSchema));
+    assertEquals(customSchema, rows.getSchema());
+    PAssert.thatSingleton(rows.apply("Count All", Count.globally())).isEqualTo(1000L);
+    pipeline.run();
+  }
+
+  @Test
+  public void testReadRowsPartitionsBySubqery() {
+    PCollection<Row> rows =
+        pipeline.apply(
+            JdbcIO.readRowsWithPartitions()
+                .withDataSourceConfiguration(DATA_SOURCE_CONFIGURATION)
+                .withTable(String.format("(select * from %s) as subq", READ_TABLE_NAME))
+                .withNumPartitions(10)
+                .withPartitionColumn("id")
+                .withLowerBound(0L)
+                .withUpperBound(1000L));
+    PAssert.thatSingleton(rows.apply("Count All", Count.globally())).isEqualTo(1000L);
+    pipeline.run();
+  }
+
+  @Test
+  public void testReadRowsPartitionsIfNumPartitionsIsZero() {
+    thrown.expect(IllegalArgumentException.class);
+    thrown.expectMessage("numPartitions can not be less than 1");
+    pipeline.apply(
+        JdbcIO.readRowsWithPartitions()
+            .withDataSourceConfiguration(DATA_SOURCE_CONFIGURATION)
+            .withTable(READ_TABLE_NAME)
+            .withNumPartitions(0)
+            .withPartitionColumn("id")
+            .withLowerBound(0L)
+            .withUpperBound(1000L));
+    pipeline.run();
+  }
+
+  @Test
+  public void testReadRowsPartitionsLowerBoundIsMoreThanUpperBound() {

Review Comment:
   Can we also add a test to test a null partition column and a null table name?



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


Re: [PR] Feature: Yaml JdbcIO partitioning for ReadRows [beam]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #34393:
URL: https://github.com/apache/beam/pull/34393#issuecomment-2766044401

   Reminder, please take a look at this pr: @Abacn @johnjcasey 


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


Re: [PR] Feature: Yaml JdbcIO partitioning for ReadRows [beam]

Posted by "shubham-j-sde (via GitHub)" <gi...@apache.org>.
shubham-j-sde commented on PR #34393:
URL: https://github.com/apache/beam/pull/34393#issuecomment-2766086064

   changes were moved on to PR #34417


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


Re: [PR] Feature: Yaml JdbcIO partitioning for ReadRows [beam]

Posted by "svetakvsundhar (via GitHub)" <gi...@apache.org>.
svetakvsundhar commented on code in PR #34393:
URL: https://github.com/apache/beam/pull/34393#discussion_r2009269646


##########
sdks/java/io/jdbc/src/test/java/org/apache/beam/sdk/io/jdbc/JdbcIOTest.java:
##########
@@ -515,6 +515,110 @@ public void testIncompatibleSchemaThrowsError() {
         assertThrows(PipelineExecutionException.class, () -> pipeline.run().waitUntilFinish());
   }
 
+  @Test
+  public void testReadRowsPartitions() {
+    PCollection<Row> rows =
+        pipeline.apply(
+            JdbcIO.readRowsWithPartitions()
+                .withDataSourceConfiguration(DATA_SOURCE_CONFIGURATION)
+                .withTable(READ_TABLE_NAME)
+                .withNumPartitions(1)
+                .withPartitionColumn("id")
+                .withLowerBound(0L)
+                .withUpperBound(1000L));
+    PAssert.thatSingleton(rows.apply("Count All", Count.globally())).isEqualTo(1000L);
+    pipeline.run();
+  }
+
+  @Test
+  public void testReadRowsPartitionsWithExplicitSchema() {
+    Schema customSchema =
+        Schema.of(
+            Schema.Field.of("CUSTOMER_NAME", Schema.FieldType.STRING).withNullable(true),
+            Schema.Field.of("CUSTOMER_ID", Schema.FieldType.INT32).withNullable(true));
+    PCollection<Row> rows =
+        pipeline.apply(
+            JdbcIO.readRowsWithPartitions()
+                .withDataSourceConfiguration(DATA_SOURCE_CONFIGURATION)
+                .withTable(String.format("(select name,id from %s) as subq", READ_TABLE_NAME))
+                .withNumPartitions(5)
+                .withPartitionColumn("id")
+                .withLowerBound(0L)
+                .withUpperBound(1000L)
+                .withRowOutput()
+                .withSchema(customSchema));
+    assertEquals(customSchema, rows.getSchema());
+    PAssert.thatSingleton(rows.apply("Count All", Count.globally())).isEqualTo(1000L);
+    pipeline.run();
+  }
+
+  @Test
+  public void testReadRowsPartitionsBySubqery() {
+    PCollection<Row> rows =
+        pipeline.apply(
+            JdbcIO.readRowsWithPartitions()
+                .withDataSourceConfiguration(DATA_SOURCE_CONFIGURATION)
+                .withTable(String.format("(select * from %s) as subq", READ_TABLE_NAME))
+                .withNumPartitions(10)
+                .withPartitionColumn("id")
+                .withLowerBound(0L)
+                .withUpperBound(1000L));
+    PAssert.thatSingleton(rows.apply("Count All", Count.globally())).isEqualTo(1000L);
+    pipeline.run();
+  }
+
+  @Test
+  public void testReadRowsPartitionsIfNumPartitionsIsZero() {
+    thrown.expect(IllegalArgumentException.class);
+    thrown.expectMessage("numPartitions can not be less than 1");
+    pipeline.apply(
+        JdbcIO.readRowsWithPartitions()
+            .withDataSourceConfiguration(DATA_SOURCE_CONFIGURATION)
+            .withTable(READ_TABLE_NAME)
+            .withNumPartitions(0)
+            .withPartitionColumn("id")
+            .withLowerBound(0L)
+            .withUpperBound(1000L));
+    pipeline.run();
+  }
+
+  @Test
+  public void testReadRowsPartitionsLowerBoundIsMoreThanUpperBound() {

Review Comment:
   Can we also the following tests:
   1) test a null partition column
   2) null table name



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


Re: [PR] Feature: Yaml JdbcIO partitioning for ReadRows [beam]

Posted by "svetakvsundhar (via GitHub)" <gi...@apache.org>.
svetakvsundhar commented on PR #34393:
URL: https://github.com/apache/beam/pull/34393#issuecomment-2746509666

   We will also want to add an integration test [here](https://github.com/apache/beam/blob/3595a3303df6d2e4c8e77482ca8120994d0d5881/sdks/java/io/jdbc/src/test/java/org/apache/beam/sdk/io/jdbc/JdbcIOIT.java#L235), testing the newly added partitioning property. 


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