Skip to content

Commit 771b658

Browse files
committed
Drop empty _source excludes from top_hits test fixtures
OpenSearch 3.7's FetchSourceContext no longer emits "excludes":[] when empty. Update the two top_hits assertions in MetricAggregationBuilderTest to match the new serialization. Signed-off-by: Kai Huang <ahkcs@amazon.com>
1 parent bffe5b2 commit 771b658

1 file changed

Lines changed: 2 additions & 4 deletions

File tree

opensearch/src/test/java/org/opensearch/sql/opensearch/storage/script/aggregation/dsl/MetricAggregationBuilderTest.java

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -410,8 +410,7 @@ void should_build_top_hits_aggregation() {
410410
+ " \"seq_no_primary_term\" : false,%n"
411411
+ " \"explain\" : false,%n"
412412
+ " \"_source\" : {%n"
413-
+ " \"includes\" : [ \"name\" ],%n"
414-
+ " \"excludes\" : [ ]%n"
413+
+ " \"includes\" : [ \"name\" ]%n"
415414
+ " }%n"
416415
+ " }%n"
417416
+ " }%n"
@@ -450,8 +449,7 @@ void should_build_filtered_top_hits_aggregation() {
450449
+ " \"seq_no_primary_term\" : false,%n"
451450
+ " \"explain\" : false,%n"
452451
+ " \"_source\" : {%n"
453-
+ " \"includes\" : [ \"name\" ],%n"
454-
+ " \"excludes\" : [ ]%n"
452+
+ " \"includes\" : [ \"name\" ]%n"
455453
+ " }%n"
456454
+ " }%n"
457455
+ " }%n"

0 commit comments

Comments
 (0)