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

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

                Author: ASF GitHub Bot
            Created on: 04/Nov/21 00:36
            Start Date: 04/Nov/21 00:36
    Worklog Time Spent: 10m 
      Work Description: pabloem commented on a change in pull request #15862:
URL: https://github.com/apache/beam/pull/15862#discussion_r742228340



##########
File path: 
sdks/java/io/jdbc/src/main/java/org/apache/beam/sdk/io/jdbc/JdbcIO.java
##########
@@ -2122,4 +1912,242 @@ public void populateDisplayData(DisplayData.Builder 
builder) {
       config.populateDisplayData(builder);
     }
   }
+
+  /**
+   * {@link DoFn} class to write results data to a JDBC sink. It supports 
writing rows one by one
+   * (and returning individual results) - or by batch.
+   *
+   * @param <T>
+   * @param <V>
+   */
+  static class WriteFn<T, V> extends DoFn<T, V> {
+
+    @AutoValue
+    public abstract static class WriteFnSpec<T, V> implements Serializable, 
HasDisplayData {

Review comment:
       I've made all of these not public. Thanks Alexey!

##########
File path: 
sdks/java/io/jdbc/src/main/java/org/apache/beam/sdk/io/jdbc/JdbcIO.java
##########
@@ -2122,4 +1912,242 @@ public void populateDisplayData(DisplayData.Builder 
builder) {
       config.populateDisplayData(builder);
     }
   }
+
+  /**
+   * {@link DoFn} class to write results data to a JDBC sink. It supports 
writing rows one by one
+   * (and returning individual results) - or by batch.
+   *
+   * @param <T>
+   * @param <V>
+   */
+  static class WriteFn<T, V> extends DoFn<T, V> {

Review comment:
       `AutoValue` requires that the enclosing class of the AutoValue class not 
be private, so I couldn't make this class private. However this class will be 
package private, so that should be pretty good right? : )

##########
File path: 
sdks/java/io/jdbc/src/main/java/org/apache/beam/sdk/io/jdbc/JdbcIO.java
##########
@@ -2122,4 +1912,242 @@ public void populateDisplayData(DisplayData.Builder 
builder) {
       config.populateDisplayData(builder);
     }
   }
+
+  /**
+   * {@link DoFn} class to write results data to a JDBC sink. It supports 
writing rows one by one
+   * (and returning individual results) - or by batch.
+   *
+   * @param <T>
+   * @param <V>
+   */
+  static class WriteFn<T, V> extends DoFn<T, V> {
+
+    @AutoValue
+    public abstract static class WriteFnSpec<T, V> implements Serializable, 
HasDisplayData {

Review comment:
       I've made all of these not public. Thanks Alexey!

##########
File path: 
sdks/java/io/jdbc/src/main/java/org/apache/beam/sdk/io/jdbc/JdbcIO.java
##########
@@ -2122,4 +1912,242 @@ public void populateDisplayData(DisplayData.Builder 
builder) {
       config.populateDisplayData(builder);
     }
   }
+
+  /**
+   * {@link DoFn} class to write results data to a JDBC sink. It supports 
writing rows one by one
+   * (and returning individual results) - or by batch.
+   *
+   * @param <T>
+   * @param <V>
+   */
+  static class WriteFn<T, V> extends DoFn<T, V> {

Review comment:
       `AutoValue` requires that the enclosing class of the AutoValue class not 
be private, so I couldn't make this class private. However this class will be 
package private, so that should be pretty good right? : )




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


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

    Worklog Id:     (was: 675283)
    Time Spent: 2h 10m  (was: 2h)

> Significant code duplication between WriteFn and WriteWithResultsFn
> -------------------------------------------------------------------
>
>                 Key: BEAM-13165
>                 URL: https://issues.apache.org/jira/browse/BEAM-13165
>             Project: Beam
>          Issue Type: Task
>          Components: io-java-jdbc
>            Reporter: Pablo Estrada
>            Assignee: Pablo Estrada
>            Priority: P2
>          Time Spent: 2h 10m
>  Remaining Estimate: 0h
>




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

Reply via email to