morningman commented on code in PR #58224:
URL: https://github.com/apache/doris/pull/58224#discussion_r2552574343
##########
fe/be-java-extensions/iceberg-metadata-scanner/src/main/java/org/apache/doris/iceberg/IcebergSysTableJniScanner.java:
##########
@@ -105,24 +105,29 @@ private void nextScanTask() throws IOException {
@Override
protected int getNext() throws IOException {
try (ThreadClassLoaderContext ignored = new
ThreadClassLoaderContext(classLoader)) {
- int rows = 0;
- while (rows < getBatchSize()) {
+
+ List<StructLike> records = new ArrayList<>();
+ while (records.size() < getBatchSize()) {
while (!reader.hasNext() && scanTasks.hasNext()) {
nextScanTask();
}
if (!reader.hasNext()) {
break;
}
- StructLike row = reader.next();
+ records.add(reader.next());
Review Comment:
May this consume more memory? Cause we have to save all records before doing
the append?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]