@@ -43,7 +43,6 @@ public void testExplain() throws IOException {
4343 @ Test
4444 public void testFilterPushDownExplain () throws IOException {
4545 String expected = loadExpectedPlan ("explain_filter_push.json" );
46-
4746 assertJsonEqualsIgnoreId (
4847 expected ,
4948 explainQueryToString (
@@ -56,12 +55,7 @@ public void testFilterPushDownExplain() throws IOException {
5655
5756 @ Test
5857 public void testFilterByCompareStringTimestampPushDownExplain () throws IOException {
59- String expected =
60- isCalciteEnabled ()
61- ? loadFromFile (
62- "expectedOutput/calcite/explain_filter_push_compare_timestamp_string.json" )
63- : loadFromFile ("expectedOutput/ppl/explain_filter_push_compare_timestamp_string.json" );
64-
58+ String expected = loadExpectedPlan ("explain_filter_push_compare_timestamp_string.json" );
6559 assertJsonEqualsIgnoreId (
6660 expected ,
6761 explainQueryToString (
@@ -72,11 +66,7 @@ public void testFilterByCompareStringTimestampPushDownExplain() throws IOExcepti
7266
7367 @ Test
7468 public void testFilterByCompareStringDatePushDownExplain () throws IOException {
75- String expected =
76- isCalciteEnabled ()
77- ? loadFromFile ("expectedOutput/calcite/explain_filter_push_compare_date_string.json" )
78- : loadFromFile ("expectedOutput/ppl/explain_filter_push_compare_date_string.json" );
79-
69+ String expected = loadExpectedPlan ("explain_filter_push_compare_date_string.json" );
8070 assertJsonEqualsIgnoreId (
8171 expected ,
8272 explainQueryToString (
@@ -87,11 +77,7 @@ public void testFilterByCompareStringDatePushDownExplain() throws IOException {
8777
8878 @ Test
8979 public void testFilterByCompareStringTimePushDownExplain () throws IOException {
90- String expected =
91- isCalciteEnabled ()
92- ? loadFromFile ("expectedOutput/calcite/explain_filter_push_compare_time_string.json" )
93- : loadFromFile ("expectedOutput/ppl/explain_filter_push_compare_time_string.json" );
94-
80+ String expected = loadExpectedPlan ("explain_filter_push_compare_time_string.json" );
9581 assertJsonEqualsIgnoreId (
9682 expected ,
9783 explainQueryToString (
@@ -103,7 +89,6 @@ public void testFilterByCompareStringTimePushDownExplain() throws IOException {
10389 @ Test
10490 public void testFilterAndAggPushDownExplain () throws IOException {
10591 String expected = loadExpectedPlan ("explain_filter_agg_push.json" );
106-
10792 assertJsonEqualsIgnoreId (
10893 expected ,
10994 explainQueryToString (
@@ -115,7 +100,6 @@ public void testFilterAndAggPushDownExplain() throws IOException {
115100 @ Test
116101 public void testSortPushDownExplain () throws IOException {
117102 String expected = loadExpectedPlan ("explain_sort_push.json" );
118-
119103 assertJsonEqualsIgnoreId (
120104 expected ,
121105 explainQueryToString (
@@ -217,7 +201,6 @@ public void testLimitThenSortExplain() throws IOException {
217201 @ Test
218202 public void testLimitPushDownExplain () throws IOException {
219203 String expected = loadExpectedPlan ("explain_limit_push.json" );
220-
221204 assertJsonEqualsIgnoreId (
222205 expected ,
223206 explainQueryToString (
@@ -294,7 +277,6 @@ public void testMultipleLimitExplain() throws IOException {
294277 @ Test
295278 public void testLimitWithMultipleOffsetPushdownExplain () throws IOException {
296279 String expected = loadExpectedPlan ("explain_limit_offsets_push.json" );
297-
298280 assertJsonEqualsIgnoreId (
299281 expected ,
300282 explainQueryToString (
@@ -307,7 +289,6 @@ public void testLimitWithMultipleOffsetPushdownExplain() throws IOException {
307289 @ Test
308290 public void testFillNullPushDownExplain () throws IOException {
309291 String expected = loadExpectedPlan ("explain_fillnull_push.json" );
310-
311292 assertJsonEqualsIgnoreId (
312293 expected ,
313294 explainQueryToString (
@@ -318,7 +299,6 @@ public void testFillNullPushDownExplain() throws IOException {
318299 @ Test
319300 public void testTrendlinePushDownExplain () throws IOException {
320301 String expected = loadExpectedPlan ("explain_trendline_push.json" );
321-
322302 assertJsonEqualsIgnoreId (
323303 expected ,
324304 explainQueryToString (
@@ -331,7 +311,6 @@ public void testTrendlinePushDownExplain() throws IOException {
331311 @ Test
332312 public void testTrendlineWithSortPushDownExplain () throws IOException {
333313 String expected = loadExpectedPlan ("explain_trendline_sort_push.json" );
334-
335314 // Sort will not be pushed down because there's a head before it.
336315 assertJsonEqualsIgnoreId (
337316 expected ,
@@ -358,7 +337,6 @@ public void testExplainModeUnsupportedInV2() throws IOException {
358337 public void testPatternsSimplePatternMethodWithoutAggExplain () throws IOException {
359338 // TODO: Correct calcite expected result once pushdown is supported
360339 String expected = loadExpectedPlan ("explain_patterns_simple_pattern.json" );
361-
362340 assertJsonEqualsIgnoreId (
363341 expected ,
364342 explainQueryToString ("source=opensearch-sql_test_index_account | patterns email" ));
@@ -368,7 +346,6 @@ public void testPatternsSimplePatternMethodWithoutAggExplain() throws IOExceptio
368346 public void testPatternsSimplePatternMethodWithAggPushDownExplain () throws IOException {
369347 // TODO: Correct calcite expected result once pushdown is supported
370348 String expected = loadExpectedPlan ("explain_patterns_simple_pattern_agg_push.json" );
371-
372349 assertJsonEqualsIgnoreId (
373350 expected ,
374351 explainQueryToString (
@@ -379,7 +356,6 @@ public void testPatternsSimplePatternMethodWithAggPushDownExplain() throws IOExc
379356 public void testPatternsBrainMethodWithAggPushDownExplain () throws IOException {
380357 // TODO: Correct calcite expected result once pushdown is supported
381358 String expected = loadExpectedPlan ("explain_patterns_brain_agg_push.json" );
382-
383359 assertJsonEqualsIgnoreId (
384360 expected ,
385361 explainQueryToString (
@@ -389,11 +365,7 @@ public void testPatternsBrainMethodWithAggPushDownExplain() throws IOException {
389365
390366 @ Test
391367 public void testStatsBySpan () throws IOException {
392- String expected =
393- isCalciteEnabled ()
394- ? loadFromFile ("expectedOutput/calcite/explain_stats_by_span.json" )
395- : loadFromFile ("expectedOutput/ppl/explain_stats_by_span.json" );
396-
368+ String expected = loadExpectedPlan ("explain_stats_by_span.json" );
397369 assertJsonEqualsIgnoreId (
398370 expected ,
399371 explainQueryToString (
@@ -402,21 +374,13 @@ public void testStatsBySpan() throws IOException {
402374
403375 @ Test
404376 public void testStatsByTimeSpan () throws IOException {
405- String expected =
406- isCalciteEnabled ()
407- ? loadFromFile ("expectedOutput/calcite/explain_stats_by_timespan.json" )
408- : loadFromFile ("expectedOutput/ppl/explain_stats_by_timespan.json" );
409-
377+ String expected = loadExpectedPlan ("explain_stats_by_timespan.json" );
410378 assertJsonEqualsIgnoreId (
411379 expected ,
412380 explainQueryToString (
413381 String .format ("source=%s | stats count() by span(birthdate,1m)" , TEST_INDEX_BANK )));
414382
415- expected =
416- isCalciteEnabled ()
417- ? loadFromFile ("expectedOutput/calcite/explain_stats_by_timespan2.json" )
418- : loadFromFile ("expectedOutput/ppl/explain_stats_by_timespan2.json" );
419-
383+ expected = loadExpectedPlan ("explain_stats_by_timespan2.json" );
420384 assertJsonEqualsIgnoreId (
421385 expected ,
422386 explainQueryToString (
0 commit comments