1
0
Эх сурвалжийг харах

ESQL: Improve block closing in tests

Costin Leau 2 жил өмнө
parent
commit
4475fddbf7

+ 2 - 1
x-pack/plugin/esql/compute/src/test/java/org/elasticsearch/compute/operator/ProjectOperatorTests.java

@@ -74,8 +74,9 @@ public class ProjectOperatorTests extends OperatorTestCase {
         for (int i = 0; i < out.getBlockCount(); i++) {
         for (int i = 0; i < out.getBlockCount(); i++) {
             var block = out.<IntBlock>getBlock(i);
             var block = out.<IntBlock>getBlock(i);
             assertEquals(block, page.getBlock(randomProjection.get(i)));
             assertEquals(block, page.getBlock(randomProjection.get(i)));
-            block.close();
         }
         }
+        // close all blocks separately since the same block can be used by multiple columns (aliased)
+        out.releaseBlocks();
     }
     }
 
 
     private List<Integer> randomProjection(int size) {
     private List<Integer> randomProjection(int size) {