Skip to content

Commit 51bfc1c

Browse files
committed
Remove testExplainPushDownScriptsContainingUDT in v2
Signed-off-by: Yuanchun Shen <yuanchu@amazon.com>
1 parent a0c797d commit 51bfc1c

4 files changed

Lines changed: 20 additions & 87 deletions

File tree

integ-test/src/test/java/org/opensearch/sql/calcite/remote/CalciteExplainIT.java

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
import static org.opensearch.sql.legacy.TestsConstants.TEST_INDEX_LOGS;
1010
import static org.opensearch.sql.legacy.TestsConstants.TEST_INDEX_NESTED_SIMPLE;
1111
import static org.opensearch.sql.legacy.TestsConstants.TEST_INDEX_STRINGS;
12+
import static org.opensearch.sql.legacy.TestsConstants.TEST_INDEX_WEBLOGS;
1213
import static org.opensearch.sql.util.MatcherUtils.assertJsonEqualsIgnoreId;
1314
import static org.opensearch.sql.util.MatcherUtils.assertYamlEqualsJsonIgnoreId;
1415

@@ -686,4 +687,23 @@ public void testStrftimeFunctionExplain() throws IOException {
686687
String expected = loadExpectedPlan("explain_strftime_function.json");
687688
assertJsonEqualsIgnoreId(expected, result);
688689
}
690+
691+
// Script generation is not stable in v2
692+
@Test
693+
public void testExplainPushDownScriptsContainingUDT() throws IOException {
694+
assertJsonEqualsIgnoreId(
695+
loadExpectedPlan("explain_filter_script_ip_push.json"),
696+
explainQueryToString(
697+
String.format(
698+
"source=%s | where cidrmatch(host, '0.0.0.0/24') | fields host",
699+
TEST_INDEX_WEBLOGS)));
700+
701+
assertJsonEqualsIgnoreId(
702+
loadExpectedPlan("explain_agg_script_timestamp_push.json"),
703+
explainQueryToString(
704+
String.format(
705+
"source=%s | eval t = unix_timestamp(birthdate) | stats count() by t | sort t |"
706+
+ " head 3",
707+
TEST_INDEX_BANK)));
708+
}
689709
}

integ-test/src/test/java/org/opensearch/sql/ppl/ExplainIT.java

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -596,25 +596,6 @@ public void testDifferentFilterScriptPushDownBehaviorExplain() throws Exception
596596
}
597597
}
598598

599-
@Test
600-
public void testExplainPushDownScriptsContainingUDT() throws IOException {
601-
602-
assertJsonEqualsIgnoreId(
603-
loadExpectedPlan("explain_filter_script_ip_push.json"),
604-
explainQueryToString(
605-
String.format(
606-
"source=%s | where cidrmatch(host, '0.0.0.0/24') | fields host",
607-
TEST_INDEX_WEBLOGS)));
608-
609-
assertJsonEqualsIgnoreId(
610-
loadExpectedPlan("explain_agg_script_timestamp_push.json"),
611-
explainQueryToString(
612-
String.format(
613-
"source=%s | eval t = unix_timestamp(birthdate) | stats count() by t | sort t |"
614-
+ " head 3",
615-
TEST_INDEX_BANK)));
616-
}
617-
618599
@Test
619600
public void testExplainOnTake() throws IOException {
620601
String expected = loadExpectedPlan("explain_take.json");

integ-test/src/test/resources/expectedOutput/ppl/explain_agg_script_timestamp_push.json

Lines changed: 0 additions & 51 deletions
This file was deleted.

integ-test/src/test/resources/expectedOutput/ppl/explain_filter_script_ip_push.json

Lines changed: 0 additions & 17 deletions
This file was deleted.

0 commit comments

Comments
 (0)