File tree Expand file tree Collapse file tree 2 files changed +18
-8
lines changed
x-pack/plugin/esql/src/test/java/org/elasticsearch/xpack/esql/expression/function/aggregate Expand file tree Collapse file tree 2 files changed +18
-8
lines changed Original file line number Diff line number Diff line change 1111import com .carrotsearch .randomizedtesting .annotations .ParametersFactory ;
1212
1313import org .elasticsearch .xpack .esql .core .expression .Expression ;
14+ import org .elasticsearch .xpack .esql .core .plugin .EsqlCorePlugin ;
1415import org .elasticsearch .xpack .esql .core .tree .Source ;
1516import org .elasticsearch .xpack .esql .core .type .DataType ;
1617import org .elasticsearch .xpack .esql .expression .function .AbstractAggregationTestCase ;
@@ -61,7 +62,7 @@ public static Iterable<Object[]> parameters() {
6162 ).flatMap (List ::stream ).map (AbsentTests ::makeSupplier ).collect (Collectors .toCollection (() -> suppliers ));
6263
6364 // No rows
64- for ( var dataType : List .of (
65+ List < DataType > types = List .of (
6566 DataType .AGGREGATE_METRIC_DOUBLE ,
6667 DataType .BOOLEAN ,
6768 DataType .CARTESIAN_POINT ,
@@ -78,9 +79,13 @@ public static Iterable<Object[]> parameters() {
7879 DataType .LONG ,
7980 DataType .TEXT ,
8081 DataType .UNSIGNED_LONG ,
81- DataType .VERSION ,
82- DataType .EXPONENTIAL_HISTOGRAM
83- )) {
82+ DataType .VERSION
83+ );
84+ if (EsqlCorePlugin .EXPONENTIAL_HISTOGRAM_FEATURE_FLAG .isEnabled ()) {
85+ types = new ArrayList <>(types );
86+ types .add (DataType .EXPONENTIAL_HISTOGRAM );
87+ }
88+ for (var dataType : types ) {
8489 suppliers .add (
8590 new TestCaseSupplier (
8691 "No rows (" + dataType + ")" ,
Original file line number Diff line number Diff line change 1111import com .carrotsearch .randomizedtesting .annotations .ParametersFactory ;
1212
1313import org .elasticsearch .xpack .esql .core .expression .Expression ;
14+ import org .elasticsearch .xpack .esql .core .plugin .EsqlCorePlugin ;
1415import org .elasticsearch .xpack .esql .core .tree .Source ;
1516import org .elasticsearch .xpack .esql .core .type .DataType ;
1617import org .elasticsearch .xpack .esql .expression .function .AbstractAggregationTestCase ;
@@ -61,7 +62,7 @@ public static Iterable<Object[]> parameters() {
6162 ).flatMap (List ::stream ).map (PresentTests ::makeSupplier ).collect (Collectors .toCollection (() -> suppliers ));
6263
6364 // No rows
64- for ( var dataType : List .of (
65+ List < DataType > types = List .of (
6566 DataType .AGGREGATE_METRIC_DOUBLE ,
6667 DataType .BOOLEAN ,
6768 DataType .CARTESIAN_POINT ,
@@ -78,9 +79,13 @@ public static Iterable<Object[]> parameters() {
7879 DataType .LONG ,
7980 DataType .TEXT ,
8081 DataType .UNSIGNED_LONG ,
81- DataType .VERSION ,
82- DataType .EXPONENTIAL_HISTOGRAM
83- )) {
82+ DataType .VERSION
83+ );
84+ if (EsqlCorePlugin .EXPONENTIAL_HISTOGRAM_FEATURE_FLAG .isEnabled ()) {
85+ types = new ArrayList <>(types );
86+ types .add (DataType .EXPONENTIAL_HISTOGRAM );
87+ }
88+ for (var dataType : types ) {
8489 suppliers .add (
8590 new TestCaseSupplier (
8691 "No rows (" + dataType + ")" ,
You can’t perform that action at this time.
0 commit comments