File tree Expand file tree Collapse file tree 2 files changed +7
-19
lines changed
x-pack/plugin/esql/compute/src/test/java/org/elasticsearch/compute/data Expand file tree Collapse file tree 2 files changed +7
-19
lines changed Original file line number Diff line number Diff line change @@ -495,24 +495,9 @@ tests:
495495- class : org.elasticsearch.xpack.esql.action.CrossClusterAsyncQueryStopIT
496496 method : testStopQueryLocal
497497 issue : https://github.com/elastic/elasticsearch/issues/133481
498- - class : org.elasticsearch.compute.data.BasicBlockTests
499- method : testIntBlock
500- issue : https://github.com/elastic/elasticsearch/issues/133596
501- - class : org.elasticsearch.compute.data.BasicBlockTests
502- method : testDoubleBlock
503- issue : https://github.com/elastic/elasticsearch/issues/133606
504- - class : org.elasticsearch.compute.data.BasicBlockTests
505- method : testBooleanBlock
506- issue : https://github.com/elastic/elasticsearch/issues/133608
507- - class : org.elasticsearch.compute.data.BasicBlockTests
508- method : testLongBlock
509- issue : https://github.com/elastic/elasticsearch/issues/133618
510498- class : org.elasticsearch.xpack.esql.inference.rerank.RerankOperatorTests
511499 method : testSimpleCircuitBreaking
512500 issue : https://github.com/elastic/elasticsearch/issues/133619
513- - class : org.elasticsearch.compute.data.BasicBlockTests
514- method : testFloatBlock
515- issue : https://github.com/elastic/elasticsearch/issues/133621
516501- class : org.elasticsearch.xpack.esql.qa.single_node.GenerativeIT
517502 method : test
518503 issue : https://github.com/elastic/elasticsearch/issues/133077
Original file line number Diff line number Diff line change @@ -1784,10 +1784,13 @@ public static Block assertDeepCopy(Block block) {
17841784 try (Block deepCopy = block .deepCopy (into )) {
17851785 assertThat (deepCopy , equalTo (block ));
17861786
1787- assertThat (
1788- deepCopy .asVector () != null && deepCopy .asVector ().isConstant (),
1789- equalTo (block .asVector () != null && block .asVector ().isConstant ())
1790- );
1787+ if (block .asVector () != null && block .asVector ().isConstant ()) {
1788+ /*
1789+ * If we were a constant, we will still be one. If we were not a constant,
1790+ * deepCopy might make a constant in the rare case that we have a single element array.
1791+ */
1792+ assertThat (deepCopy .asVector () != null && deepCopy .asVector ().isConstant (), equalTo (true ));
1793+ }
17911794 }
17921795 Block untracked = block .deepCopy (TestBlockFactory .getNonBreakingInstance ());
17931796 assertThat (untracked , equalTo (block ));
You can’t perform that action at this time.
0 commit comments