wuchong commented on a change in pull request #13570:
URL: https://github.com/apache/flink/pull/13570#discussion_r502756591



##########
File path: docs/dev/table/connectors/jdbc.md
##########
@@ -183,7 +183,14 @@ Connector Options
       <td style="word-wrap: break-word;">0</td>
       <td>Integer</td>
       <td>The number of rows that should be fetched from the database when 
reading per round trip. If the value specified is zero, then the hint is 
ignored.</td>
-    </tr>     
+    </tr>
+    <tr>
+      <td><h5>scan.auto-commit</h5></td>
+      <td>optional</td>
+      <td style="word-wrap: break-word;">(none)</td>
+      <td>Boolean</td>
+      <td>Sets the auto commit flag on the JDBC driver.</td>

Review comment:
       Maybe it would be better to have a link to explain what is the auto 
commit? For example: 
https://docs.oracle.com/javase/tutorial/jdbc/basics/transactions.html#commit_transactions?
 
   
   However the above link only explains the behavior for DMLs, maybe some 
explanation for what it is used for scan would be better. 

##########
File path: 
flink-connectors/flink-connector-jdbc/src/main/java/org/apache/flink/connector/jdbc/table/JdbcDynamicTableFactory.java
##########
@@ -109,6 +109,11 @@
                .withDescription("gives the reader a hint as to the number of 
rows that should be fetched, from" +
                        " the database when reading per round trip. If the 
value specified is zero, then the hint is ignored. The" +
                        " default value is zero.");
+       private static final ConfigOption<Boolean> SCAN_AUTO_COMMIT = 
ConfigOptions
+               .key("scan.auto-commit")
+               .booleanType()
+               .noDefaultValue()

Review comment:
       I think auto commit mode is not a three-valued (`true`, `false`, 
`null`), it should be either enabled or disabled. Besides, it should be enabled 
by default, because this is the default behavior of JDBC. 
   
   So what about changing the default value to `true` and also update the 
member virables from `Boolean` to primitive `boolean`?




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

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to