Speed up GC of StructStreamReader by clearing member variables in close()
@@ -609,6 +609,15 @@ public class StructSelectiveStreamReader
@Override
public void close()
{
+ nestedReaders.values().stream().forEach(SelectiveStreamReader::close);
+
+ outputPositions = null;
+ nulls = null;
+ nestedOutputPositions = null;
+ nestedPositions = null;
+
+ presentStream = null;
+ presentStreamSource = null;
systemMemoryContext.close();
}
@@ -750,6 +759,7 @@ public class StructSelectiveStreamReader
@Override
public void close()
{
+ outputPositions = null;
}
@Override
