damccorm opened a new issue, #21576:
URL: https://github.com/apache/beam/issues/21576

   WriteWithResult  [1] in org.apache.beam.sdk.io.jdbc.JdbcIO [2] works in 
different way than expected. Difference lies in implementation of approach to 
row mappers in WriteFn and way how processRecord method works [3]. Current 
implementation left for developer responsibility for processing returned result 
set from write operation when result can be empty, one or many. Instead result 
should be iterated when next value is available, like for ReadFn [4]. Issue 
exists since improvement: https://issues.apache.org/jira/browse/BEAM-11873 
   In the attachment diff with possible solution.
   
   [1]: 
[https://github.com/apache/beam/blob/8d3b4bbaa942d62ac16b7ca7ff8858e102497b46/sdks/java/io/jdbc/src/main/java/org/apache/beam/sdk/io/jdbc/JdbcIO.java#L1551](https://github.com/apache/beam/blob/8d3b4bbaa942d62ac16b7ca7ff8858e102497b46/sdks/java/io/jdbc/src/main/java/org/apache/beam/sdk/io/jdbc/JdbcIO.java#L1551)
 
   
   [2]: 
[https://github.com/apache/beam/blob/master/sdks/java/io/jdbc/src/main/java/org/apache/beam/sdk/io/jdbc/JdbcIO.java](https://github.com/apache/beam/blob/master/sdks/java/io/jdbc/src/main/java/org/apache/beam/sdk/io/jdbc/JdbcIO.java)
 
   
   [3]: 
[https://github.com/apache/beam/blob/8d3b4bbaa942d62ac16b7ca7ff8858e102497b46/sdks/java/io/jdbc/src/main/java/org/apache/beam/sdk/io/jdbc/JdbcIO.java#L2407-L2423](https://github.com/apache/beam/blob/8d3b4bbaa942d62ac16b7ca7ff8858e102497b46/sdks/java/io/jdbc/src/main/java/org/apache/beam/sdk/io/jdbc/JdbcIO.java#L2407-L2423)
 
   
   [4]: 
[https://github.com/apache/beam/blob/8d3b4bbaa942d62ac16b7ca7ff8858e102497b46/sdks/java/io/jdbc/src/main/java/org/apache/beam/sdk/io/jdbc/JdbcIO.java#L1370-L1373](https://github.com/apache/beam/blob/8d3b4bbaa942d62ac16b7ca7ff8858e102497b46/sdks/java/io/jdbc/src/main/java/org/apache/beam/sdk/io/jdbc/JdbcIO.java#L1370-L1373)
 
   
    
   
   Imported from Jira 
[BEAM-14432](https://issues.apache.org/jira/browse/BEAM-14432). Original Jira 
may contain additional context.
   Reported by: damian_jsck.


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

Reply via email to