@@ -270,19 +270,19 @@ public void testExplainWithTimechartAvg() throws IOException {
270270 var result = explainQueryToString ("source=events | timechart span=1m avg(cpu_usage) by host" );
271271 String expected =
272272 !isPushdownDisabled ()
273- ? loadFromFile ("expectedOutput/calcite/explain_timechart.json " )
274- : loadFromFile ("expectedOutput/calcite/explain_timechart_no_pushdown.json " );
275- assertJsonEqualsIgnoreId (expected , result );
273+ ? loadFromFile ("expectedOutput/calcite/explain_timechart.yaml " )
274+ : loadFromFile ("expectedOutput/calcite/explain_timechart_no_pushdown.yaml " );
275+ assertYamlEqualsJsonIgnoreId (expected , result );
276276 }
277277
278278 @ Test
279279 public void testExplainWithTimechartCount () throws IOException {
280280 var result = explainQueryToString ("source=events | timechart span=1m count() by host" );
281281 String expected =
282282 !isPushdownDisabled ()
283- ? loadFromFile ("expectedOutput/calcite/explain_timechart_count.json " )
284- : loadFromFile ("expectedOutput/calcite/explain_timechart_count_no_pushdown.json " );
285- assertJsonEqualsIgnoreId (expected , result );
283+ ? loadFromFile ("expectedOutput/calcite/explain_timechart_count.yaml " )
284+ : loadFromFile ("expectedOutput/calcite/explain_timechart_count_no_pushdown.yaml " );
285+ assertYamlEqualsJsonIgnoreId (expected , result );
286286 }
287287
288288 @ Test
@@ -335,8 +335,8 @@ public void testExplainStatsWithBinsOnTimeField() throws IOException {
335335
336336 @ Test
337337 public void testExplainBinWithSpan () throws IOException {
338- String expected = loadExpectedPlan ("explain_bin_span.json " );
339- assertJsonEqualsIgnoreId (
338+ String expected = loadExpectedPlan ("explain_bin_span.yaml " );
339+ assertYamlEqualsJsonIgnoreId (
340340 expected ,
341341 explainQueryToString (
342342 "source=opensearch-sql_test_index_account | bin age span=10 | head 5" ));
@@ -362,8 +362,8 @@ public void testExplainBinWithStartEnd() throws IOException {
362362
363363 @ Test
364364 public void testExplainBinWithAligntime () throws IOException {
365- String expected = loadExpectedPlan ("explain_bin_aligntime.json " );
366- assertJsonEqualsIgnoreId (
365+ String expected = loadExpectedPlan ("explain_bin_aligntime.yaml " );
366+ assertYamlEqualsJsonIgnoreId (
367367 expected ,
368368 explainQueryToString (
369369 "source=opensearch-sql_test_index_time_data | bin @timestamp span=2h aligntime=latest |"
@@ -413,8 +413,8 @@ public void testEventstatsDistinctCountFunctionExplain() throws IOException {
413413 // Only for Calcite, as v2 gets unstable serialized string for function
414414 @ Test
415415 public void testExplainOnAggregationWithSumEnhancement () throws IOException {
416- String expected = loadExpectedPlan ("explain_agg_with_sum_enhancement.json " );
417- assertJsonEqualsIgnoreId (
416+ String expected = loadExpectedPlan ("explain_agg_with_sum_enhancement.yaml " );
417+ assertYamlEqualsJsonIgnoreId (
418418 expected ,
419419 explainQueryToString (
420420 String .format (
@@ -545,16 +545,16 @@ public void testRegexExplain() throws IOException {
545545 String query =
546546 "source=opensearch-sql_test_index_account | regex lastname='^[A-Z][a-z]+$' | head 5" ;
547547 var result = explainQueryToString (query );
548- String expected = loadExpectedPlan ("explain_regex.json " );
549- assertJsonEqualsIgnoreId (expected , result );
548+ String expected = loadExpectedPlan ("explain_regex.yaml " );
549+ assertYamlEqualsJsonIgnoreId (expected , result );
550550 }
551551
552552 @ Test
553553 public void testRegexNegatedExplain () throws IOException {
554554 String query = "source=opensearch-sql_test_index_account | regex lastname!='.*son$' | head 5" ;
555555 var result = explainQueryToString (query );
556- String expected = loadExpectedPlan ("explain_regex_negated.json " );
557- assertJsonEqualsIgnoreId (expected , result );
556+ String expected = loadExpectedPlan ("explain_regex_negated.yaml " );
557+ assertYamlEqualsJsonIgnoreId (expected , result );
558558 }
559559
560560 @ Test
@@ -581,8 +581,8 @@ public void testRexExplain() throws IOException {
581581 "source=opensearch-sql_test_index_account | rex field=lastname \\ \" (?<initial>^[A-Z])\\ \" |"
582582 + " head 5" ;
583583 var result = explainQueryToString (query );
584- String expected = loadExpectedPlan ("explain_rex.json " );
585- assertJsonEqualsIgnoreId (expected , result );
584+ String expected = loadExpectedPlan ("explain_rex.yaml " );
585+ assertYamlEqualsJsonIgnoreId (expected , result );
586586 }
587587
588588 @ Test
@@ -628,8 +628,8 @@ public void testPushdownLimitIntoAggregation() throws IOException {
628628 expected ,
629629 explainQueryToString ("source=opensearch-sql_test_index_account | stats count() by state" ));
630630
631- expected = loadExpectedPlan ("explain_limit_agg_pushdown2.json " );
632- assertJsonEqualsIgnoreId (
631+ expected = loadExpectedPlan ("explain_limit_agg_pushdown2.yaml " );
632+ assertYamlEqualsJsonIgnoreId (
633633 expected ,
634634 explainQueryToString (
635635 "source=opensearch-sql_test_index_account | stats count() by state | head 100" ));
0 commit comments