Skip to content

Commit 32f18c4

Browse files
committed
Fix explain IT
Signed-off-by: Lantao Jin <ltjin@amazon.com>
1 parent b5189e4 commit 32f18c4

1 file changed

Lines changed: 14 additions & 2 deletions

File tree

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

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,15 +44,27 @@ public void testExplainCommand() throws IOException {
4444
}
4545

4646
@Test
47-
public void testExplainCommandExtended() throws IOException {
47+
public void testExplainCommandExtendedWithCodegen() throws IOException {
4848
var result =
49-
executeWithReplace("explain extended source=test | where age = 20 | fields name, age");
49+
executeWithReplace(
50+
"explain extended source=test | where age = 20 | join left=l right=r on l.age=r.age"
51+
+ " test");
5052
assertTrue(
5153
result.contains(
5254
"public org.apache.calcite.linq4j.Enumerable bind(final"
5355
+ " org.apache.calcite.DataContext root)"));
5456
}
5557

58+
@Test
59+
public void testExplainCommandExtendedWithoutCodegen() throws IOException {
60+
var result =
61+
executeWithReplace("explain extended source=test | where age = 20 | fields name, age");
62+
assertFalse(
63+
result.contains(
64+
"public org.apache.calcite.linq4j.Enumerable bind(final"
65+
+ " org.apache.calcite.DataContext root)"));
66+
}
67+
5668
@Test
5769
public void testExplainCommandCost() throws IOException {
5870
var result = executeWithReplace("explain cost source=test | where age = 20 | fields name, age");

0 commit comments

Comments
 (0)