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

    https://github.com/apache/trafodion/pull/1694#discussion_r210374167
  
    --- Diff: 
core/conn/jdbcT4/src/main/java/org/trafodion/jdbc/t4/TrafT4ResultSet.java ---
    @@ -2779,6 +2779,19 @@ public boolean next() throws SQLException {
                                        maxRowCnt = maxRows - totalRowsFetched_;
                                }
     
    +        // if (row width) * (fetch rows) too large, there will have core 
in server side.
    +        // once fetch bytes bigger than 1GB, devide several times to fetch,
    +        // each time fetch bytes less than 1GB.
    +        if (outputDesc_ != null && outputDesc_[0] != null) {
    +          long rowLength = outputDesc_[0].rowLength_;
    +          long oneGB = 1024 * 1024 * 1024;
    +          if (rowLength * maxRowCnt >= oneGB) {
    +            double multi = (rowLength * maxRowCnt) / (double)oneGB;
    +            multi = Math.ceil(multi); // devide several times to fetch
    +            maxRowCnt = (int) (maxRowCnt / multi);
    +          }
    +        }
    +
    --- End diff --
    
    In that case, similar issue will be seen with ODBC application and Type 2 
driver applications.
    
    It looks like the cqd MEMORY_LIMIT_ROWSET_IN_MB limits the rowset size 
during compile time, but doesn't limit the rowset size during run-time. It is 
possible to change the rowset size during run-time without specifying it during 
compile time. In that case, it would be good if we use the same CQD value to 
limit it during run-time too.


---

Reply via email to