Github user denalex commented on a diff in the pull request:

    https://github.com/apache/hawq/pull/1353#discussion_r214526070
  
    --- 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 --
    
    @kapustor -- agree, limiting max is superficial, as with a given memory 
there might be a value below max that would cause OOM and there is no other 
reasons to limit the max. So, let's not limit the max and just use a value 
provided by the user.


---

Reply via email to