Github user selvaganesang commented on a diff in the pull request:
https://github.com/apache/trafodion/pull/1694#discussion_r209965872
--- 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 --
Server side is supposed to limit the size both at compile and run-time. Do
you mean that limitation didn't kick in
---