Skip to content

Commit 59a3033

Browse files
authored
Skip exponential histogram coalesce tests in release builds (elastic#138272)
1 parent 2584464 commit 59a3033

File tree

1 file changed

+16
-14
lines changed
  • x-pack/plugin/esql/src/test/java/org/elasticsearch/xpack/esql/expression/function/scalar/nulls

1 file changed

+16
-14
lines changed

x-pack/plugin/esql/src/test/java/org/elasticsearch/xpack/esql/expression/function/scalar/nulls/CoalesceTests.java

Lines changed: 16 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
import org.elasticsearch.xpack.esql.core.expression.FoldContext;
2727
import org.elasticsearch.xpack.esql.core.expression.Literal;
2828
import org.elasticsearch.xpack.esql.core.expression.Nullability;
29+
import org.elasticsearch.xpack.esql.core.plugin.EsqlCorePlugin;
2930
import org.elasticsearch.xpack.esql.core.tree.Source;
3031
import org.elasticsearch.xpack.esql.core.type.DataType;
3132
import org.elasticsearch.xpack.esql.core.type.EsField;
@@ -121,20 +122,21 @@ public static Iterable<Object[]> parameters() {
121122
equalTo(firstDate == null ? secondDate : firstDate)
122123
);
123124
}));
124-
noNullsSuppliers.add(new TestCaseSupplier(List.of(DataType.EXPONENTIAL_HISTOGRAM, DataType.EXPONENTIAL_HISTOGRAM), () -> {
125-
ExponentialHistogram firstHisto = randomBoolean() ? null : EsqlTestUtils.randomExponentialHistogram();
126-
ExponentialHistogram secondHisto = EsqlTestUtils.randomExponentialHistogram();
127-
return new TestCaseSupplier.TestCase(
128-
List.of(
129-
new TestCaseSupplier.TypedData(firstHisto, DataType.EXPONENTIAL_HISTOGRAM, "first"),
130-
new TestCaseSupplier.TypedData(secondHisto, DataType.EXPONENTIAL_HISTOGRAM, "second")
131-
),
132-
"CoalesceExponentialHistogramEagerEvaluator[values=[Attribute[channel=0], Attribute[channel=1]]]",
133-
DataType.EXPONENTIAL_HISTOGRAM,
134-
equalTo(firstHisto == null ? secondHisto : firstHisto)
135-
);
136-
}));
137-
125+
if (EsqlCorePlugin.EXPONENTIAL_HISTOGRAM_FEATURE_FLAG.isEnabled()) {
126+
noNullsSuppliers.add(new TestCaseSupplier(List.of(DataType.EXPONENTIAL_HISTOGRAM, DataType.EXPONENTIAL_HISTOGRAM), () -> {
127+
ExponentialHistogram firstHisto = randomBoolean() ? null : EsqlTestUtils.randomExponentialHistogram();
128+
ExponentialHistogram secondHisto = EsqlTestUtils.randomExponentialHistogram();
129+
return new TestCaseSupplier.TestCase(
130+
List.of(
131+
new TestCaseSupplier.TypedData(firstHisto, DataType.EXPONENTIAL_HISTOGRAM, "first"),
132+
new TestCaseSupplier.TypedData(secondHisto, DataType.EXPONENTIAL_HISTOGRAM, "second")
133+
),
134+
"CoalesceExponentialHistogramEagerEvaluator[values=[Attribute[channel=0], Attribute[channel=1]]]",
135+
DataType.EXPONENTIAL_HISTOGRAM,
136+
equalTo(firstHisto == null ? secondHisto : firstHisto)
137+
);
138+
}));
139+
}
138140
List<TestCaseSupplier> suppliers = new ArrayList<>(noNullsSuppliers);
139141
for (TestCaseSupplier s : noNullsSuppliers) {
140142
for (int nullUpTo = 1; nullUpTo < s.types().size(); nullUpTo++) {

0 commit comments

Comments
 (0)