Skip to content

Commit 712b896

Browse files
committed
Ignore IP comparison and explain ITs in CalciteNoPushdownIT
Signed-off-by: Yuanchun Shen <yuanchu@amazon.com>
1 parent 9ed10c9 commit 712b896

3 files changed

Lines changed: 22 additions & 12 deletions

File tree

integ-test/src/test/java/org/opensearch/sql/calcite/pushdown/CalciteNoPushdownIT.java

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
package org.opensearch.sql.calcite.pushdown;
99

10-
import org.junit.AfterClass;
10+
import org.junit.After;
1111
import org.junit.BeforeClass;
1212
import org.junit.runner.RunWith;
1313
import org.junit.runners.Suite;
@@ -26,7 +26,8 @@
2626
CalciteDedupCommandIT.class,
2727
CalciteDescribeCommandIT.class,
2828
CalciteExpandCommandIT.class,
29-
CalciteExplainIT.class,
29+
// TODO: Add expected plans for CalciteExplainIT without pushdown
30+
// CalciteExplainIT.class,
3031
CalciteFieldsCommandIT.class,
3132
CalciteFillNullCommandIT.class,
3233
CalciteFlattenCommandIT.class,
@@ -35,7 +36,9 @@
3536
CalciteGeoPointFormatsIT.class,
3637
CalciteHeadCommandIT.class,
3738
CalciteInformationSchemaCommandIT.class,
38-
CalciteIPComparisonIT.class,
39+
// TODO: Enable after implementing comparison for IP addresses with Calcite
40+
// https://github.com/opensearch-project/sql/issues/3776
41+
// CalciteIPComparisonIT.class,
3942
CalciteIPFunctionsIT.class,
4043
CalciteJsonFunctionsIT.class,
4144
CalciteLegacyAPICompatibilityIT.class,
@@ -99,13 +102,16 @@
99102
CalciteWhereCommandIT.class
100103
})
101104
public class CalciteNoPushdownIT {
105+
private static boolean wasPushdownEnabled;
106+
102107
@BeforeClass
103108
public static void disablePushdown() {
109+
wasPushdownEnabled = PPLIntegTestCase.GlobalPushdownConfig.enabled;
104110
PPLIntegTestCase.GlobalPushdownConfig.enabled = false;
105111
}
106112

107-
@AfterClass
108-
public static void enablePushdown() {
109-
PPLIntegTestCase.GlobalPushdownConfig.enabled = true;
113+
@After
114+
public void restorePushdown() {
115+
PPLIntegTestCase.GlobalPushdownConfig.enabled = wasPushdownEnabled;
110116
}
111117
}

integ-test/src/test/java/org/opensearch/sql/calcite/pushdown/CalcitePushdownIT.java

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
package org.opensearch.sql.calcite.pushdown;
99

10-
import org.junit.AfterClass;
10+
import org.junit.After;
1111
import org.junit.BeforeClass;
1212
import org.junit.runner.RunWith;
1313
import org.junit.runners.Suite;
@@ -86,7 +86,6 @@
8686
CalciteRenameCommandIT.class,
8787
CalciteResourceMonitorIT.class,
8888
CalciteSearchCommandIT.class,
89-
CalciteSettingsIT.class,
9089
CalciteShowDataSourcesCommandIT.class,
9190
CalciteSimpleQueryStringIT.class,
9291
CalciteSortCommandIT.class,
@@ -99,13 +98,16 @@
9998
CalciteWhereCommandIT.class
10099
})
101100
public class CalcitePushdownIT {
102-
@AfterClass
103-
public static void disablePushdown() {
104-
PPLIntegTestCase.GlobalPushdownConfig.enabled = false;
105-
}
101+
private static boolean wasPushdownEnabled;
106102

107103
@BeforeClass
108104
public static void enablePushdown() {
105+
wasPushdownEnabled = PPLIntegTestCase.GlobalPushdownConfig.enabled;
109106
PPLIntegTestCase.GlobalPushdownConfig.enabled = true;
110107
}
108+
109+
@After
110+
public void restorePushdown() {
111+
PPLIntegTestCase.GlobalPushdownConfig.enabled = wasPushdownEnabled;
112+
}
111113
}

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@ public class IPComparisonIT extends PPLIntegTestCase {
1919
@Override
2020
public void init() throws Exception {
2121
super.init();
22+
enableCalcite();
23+
disallowCalciteFallback();
2224
loadIndex(SQLIntegTestCase.Index.WEBLOG);
2325
}
2426

0 commit comments

Comments
 (0)