Github user leskin-in commented on a diff in the pull request:
https://github.com/apache/incubator-hawq/pull/1353#discussion_r214428410
--- Diff:
pxf/pxf-jdbc/src/main/java/org/apache/hawq/pxf/plugins/jdbc/writercallable/WriterCallableFactory.java
---
@@ -75,16 +75,15 @@ public void setQuery(String query) {
/**
* Set batch size to use.
*
- * @param batchSize < 0: Use batches of infinite size
+ * @param batchSize = 0: Use batches of recommended size
* @param batchSize = 1: Do not use batches
* @param batchSize > 1: Use batches of the given size
+ * @param batchSize < 0: Use batches of infinite size
*/
public void setBatchSize(int batchSize) {
- if (batchSize < 0) {
- batchSize = 0;
- }
- else if (batchSize == 0) {
- batchSize = 1;
+ if (batchSize == 0) {
+ // Set the recommended value:
https://docs.oracle.com/cd/E11882_01/java.112/e16548/oraperf.htm#JJDBC28754
+ batchSize = 100;
--- End diff --
This makes sense.
Do you propose to use batches by default? Currently, `BATCH_SIZE` controls
not only the size of a batch, but also whether it is used or not.
Also, if we allow user not to use batches, we should make `1` (or some
other value) a valid `BATCH_SIZE`.
---