claudevdm commented on issue #34349:
URL: https://github.com/apache/beam/issues/34349#issuecomment-2748850087

   ReadRows and ReadWithPartitions have incompatible parameters:
   1. ReadRows allows user to give a query and statementPreparator
   2. ReadWithPartition only allows a table. I think this can techically be a 
subquery that evaluates as a table
   
   It could get messy to add partition support to ReadRows for this reason, so 
I think the simplest way forward here is:
   1. Do not make any changes to JdbcIO
   2. Complete tasks (3) and (4) from this issue summary
   3. Add a condition in 
https://github.com/Polber/beam/blob/7c86bf3103fec1d3a6a3a3cbe6ace8a14a85b723/sdks/java/io/jdbc/src/main/java/org/apache/beam/sdk/io/jdbc/JdbcReadSchemaTransformProvider.java#L110
 where we use ReadRows if there is no partition column argument, otherwise use 
ReadWithPartition.withRowOutput similar to what is done here 
https://github.com/Polber/beam/blob/7c86bf3103fec1d3a6a3a3cbe6ace8a14a85b723/sdks/java/io/jdbc/src/main/java/org/apache/beam/sdk/io/jdbc/JdbcSchemaIOProvider.java#L128
   4. Throw a validation error if the user specifys a query AND partition 
parameters, since reading with partitions only supports table argument
   
   @damccorm does this sound good?
   
    


-- 
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-unsubscr...@beam.apache.org

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

Reply via email to