|
26 | 26 | import org.elasticsearch.xpack.esql.core.expression.FoldContext; |
27 | 27 | import org.elasticsearch.xpack.esql.core.expression.Literal; |
28 | 28 | import org.elasticsearch.xpack.esql.core.expression.Nullability; |
| 29 | +import org.elasticsearch.xpack.esql.core.plugin.EsqlCorePlugin; |
29 | 30 | import org.elasticsearch.xpack.esql.core.tree.Source; |
30 | 31 | import org.elasticsearch.xpack.esql.core.type.DataType; |
31 | 32 | import org.elasticsearch.xpack.esql.core.type.EsField; |
@@ -121,20 +122,21 @@ public static Iterable<Object[]> parameters() { |
121 | 122 | equalTo(firstDate == null ? secondDate : firstDate) |
122 | 123 | ); |
123 | 124 | })); |
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 | + } |
138 | 140 | List<TestCaseSupplier> suppliers = new ArrayList<>(noNullsSuppliers); |
139 | 141 | for (TestCaseSupplier s : noNullsSuppliers) { |
140 | 142 | for (int nullUpTo = 1; nullUpTo < s.types().size(); nullUpTo++) { |
|
0 commit comments