This is an automated email from the ASF dual-hosted git repository. hxd pushed a commit to branch testcontainer in repository https://gitbox.apache.org/repos/asf/iotdb.git
commit bd98a454a78f81a9ff9e836604e1706f29e2eb88 Author: Steve Yurong Su <[email protected]> AuthorDate: Fri Apr 16 16:50:07 2021 +0800 fix issue iotdb-1219 (#3020) --- .../datastructure/row/ElasticSerializableRowRecordList.java | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/server/src/main/java/org/apache/iotdb/db/query/udf/datastructure/row/ElasticSerializableRowRecordList.java b/server/src/main/java/org/apache/iotdb/db/query/udf/datastructure/row/ElasticSerializableRowRecordList.java index a034abd..910c842 100644 --- a/server/src/main/java/org/apache/iotdb/db/query/udf/datastructure/row/ElasticSerializableRowRecordList.java +++ b/server/src/main/java/org/apache/iotdb/db/query/udf/datastructure/row/ElasticSerializableRowRecordList.java @@ -136,11 +136,16 @@ public class ElasticSerializableRowRecordList { if (!disableMemoryControl) { totalByteArrayLengthLimit += (long) indexListOfTextFields.length * byteArrayLengthForMemoryControl; - for (int indexListOfTextField : indexListOfTextFields) { - Binary binary = (Binary) rowRecord[indexListOfTextField]; - totalByteArrayLength += binary == null ? 0 : binary.getLength(); + + if (rowRecord == null) { + totalByteArrayLength += indexListOfTextFields.length * byteArrayLengthForMemoryControl; + } else { + for (int indexListOfTextField : indexListOfTextFields) { + Binary binary = (Binary) rowRecord[indexListOfTextField]; + totalByteArrayLength += binary == null ? 0 : binary.getLength(); + } + checkMemoryUsage(); } - checkMemoryUsage(); } }
