diff --git a/integ-test/src/test/java/org/opensearch/sql/calcite/standalone/CalcitePPLBuiltinFunctionIT.java b/integ-test/src/test/java/org/opensearch/sql/calcite/remote/CalcitePPLBuiltinFunctionIT.java similarity index 87% rename from integ-test/src/test/java/org/opensearch/sql/calcite/standalone/CalcitePPLBuiltinFunctionIT.java rename to integ-test/src/test/java/org/opensearch/sql/calcite/remote/CalcitePPLBuiltinFunctionIT.java index 093a8711a1c..9297dbc4ebe 100644 --- a/integ-test/src/test/java/org/opensearch/sql/calcite/standalone/CalcitePPLBuiltinFunctionIT.java +++ b/integ-test/src/test/java/org/opensearch/sql/calcite/remote/CalcitePPLBuiltinFunctionIT.java @@ -3,7 +3,7 @@ * SPDX-License-Identifier: Apache-2.0 */ -package org.opensearch.sql.calcite.standalone; +package org.opensearch.sql.calcite.remote; import static org.opensearch.sql.legacy.TestsConstants.TEST_INDEX_DATATYPE_NUMERIC; import static org.opensearch.sql.legacy.TestsConstants.TEST_INDEX_DOG; @@ -20,11 +20,15 @@ import java.io.IOException; import org.json.JSONObject; import org.junit.jupiter.api.Test; +import org.opensearch.sql.ppl.PPLIntegTestCase; -public class CalcitePPLBuiltinFunctionIT extends CalcitePPLIntegTestCase { +public class CalcitePPLBuiltinFunctionIT extends PPLIntegTestCase { @Override - public void init() throws IOException { + public void init() throws Exception { super.init(); + enableCalcite(); + disallowCalciteFallback(); + loadIndex(Index.STATE_COUNTRY); loadIndex(Index.DATA_TYPE_NUMERIC); loadIndex(Index.DOG); @@ -32,7 +36,7 @@ public void init() throws IOException { } @Test - public void testSqrtAndCbrtAndPow() { + public void testSqrtAndCbrtAndPow() throws IOException { JSONObject actual = executeQuery( String.format( @@ -45,7 +49,7 @@ public void testSqrtAndCbrtAndPow() { } @Test - public void testSqrtNegativeArgShouldReturnNull() { + public void testSqrtNegativeArgShouldReturnNull() throws IOException { JSONObject actual = executeQuery( String.format( @@ -55,7 +59,7 @@ public void testSqrtNegativeArgShouldReturnNull() { } @Test - public void testSinAndCosAndAsinAndAcos() { + public void testSinAndCosAndAsinAndAcos() throws IOException { JSONObject actual = executeQuery( String.format( @@ -68,7 +72,7 @@ public void testSinAndCosAndAsinAndAcos() { } @Test - public void testAsinAndAcosInvalidArgShouldReturnNull() { + public void testAsinAndAcosInvalidArgShouldReturnNull() throws IOException { JSONObject actual = executeQuery( String.format( @@ -81,7 +85,7 @@ public void testAsinAndAcosInvalidArgShouldReturnNull() { } @Test - public void testAtanAndAtan2WithSort() { + public void testAtanAndAtan2WithSort() throws IOException { JSONObject actual = executeQuery( String.format( @@ -94,7 +98,7 @@ public void testAtanAndAtan2WithSort() { } @Test - public void testTypeOfBasic() { + public void testTypeOfBasic() throws IOException { JSONObject result = executeQuery( String.format( @@ -116,7 +120,7 @@ public void testTypeOfBasic() { result, rows("INT", "BOOLEAN", "DOUBLE", "STRING", "STRING", "STRING", "INT", "INTERVAL")); } - public void testTypeOfDateTime() { + public void testTypeOfDateTime() throws IOException { JSONObject result = executeQuery( String.format( @@ -130,7 +134,7 @@ public void testTypeOfDateTime() { } @Test - public void testCeilingAndFloor() { + public void testCeilingAndFloor() throws IOException { JSONObject actual = executeQuery( String.format( @@ -142,7 +146,7 @@ public void testCeilingAndFloor() { } @Test - public void testConvAndLower() { + public void testConvAndLower() throws IOException { JSONObject actual = executeQuery( String.format( @@ -154,7 +158,7 @@ public void testConvAndLower() { } @Test - public void testConvNegateValue() { + public void testConvNegateValue() throws IOException { JSONObject actual = executeQuery( String.format( @@ -172,8 +176,8 @@ public void testConvNegateValue() { @Test public void testConvWithInvalidRadix() { - Exception invalidRadixException = - assertThrows( + Throwable invalidRadixException = + assertThrowsWithReplace( NumberFormatException.class, () -> executeQuery( @@ -184,7 +188,7 @@ public void testConvWithInvalidRadix() { } @Test - public void testPiAndCot() { + public void testPiAndCot() throws IOException { JSONObject actual = executeQuery( String.format( @@ -196,7 +200,7 @@ public void testPiAndCot() { } @Test - public void testCrc32AndAbs() { + public void testCrc32AndAbs() throws IOException { JSONObject actual = executeQuery( String.format( @@ -209,7 +213,7 @@ public void testCrc32AndAbs() { } @Test - public void testEAndLn() { + public void testEAndLn() throws IOException { JSONObject actual = executeQuery( String.format( @@ -221,7 +225,7 @@ public void testEAndLn() { } @Test - public void testExpAndFloor() { + public void testExpAndFloor() throws IOException { JSONObject actual = executeQuery( String.format( @@ -233,7 +237,7 @@ public void testExpAndFloor() { } @Test - public void testLogAndLog2AndLog10() { + public void testLogAndLog2AndLog10() throws IOException { JSONObject actual = executeQuery( String.format( @@ -247,7 +251,7 @@ public void testLogAndLog2AndLog10() { } @Test - public void testModWithSortAndFields() { + public void testModWithSortAndFields() throws IOException { JSONObject actual = executeQuery( String.format( @@ -260,7 +264,7 @@ public void testModWithSortAndFields() { } @Test - public void testModFloatAndNegative() { + public void testModFloatAndNegative() throws IOException { JSONObject actual = executeQuery( String.format( @@ -272,7 +276,7 @@ public void testModFloatAndNegative() { } @Test - public void testModShouldReturnWiderTypes() { + public void testModShouldReturnWiderTypes() throws IOException { JSONObject actual = executeQuery( String.format( @@ -292,7 +296,7 @@ public void testModShouldReturnWiderTypes() { } @Test - public void testModByZeroShouldReturnNull() { + public void testModByZeroShouldReturnNull() throws IOException { JSONObject actual = executeQuery( String.format( @@ -302,7 +306,7 @@ public void testModByZeroShouldReturnNull() { } @Test - public void testRadiansAndDegrees() { + public void testRadiansAndDegrees() throws IOException { JSONObject actual = executeQuery( String.format( @@ -314,7 +318,7 @@ public void testRadiansAndDegrees() { } @Test - public void testRand() { + public void testRand() throws IOException { JSONObject actual = executeQuery( String.format( @@ -326,7 +330,7 @@ public void testRand() { } @Test - public void testPowInvalidArgShouldReturnNull() { + public void testPowInvalidArgShouldReturnNull() throws IOException { JSONObject actual = executeQuery( String.format( @@ -338,7 +342,7 @@ public void testPowInvalidArgShouldReturnNull() { } @Test - public void testSignAndRound() { + public void testSignAndRound() throws IOException { JSONObject actual = executeQuery( String.format( @@ -352,7 +356,7 @@ public void testSignAndRound() { } @Test - public void testDivide() { + public void testDivide() throws IOException { JSONObject actual = executeQuery( String.format( @@ -392,7 +396,7 @@ public void testDivide() { } @Test - public void testDivideShouldReturnNull() { + public void testDivideShouldReturnNull() throws IOException { JSONObject actual = executeQuery( String.format( diff --git a/integ-test/src/test/java/org/opensearch/sql/calcite/standalone/CalcitePPLDedupIT.java b/integ-test/src/test/java/org/opensearch/sql/calcite/remote/CalcitePPLDedupIT.java similarity index 87% rename from integ-test/src/test/java/org/opensearch/sql/calcite/standalone/CalcitePPLDedupIT.java rename to integ-test/src/test/java/org/opensearch/sql/calcite/remote/CalcitePPLDedupIT.java index 3d97aea2653..d966a7c0d69 100644 --- a/integ-test/src/test/java/org/opensearch/sql/calcite/standalone/CalcitePPLDedupIT.java +++ b/integ-test/src/test/java/org/opensearch/sql/calcite/remote/CalcitePPLDedupIT.java @@ -3,29 +3,29 @@ * SPDX-License-Identifier: Apache-2.0 */ -package org.opensearch.sql.calcite.standalone; +package org.opensearch.sql.calcite.remote; import static org.opensearch.sql.legacy.TestsConstants.TEST_INDEX_DUPLICATION_NULLABLE; -import static org.opensearch.sql.util.MatcherUtils.rows; -import static org.opensearch.sql.util.MatcherUtils.schema; -import static org.opensearch.sql.util.MatcherUtils.verifyDataRows; -import static org.opensearch.sql.util.MatcherUtils.verifySchemaInOrder; +import static org.opensearch.sql.util.MatcherUtils.*; import java.io.IOException; import org.json.JSONObject; import org.junit.jupiter.api.Test; +import org.opensearch.sql.ppl.PPLIntegTestCase; -public class CalcitePPLDedupIT extends CalcitePPLIntegTestCase { +public class CalcitePPLDedupIT extends PPLIntegTestCase { @Override - public void init() throws IOException { + public void init() throws Exception { super.init(); + enableCalcite(); + disallowCalciteFallback(); loadIndex(Index.DUPLICATION_NULLABLE); } @Test - public void testDedup() { + public void testDedup() throws IOException { JSONObject actual = executeQuery( String.format( @@ -37,7 +37,7 @@ public void testDedup() { } @Test - public void testDedupMultipleFields() { + public void testDedupMultipleFields() throws IOException { JSONObject actual = executeQuery( String.format( @@ -56,7 +56,7 @@ public void testDedupMultipleFields() { } @Test - public void testDedupKeepEmpty() { + public void testDedupKeepEmpty() throws IOException { JSONObject actual = executeQuery( String.format( @@ -78,7 +78,7 @@ public void testDedupKeepEmpty() { } @Test - public void testDedupMultipleFieldsKeepEmpty() { + public void testDedupMultipleFieldsKeepEmpty() throws IOException { JSONObject actual = executeQuery( String.format( @@ -103,8 +103,9 @@ public void testDedupMultipleFieldsKeepEmpty() { } @Test + @SuppressWarnings("ThrowableNotThrown") public void testConsecutiveThrowException() { - assertThrows( + assertThrowsWithReplace( UnsupportedOperationException.class, () -> executeQuery( @@ -114,7 +115,7 @@ public void testConsecutiveThrowException() { """, TEST_INDEX_DUPLICATION_NULLABLE))); - assertThrows( + assertThrowsWithReplace( UnsupportedOperationException.class, () -> executeQuery( @@ -124,7 +125,7 @@ public void testConsecutiveThrowException() { """, TEST_INDEX_DUPLICATION_NULLABLE))); - assertThrows( + assertThrowsWithReplace( UnsupportedOperationException.class, () -> executeQuery( @@ -134,7 +135,7 @@ public void testConsecutiveThrowException() { """, TEST_INDEX_DUPLICATION_NULLABLE))); - assertThrows( + assertThrowsWithReplace( UnsupportedOperationException.class, () -> executeQuery( @@ -146,7 +147,7 @@ public void testConsecutiveThrowException() { } @Test - public void testDedup2() { + public void testDedup2() throws IOException { JSONObject actual = executeQuery( String.format( @@ -160,7 +161,7 @@ actual, rows("A"), rows("A"), rows("B"), rows("B"), rows("C"), rows("C"), rows(" } @Test - public void testDedupMultipleFields2() { + public void testDedupMultipleFields2() throws IOException { JSONObject actual = executeQuery( String.format( @@ -183,7 +184,7 @@ public void testDedupMultipleFields2() { } @Test - public void testDedupKeepEmpty2() { + public void testDedupKeepEmpty2() throws IOException { JSONObject actual = executeQuery( String.format( @@ -208,7 +209,7 @@ public void testDedupKeepEmpty2() { } @Test - public void testDedupMultipleFieldsKeepEmpty2() { + public void testDedupMultipleFieldsKeepEmpty2() throws IOException { JSONObject actual = executeQuery( String.format( @@ -237,7 +238,7 @@ public void testDedupMultipleFieldsKeepEmpty2() { } @Test - public void testReorderDedupFieldsShouldNotAffectResult() { + public void testReorderDedupFieldsShouldNotAffectResult() throws IOException { JSONObject actual1 = executeQuery( String.format( diff --git a/integ-test/src/test/java/org/opensearch/sql/calcite/standalone/CalcitePPLEventstatsIT.java b/integ-test/src/test/java/org/opensearch/sql/calcite/remote/CalcitePPLEventstatsIT.java similarity index 92% rename from integ-test/src/test/java/org/opensearch/sql/calcite/standalone/CalcitePPLEventstatsIT.java rename to integ-test/src/test/java/org/opensearch/sql/calcite/remote/CalcitePPLEventstatsIT.java index eae0e260e02..5e0bdc21a0a 100644 --- a/integ-test/src/test/java/org/opensearch/sql/calcite/standalone/CalcitePPLEventstatsIT.java +++ b/integ-test/src/test/java/org/opensearch/sql/calcite/remote/CalcitePPLEventstatsIT.java @@ -3,7 +3,7 @@ * SPDX-License-Identifier: Apache-2.0 */ -package org.opensearch.sql.calcite.standalone; +package org.opensearch.sql.calcite.remote; import static org.opensearch.sql.legacy.TestsConstants.*; import static org.opensearch.sql.util.MatcherUtils.*; @@ -15,18 +15,22 @@ import org.junit.jupiter.api.Test; import org.opensearch.client.Request; import org.opensearch.sql.legacy.TestsConstants; +import org.opensearch.sql.ppl.PPLIntegTestCase; -public class CalcitePPLEventstatsIT extends CalcitePPLIntegTestCase { +public class CalcitePPLEventstatsIT extends PPLIntegTestCase { @Override - public void init() throws IOException { + public void init() throws Exception { super.init(); + enableCalcite(); + disallowCalciteFallback(); + loadIndex(Index.STATE_COUNTRY); loadIndex(Index.STATE_COUNTRY_WITH_NULL); loadIndex(Index.BANK_TWO); } @Test - public void testEventstat() { + public void testEventstat() throws IOException { JSONObject actual = executeQuery( String.format( @@ -56,7 +60,7 @@ public void testEventstat() { } @Test - public void testEventstatWithNull() { + public void testEventstatWithNull() throws IOException { JSONObject actual = executeQuery( String.format( @@ -88,7 +92,7 @@ public void testEventstatWithNull() { } @Test - public void testEventstatBy() { + public void testEventstatBy() throws IOException { JSONObject actual = executeQuery( String.format( @@ -118,7 +122,7 @@ public void testEventstatBy() { } @Test - public void testEventstatByWithNull() { + public void testEventstatByWithNull() throws IOException { JSONObject actual = executeQuery( String.format( @@ -165,7 +169,7 @@ public void testEventstatByWithNull() { } @Test - public void testEventstatBySpan() { + public void testEventstatBySpan() throws IOException { JSONObject actual = executeQuery( String.format( @@ -182,7 +186,7 @@ public void testEventstatBySpan() { } @Test - public void testEventstatBySpanWithNull() { + public void testEventstatBySpanWithNull() throws IOException { JSONObject actual = executeQuery( String.format( @@ -201,7 +205,7 @@ public void testEventstatBySpanWithNull() { } @Test - public void testEventstatByMultiplePartitions1() { + public void testEventstatByMultiplePartitions1() throws IOException { JSONObject actual = executeQuery( String.format( @@ -218,7 +222,7 @@ public void testEventstatByMultiplePartitions1() { } @Test - public void testEventstatByMultiplePartitions2() { + public void testEventstatByMultiplePartitions2() throws IOException { JSONObject actual = executeQuery( String.format( @@ -235,7 +239,7 @@ public void testEventstatByMultiplePartitions2() { } @Test - public void testEventstatByMultiplePartitionsWithNull1() { + public void testEventstatByMultiplePartitionsWithNull1() throws IOException { JSONObject actual = executeQuery( String.format( @@ -254,7 +258,7 @@ public void testEventstatByMultiplePartitionsWithNull1() { } @Test - public void testEventstatByMultiplePartitionsWithNull2() { + public void testEventstatByMultiplePartitionsWithNull2() throws IOException { JSONObject actual = executeQuery( String.format( @@ -276,8 +280,8 @@ public void testEventstatByMultiplePartitionsWithNull2() { public void testUnsupportedWindowFunctions() { List unsupported = List.of("PERCENTILE_APPROX", "PERCENTILE"); for (String u : unsupported) { - UnsupportedOperationException e = - assertThrows( + Throwable e = + assertThrowsWithReplace( UnsupportedOperationException.class, () -> executeQuery( @@ -310,7 +314,7 @@ public void testDistinctCountShouldFail() throws IOException { } @Test - public void testMultipleEventstat() { + public void testMultipleEventstat() throws IOException { JSONObject actual = executeQuery( String.format( @@ -327,7 +331,7 @@ public void testMultipleEventstat() { } @Test - public void testMultipleEventstatWithNull() { + public void testMultipleEventstatWithNull() throws IOException { JSONObject actual = executeQuery( String.format( @@ -346,7 +350,7 @@ public void testMultipleEventstatWithNull() { } @Test - public void testMultipleEventstatWithEval() { + public void testMultipleEventstatWithEval() throws IOException { JSONObject actual = executeQuery( String.format( @@ -364,7 +368,7 @@ public void testMultipleEventstatWithEval() { } @Test - public void testEventstatEmptyRows() { + public void testEventstatEmptyRows() throws IOException { JSONObject actual = executeQuery( String.format( @@ -384,7 +388,7 @@ public void testEventstatEmptyRows() { } @Test - public void testEventstatVariance() { + public void testEventstatVariance() throws IOException { JSONObject actual = executeQuery( String.format( @@ -454,7 +458,7 @@ public void testEventstatVariance() { } @Test - public void testEventstatVarianceWithNull() { + public void testEventstatVarianceWithNull() throws IOException { JSONObject actual = executeQuery( String.format( @@ -517,7 +521,7 @@ public void testEventstatVarianceWithNull() { } @Test - public void testEventstatVarianceBy() { + public void testEventstatVarianceBy() throws IOException { JSONObject actual = executeQuery( String.format( @@ -534,7 +538,7 @@ public void testEventstatVarianceBy() { } @Test - public void testEventstatVarianceBySpan() { + public void testEventstatVarianceBySpan() throws IOException { JSONObject actual = executeQuery( String.format( @@ -548,7 +552,7 @@ public void testEventstatVarianceBySpan() { } @Test - public void testEventstatVarianceWithNullBy() { + public void testEventstatVarianceWithNullBy() throws IOException { JSONObject actual = executeQuery( String.format( @@ -598,7 +602,7 @@ public void testEventstatVarianceWithNullBy() { @Ignore @Test - public void testEventstatEarliestAndLatest() { + public void testEventstatEarliestAndLatest() throws IOException { JSONObject actual = executeQuery( String.format( diff --git a/integ-test/src/test/java/org/opensearch/sql/calcite/standalone/CalcitePPLExistsSubqueryIT.java b/integ-test/src/test/java/org/opensearch/sql/calcite/remote/CalcitePPLExistsSubqueryIT.java similarity index 91% rename from integ-test/src/test/java/org/opensearch/sql/calcite/standalone/CalcitePPLExistsSubqueryIT.java rename to integ-test/src/test/java/org/opensearch/sql/calcite/remote/CalcitePPLExistsSubqueryIT.java index c0f204cece0..4bc683b865c 100644 --- a/integ-test/src/test/java/org/opensearch/sql/calcite/standalone/CalcitePPLExistsSubqueryIT.java +++ b/integ-test/src/test/java/org/opensearch/sql/calcite/remote/CalcitePPLExistsSubqueryIT.java @@ -3,7 +3,7 @@ * SPDX-License-Identifier: Apache-2.0 */ -package org.opensearch.sql.calcite.standalone; +package org.opensearch.sql.calcite.remote; import static org.opensearch.sql.legacy.TestsConstants.TEST_INDEX_OCCUPATION; import static org.opensearch.sql.legacy.TestsConstants.TEST_INDEX_WORKER; @@ -20,12 +20,15 @@ import org.json.JSONObject; import org.junit.Test; import org.opensearch.client.Request; +import org.opensearch.sql.ppl.PPLIntegTestCase; -public class CalcitePPLExistsSubqueryIT extends CalcitePPLIntegTestCase { +public class CalcitePPLExistsSubqueryIT extends PPLIntegTestCase { @Override - public void init() throws IOException { + public void init() throws Exception { super.init(); + enableCalcite(); + disallowCalciteFallback(); loadIndex(Index.WORKER); loadIndex(Index.WORK_INFORMATION); @@ -40,7 +43,7 @@ public void init() throws IOException { } @Test - public void testSimpleExistsSubquery() { + public void testSimpleExistsSubquery() throws IOException { JSONObject result = executeQuery( String.format( @@ -64,7 +67,7 @@ public void testSimpleExistsSubquery() { } @Test - public void testExistsSubqueryAndAggregation() { + public void testExistsSubqueryAndAggregation() throws IOException { JSONObject result = executeQuery( String.format( @@ -81,7 +84,7 @@ public void testExistsSubqueryAndAggregation() { } @Test - public void testSimpleExistsSubqueryInFilter() { + public void testSimpleExistsSubqueryInFilter() throws IOException { JSONObject result = executeQuery( String.format( @@ -104,7 +107,7 @@ public void testSimpleExistsSubqueryInFilter() { } @Test - public void testNotExistsSubquery() { + public void testNotExistsSubquery() throws IOException { JSONObject result = executeQuery( String.format( @@ -122,7 +125,7 @@ public void testNotExistsSubquery() { } @Test - public void testNotExistsSubqueryInFilter() { + public void testNotExistsSubqueryInFilter() throws IOException { JSONObject result = executeQuery( String.format( @@ -139,7 +142,7 @@ public void testNotExistsSubqueryInFilter() { } @Test - public void testEmptyExistsSubquery() { + public void testEmptyExistsSubquery() throws IOException { JSONObject result = executeQuery( String.format( @@ -157,7 +160,7 @@ public void testEmptyExistsSubquery() { } @Test - public void testUncorrelatedExistsSubquery() { + public void testUncorrelatedExistsSubquery() throws IOException { JSONObject result = executeQuery( String.format( @@ -189,7 +192,8 @@ public void testUncorrelatedExistsSubquery() { } @Test - public void testUncorrelatedExistsSubqueryCheckTheReturnContentOfInnerTableIsEmptyOrNot() { + public void testUncorrelatedExistsSubqueryCheckTheReturnContentOfInnerTableIsEmptyOrNot() + throws IOException { JSONObject result = executeQuery( String.format( @@ -229,7 +233,7 @@ public void testUncorrelatedExistsSubqueryCheckTheReturnContentOfInnerTableIsEmp } @Test - public void testNestedExistsSubquery() { + public void testNestedExistsSubquery() throws IOException { JSONObject result = executeQuery( String.format( @@ -262,7 +266,7 @@ public void testNestedExistsSubquery() { } @Test - public void testExistsSubqueryWithConjunction() { + public void testExistsSubqueryWithConjunction() throws IOException { JSONObject result = executeQuery( String.format( @@ -288,7 +292,7 @@ public void testExistsSubqueryWithConjunction() { } @Test - public void testIssue3566() { + public void testIssue3566() throws IOException { JSONObject result = executeQuery( String.format( diff --git a/integ-test/src/test/java/org/opensearch/sql/calcite/standalone/CalcitePPLExplainIT.java b/integ-test/src/test/java/org/opensearch/sql/calcite/remote/CalcitePPLExplainIT.java similarity index 83% rename from integ-test/src/test/java/org/opensearch/sql/calcite/standalone/CalcitePPLExplainIT.java rename to integ-test/src/test/java/org/opensearch/sql/calcite/remote/CalcitePPLExplainIT.java index bea7ca018fa..2d4fb05be30 100644 --- a/integ-test/src/test/java/org/opensearch/sql/calcite/standalone/CalcitePPLExplainIT.java +++ b/integ-test/src/test/java/org/opensearch/sql/calcite/remote/CalcitePPLExplainIT.java @@ -3,17 +3,21 @@ * SPDX-License-Identifier: Apache-2.0 */ -package org.opensearch.sql.calcite.standalone; +package org.opensearch.sql.calcite.remote; import java.io.IOException; import org.junit.jupiter.api.Test; import org.opensearch.client.Request; +import org.opensearch.sql.ppl.PPLIntegTestCase; -public class CalcitePPLExplainIT extends CalcitePPLIntegTestCase { +public class CalcitePPLExplainIT extends PPLIntegTestCase { @Override - public void init() throws IOException { + public void init() throws Exception { super.init(); + enableCalcite(); + disallowCalciteFallback(); + Request request1 = new Request("PUT", "/test/_doc/1?refresh=true"); request1.setJsonEntity("{\"name\": \"hello\", \"age\": 20}"); client().performRequest(request1); @@ -27,7 +31,7 @@ public void init() throws IOException { } @Test - public void testExplainCommand() { + public void testExplainCommand() throws IOException { String result = explainQuery("explain source=test | where age = 20 | fields name, age"); assertEquals( "{\n" @@ -46,7 +50,7 @@ public void testExplainCommand() { } @Test - public void testExplainCommandExtended() { + public void testExplainCommandExtended() throws IOException { String result = explainQuery("explain extended source=test | where age = 20 | fields name, age"); assertTrue( @@ -56,7 +60,7 @@ public void testExplainCommandExtended() { } @Test - public void testExplainCommandCost() { + public void testExplainCommandCost() throws IOException { String result = explainQuery("explain cost source=test | where age = 20 | fields name, age"); assertTrue( result.contains( @@ -65,7 +69,7 @@ public void testExplainCommandCost() { } @Test - public void testExplainCommandSimple() { + public void testExplainCommandSimple() throws IOException { String result = explainQuery("explain simple source=test | where age = 20 | fields name, age"); assertEquals( "{\n" diff --git a/integ-test/src/test/java/org/opensearch/sql/calcite/standalone/CalcitePPLFillnullIT.java b/integ-test/src/test/java/org/opensearch/sql/calcite/remote/CalcitePPLFillnullIT.java similarity index 87% rename from integ-test/src/test/java/org/opensearch/sql/calcite/standalone/CalcitePPLFillnullIT.java rename to integ-test/src/test/java/org/opensearch/sql/calcite/remote/CalcitePPLFillnullIT.java index 1acb67dc0bc..73fd6239d15 100644 --- a/integ-test/src/test/java/org/opensearch/sql/calcite/standalone/CalcitePPLFillnullIT.java +++ b/integ-test/src/test/java/org/opensearch/sql/calcite/remote/CalcitePPLFillnullIT.java @@ -3,7 +3,7 @@ * SPDX-License-Identifier: Apache-2.0 */ -package org.opensearch.sql.calcite.standalone; +package org.opensearch.sql.calcite.remote; import static org.opensearch.sql.legacy.TestsConstants.TEST_INDEX_STATE_COUNTRY_WITH_NULL; import static org.opensearch.sql.util.MatcherUtils.rows; @@ -14,17 +14,21 @@ import java.io.IOException; import org.json.JSONObject; import org.junit.Test; +import org.opensearch.sql.ppl.PPLIntegTestCase; -public class CalcitePPLFillnullIT extends CalcitePPLIntegTestCase { +public class CalcitePPLFillnullIT extends PPLIntegTestCase { @Override - public void init() throws IOException { + public void init() throws Exception { super.init(); + enableCalcite(); + disallowCalciteFallback(); + loadIndex(Index.STATE_COUNTRY_WITH_NULL); } @Test - public void testFillnullWith() { + public void testFillnullWith() throws IOException { JSONObject actual = executeQuery( String.format( @@ -50,7 +54,7 @@ public void testFillnullWith() { } @Test - public void testFillnullUsing() { + public void testFillnullUsing() throws IOException { JSONObject actual = executeQuery( String.format( @@ -76,7 +80,7 @@ public void testFillnullUsing() { } @Test - public void testFillnullWithoutFieldList() { + public void testFillnullWithoutFieldList() throws IOException { JSONObject actual = executeQuery( String.format( diff --git a/integ-test/src/test/java/org/opensearch/sql/calcite/standalone/CalcitePPLGrokIT.java b/integ-test/src/test/java/org/opensearch/sql/calcite/remote/CalcitePPLGrokIT.java similarity index 89% rename from integ-test/src/test/java/org/opensearch/sql/calcite/standalone/CalcitePPLGrokIT.java rename to integ-test/src/test/java/org/opensearch/sql/calcite/remote/CalcitePPLGrokIT.java index efb0caf4f1b..50fc27f469f 100644 --- a/integ-test/src/test/java/org/opensearch/sql/calcite/standalone/CalcitePPLGrokIT.java +++ b/integ-test/src/test/java/org/opensearch/sql/calcite/remote/CalcitePPLGrokIT.java @@ -3,7 +3,7 @@ * SPDX-License-Identifier: Apache-2.0 */ -package org.opensearch.sql.calcite.standalone; +package org.opensearch.sql.calcite.remote; import static org.opensearch.sql.legacy.TestsConstants.TEST_INDEX_BANK; import static org.opensearch.sql.legacy.TestsConstants.TEST_INDEX_WEBLOGS; @@ -16,18 +16,21 @@ import java.util.Locale; import org.json.JSONObject; import org.junit.Test; +import org.opensearch.sql.ppl.PPLIntegTestCase; -public class CalcitePPLGrokIT extends CalcitePPLIntegTestCase { +public class CalcitePPLGrokIT extends PPLIntegTestCase { @Override - public void init() throws IOException { + public void init() throws Exception { super.init(); + enableCalcite(); + disallowCalciteFallback(); loadIndex(Index.BANK); loadIndex(Index.WEBLOG); } @Test - public void testGrokEmail() { + public void testGrokEmail() throws IOException { JSONObject result = executeQuery( String.format( @@ -46,7 +49,7 @@ public void testGrokEmail() { } @Test - public void testGrokAddressOverriding() { + public void testGrokAddressOverriding() throws IOException { JSONObject preGrokResult = executeQuery( String.format( @@ -76,7 +79,7 @@ public void testGrokAddressOverriding() { } @Test - public void testGrokApacheLog() { + public void testGrokApacheLog() throws IOException { JSONObject result = executeQuery( String.format( diff --git a/integ-test/src/test/java/org/opensearch/sql/calcite/standalone/CalcitePPLIPFunctionIT.java b/integ-test/src/test/java/org/opensearch/sql/calcite/remote/CalcitePPLIPFunctionIT.java similarity index 87% rename from integ-test/src/test/java/org/opensearch/sql/calcite/standalone/CalcitePPLIPFunctionIT.java rename to integ-test/src/test/java/org/opensearch/sql/calcite/remote/CalcitePPLIPFunctionIT.java index 9d7c1b15aee..f52937bb49b 100644 --- a/integ-test/src/test/java/org/opensearch/sql/calcite/standalone/CalcitePPLIPFunctionIT.java +++ b/integ-test/src/test/java/org/opensearch/sql/calcite/remote/CalcitePPLIPFunctionIT.java @@ -3,7 +3,7 @@ * SPDX-License-Identifier: Apache-2.0 */ -package org.opensearch.sql.calcite.standalone; +package org.opensearch.sql.calcite.remote; import static org.opensearch.sql.legacy.TestsConstants.TEST_INDEX_WEBLOGS; import static org.opensearch.sql.util.MatcherUtils.rows; @@ -14,17 +14,21 @@ import java.io.IOException; import org.json.JSONObject; import org.junit.jupiter.api.Test; +import org.opensearch.sql.ppl.PPLIntegTestCase; -public class CalcitePPLIPFunctionIT extends CalcitePPLIntegTestCase { +public class CalcitePPLIPFunctionIT extends PPLIntegTestCase { @Override - public void init() throws IOException { + public void init() throws Exception { super.init(); + enableCalcite(); + disallowCalciteFallback(); + loadIndex(Index.GEOIP); loadIndex(Index.WEBLOG); } @Test - public void testCidrMatch() { + public void testCidrMatch() throws IOException { // No matches JSONObject resultNoMatch = executeQuery( diff --git a/integ-test/src/test/java/org/opensearch/sql/calcite/standalone/CalcitePPLInSubqueryIT.java b/integ-test/src/test/java/org/opensearch/sql/calcite/remote/CalcitePPLInSubqueryIT.java similarity index 92% rename from integ-test/src/test/java/org/opensearch/sql/calcite/standalone/CalcitePPLInSubqueryIT.java rename to integ-test/src/test/java/org/opensearch/sql/calcite/remote/CalcitePPLInSubqueryIT.java index 7603030a1cd..48dede3894f 100644 --- a/integ-test/src/test/java/org/opensearch/sql/calcite/standalone/CalcitePPLInSubqueryIT.java +++ b/integ-test/src/test/java/org/opensearch/sql/calcite/remote/CalcitePPLInSubqueryIT.java @@ -3,7 +3,7 @@ * SPDX-License-Identifier: Apache-2.0 */ -package org.opensearch.sql.calcite.standalone; +package org.opensearch.sql.calcite.remote; import static org.opensearch.sql.legacy.TestsConstants.TEST_INDEX_OCCUPATION; import static org.opensearch.sql.legacy.TestsConstants.TEST_INDEX_WORKER; @@ -21,12 +21,15 @@ import org.junit.Test; import org.opensearch.client.Request; import org.opensearch.sql.exception.SemanticCheckException; +import org.opensearch.sql.ppl.PPLIntegTestCase; -public class CalcitePPLInSubqueryIT extends CalcitePPLIntegTestCase { +public class CalcitePPLInSubqueryIT extends PPLIntegTestCase { @Override - public void init() throws IOException { + public void init() throws Exception { super.init(); + enableCalcite(); + disallowCalciteFallback(); loadIndex(Index.WORKER); loadIndex(Index.WORK_INFORMATION); @@ -41,7 +44,7 @@ public void init() throws IOException { } @Test - public void testSelfInSubquery() { + public void testSelfInSubquery() throws IOException { JSONObject result = executeQuery( String.format( @@ -68,7 +71,7 @@ public void testSelfInSubquery() { } @Test - public void testWhereInSubquery() { + public void testWhereInSubquery() throws IOException { JSONObject result = executeQuery( String.format( @@ -92,7 +95,7 @@ public void testWhereInSubquery() { } @Test - public void testFilterInSubquery() { + public void testFilterInSubquery() throws IOException { JSONObject result = executeQuery( String.format( @@ -115,7 +118,7 @@ public void testFilterInSubquery() { } @Test - public void testInSubqueryWithParentheses() { + public void testInSubqueryWithParentheses() throws IOException { JSONObject result1 = executeQuery( String.format( @@ -158,7 +161,7 @@ public void testInSubqueryWithParentheses() { } @Test - public void testTwoExpressionsInSubquery() { + public void testTwoExpressionsInSubquery() throws IOException { JSONObject result = executeQuery( String.format( @@ -181,7 +184,7 @@ public void testTwoExpressionsInSubquery() { } @Test - public void testWhereNotInSubquery() { + public void testWhereNotInSubquery() throws IOException { JSONObject result = executeQuery( String.format( @@ -199,7 +202,7 @@ public void testWhereNotInSubquery() { } @Test - public void testFilterNotInSubquery() { + public void testFilterNotInSubquery() throws IOException { JSONObject result = executeQuery( String.format( @@ -216,7 +219,7 @@ public void testFilterNotInSubquery() { } @Test - public void testTwoExpressionsNotInSubquery() { + public void testTwoExpressionsNotInSubquery() throws IOException { JSONObject result = executeQuery( String.format( @@ -235,7 +238,7 @@ public void testTwoExpressionsNotInSubquery() { } @Test - public void testEmptyInSubquery() { + public void testEmptyInSubquery() throws IOException { JSONObject result = executeQuery( String.format( @@ -260,7 +263,7 @@ public void testEmptyInSubquery() { } @Test - public void testNestedInSubquery() { + public void testNestedInSubquery() throws IOException { JSONObject result = executeQuery( String.format( @@ -288,7 +291,7 @@ public void testNestedInSubquery() { } @Test - public void testNestedInSubquery2() { + public void testNestedInSubquery2() throws IOException { JSONObject result = executeQuery( String.format( @@ -321,7 +324,7 @@ public void testNestedInSubquery2() { } @Ignore // TODO bug? fail in execution, the plan converted is correct - public void testInSubqueryAsJoinFilter() { + public void testInSubqueryAsJoinFilter() throws IOException { JSONObject result = executeQuery( String.format( @@ -345,8 +348,8 @@ public void testInSubqueryAsJoinFilter() { @Test public void failWhenNumOfColumnsNotMatchOutputOfSubquery() { - SemanticCheckException e1 = - assertThrows( + Throwable e1 = + assertThrowsWithReplace( SemanticCheckException.class, () -> executeQuery( @@ -365,8 +368,8 @@ public void failWhenNumOfColumnsNotMatchOutputOfSubquery() { "The number of columns in the left hand side of an IN subquery does not match the number of" + " columns in the output of subquery"); - SemanticCheckException e2 = - assertThrows( + Throwable e2 = + assertThrowsWithReplace( SemanticCheckException.class, () -> executeQuery( @@ -387,7 +390,7 @@ public void failWhenNumOfColumnsNotMatchOutputOfSubquery() { } @Test - public void testInSubqueryWithTableAlias() { + public void testInSubqueryWithTableAlias() throws IOException { JSONObject result = executeQuery( String.format( diff --git a/integ-test/src/test/java/org/opensearch/sql/calcite/standalone/CalcitePPLJoinIT.java b/integ-test/src/test/java/org/opensearch/sql/calcite/remote/CalcitePPLJoinIT.java similarity index 93% rename from integ-test/src/test/java/org/opensearch/sql/calcite/standalone/CalcitePPLJoinIT.java rename to integ-test/src/test/java/org/opensearch/sql/calcite/remote/CalcitePPLJoinIT.java index 782f58f7d6a..17fcdb431be 100644 --- a/integ-test/src/test/java/org/opensearch/sql/calcite/standalone/CalcitePPLJoinIT.java +++ b/integ-test/src/test/java/org/opensearch/sql/calcite/remote/CalcitePPLJoinIT.java @@ -3,7 +3,7 @@ * SPDX-License-Identifier: Apache-2.0 */ -package org.opensearch.sql.calcite.standalone; +package org.opensearch.sql.calcite.remote; import static org.opensearch.sql.legacy.TestsConstants.TEST_INDEX_HOBBIES; import static org.opensearch.sql.legacy.TestsConstants.TEST_INDEX_OCCUPATION; @@ -21,12 +21,15 @@ import org.junit.Test; import org.opensearch.client.Request; import org.opensearch.sql.legacy.TestsConstants; +import org.opensearch.sql.ppl.PPLIntegTestCase; -public class CalcitePPLJoinIT extends CalcitePPLIntegTestCase { +public class CalcitePPLJoinIT extends PPLIntegTestCase { @Override - public void init() throws IOException { + public void init() throws Exception { super.init(); + enableCalcite(); + disallowCalciteFallback(); loadIndex(Index.STATE_COUNTRY); loadIndex(Index.OCCUPATION); @@ -54,7 +57,7 @@ public void init() throws IOException { } @Test - public void testJoinWithCondition() { + public void testJoinWithCondition() throws IOException { JSONObject actual = executeQuery( String.format( @@ -82,7 +85,7 @@ public void testJoinWithCondition() { } @Test - public void testJoinWithTwoJoinConditions() { + public void testJoinWithTwoJoinConditions() throws IOException { JSONObject actual = executeQuery( String.format( @@ -109,7 +112,7 @@ public void testJoinWithTwoJoinConditions() { } @Test - public void testJoinTwoColumnsAndDisjointFilters() { + public void testJoinTwoColumnsAndDisjointFilters() throws IOException { JSONObject actual = executeQuery( String.format( @@ -134,7 +137,7 @@ public void testJoinTwoColumnsAndDisjointFilters() { } @Test - public void testJoinThenStats() { + public void testJoinThenStats() throws IOException { JSONObject actual = executeQuery( String.format( @@ -147,7 +150,7 @@ public void testJoinThenStats() { } @Test - public void testJoinThenStatsWithGroupBy() { + public void testJoinThenStatsWithGroupBy() throws IOException { JSONObject actual = executeQuery( String.format( @@ -169,7 +172,7 @@ public void testJoinThenStatsWithGroupBy() { } @Test - public void testComplexInnerJoin() { + public void testComplexInnerJoin() throws IOException { JSONObject actual = executeQuery( String.format( @@ -191,7 +194,7 @@ public void testComplexInnerJoin() { } @Test - public void testComplexLeftJoin() { + public void testComplexLeftJoin() throws IOException { JSONObject actual = executeQuery( String.format( @@ -218,7 +221,7 @@ public void testComplexLeftJoin() { } @Test - public void testComplexRightJoin() { + public void testComplexRightJoin() throws IOException { JSONObject actual = executeQuery( String.format( @@ -246,7 +249,7 @@ public void testComplexRightJoin() { } @Test - public void testComplexSemiJoin() { + public void testComplexSemiJoin() throws IOException { JSONObject actual = executeQuery( String.format( @@ -268,7 +271,7 @@ public void testComplexSemiJoin() { } @Test - public void testComplexAntiJoin() { + public void testComplexAntiJoin() throws IOException { JSONObject actual = executeQuery( String.format( @@ -291,7 +294,7 @@ public void testComplexAntiJoin() { } @Test - public void testComplexCrossJoin() { + public void testComplexCrossJoin() throws IOException { JSONObject actual = executeQuery( String.format( @@ -303,7 +306,7 @@ public void testComplexCrossJoin() { } @Test - public void testNonEquiJoin() { + public void testNonEquiJoin() throws IOException { JSONObject actual = executeQuery( String.format( @@ -335,24 +338,24 @@ public void testNonEquiJoin() { } @Test - public void testCrossJoinWithJoinCriteriaFallbackToInnerJoin() { - String cross = - execute( + public void testCrossJoinWithJoinCriteriaFallbackToInnerJoin() throws IOException { + var cross = + executeQuery( String.format( "source = %s | where country = 'USA' | cross join left=a, right=b ON a.name =" + " b.name %s | sort a.age", TEST_INDEX_STATE_COUNTRY, TEST_INDEX_OCCUPATION)); - String inner = - execute( + var inner = + executeQuery( String.format( "source = %s | where country = 'USA' | inner join left=a, right=b ON a.name =" + " b.name %s | sort a.age", TEST_INDEX_STATE_COUNTRY, TEST_INDEX_OCCUPATION)); - assertEquals(cross, inner); + assertJsonEquals(cross.toString(), inner.toString()); } @Ignore // TODO seems a calcite bug - public void testMultipleJoins() { + public void testMultipleJoins() throws IOException { JSONObject actual = executeQuery( String.format( @@ -392,7 +395,7 @@ public void testMultipleJoins() { } @Ignore // TODO seems a calcite bug - public void testMultipleJoinsWithRelationSubquery() { + public void testMultipleJoinsWithRelationSubquery() throws IOException { JSONObject actual = executeQuery( String.format( @@ -440,7 +443,7 @@ public void testMultipleJoinsWithRelationSubquery() { } @Test - public void testMultipleJoinsWithoutTableAliases() { + public void testMultipleJoinsWithoutTableAliases() throws IOException { JSONObject actual = executeQuery( String.format( @@ -472,7 +475,7 @@ public void testMultipleJoinsWithoutTableAliases() { } @Test - public void testMultipleJoinsWithPartTableAliases() { + public void testMultipleJoinsWithPartTableAliases() throws IOException { JSONObject actual = executeQuery( String.format( @@ -492,7 +495,7 @@ public void testMultipleJoinsWithPartTableAliases() { } @Test - public void testMultipleJoinsWithSelfJoin() { + public void testMultipleJoinsWithSelfJoin() throws IOException { JSONObject actual = executeQuery( String.format( @@ -520,7 +523,7 @@ public void testMultipleJoinsWithSelfJoin() { } @Test - public void testMultipleJoinsWithSubquerySelfJoin() { + public void testMultipleJoinsWithSubquerySelfJoin() throws IOException { JSONObject actual = executeQuery( String.format( @@ -548,7 +551,7 @@ public void testMultipleJoinsWithSubquerySelfJoin() { } @Test - public void testCheckAccessTheReferenceByAliases() { + public void testCheckAccessTheReferenceByAliases() throws IOException { JSONObject res1 = executeQuery( String.format( @@ -588,7 +591,7 @@ public void testCheckAccessTheReferenceByAliases() { } @Test - public void testCheckAccessTheReferenceBySubqueryAliases() { + public void testCheckAccessTheReferenceBySubqueryAliases() throws IOException { JSONObject res1 = executeQuery( String.format( @@ -629,7 +632,7 @@ public void testCheckAccessTheReferenceBySubqueryAliases() { } @Test - public void testCheckAccessTheReferenceByOverrideAliases() { + public void testCheckAccessTheReferenceByOverrideAliases() throws IOException { JSONObject res1 = executeQuery( String.format( @@ -655,7 +658,7 @@ public void testCheckAccessTheReferenceByOverrideAliases() { } @Test - public void testCheckAccessTheReferenceByOverrideSubqueryAliases() { + public void testCheckAccessTheReferenceByOverrideSubqueryAliases() throws IOException { JSONObject res1 = executeQuery( String.format( @@ -681,7 +684,7 @@ public void testCheckAccessTheReferenceByOverrideSubqueryAliases() { } @Test - public void testCheckAccessTheReferenceByOverrideSubqueryAliases2() { + public void testCheckAccessTheReferenceByOverrideSubqueryAliases2() throws IOException { JSONObject res1 = executeQuery( String.format( @@ -707,7 +710,7 @@ public void testCheckAccessTheReferenceByOverrideSubqueryAliases2() { } @Test - public void testInnerJoinWithRelationSubquery() { + public void testInnerJoinWithRelationSubquery() throws IOException { JSONObject actual = executeQuery( String.format( @@ -735,7 +738,7 @@ public void testInnerJoinWithRelationSubquery() { } @Test - public void testLeftJoinWithRelationSubquery() { + public void testLeftJoinWithRelationSubquery() throws IOException { JSONObject actual = executeQuery( String.format( diff --git a/integ-test/src/test/java/org/opensearch/sql/calcite/standalone/CalcitePPLJsonBuiltinFunctionIT.java b/integ-test/src/test/java/org/opensearch/sql/calcite/remote/CalcitePPLJsonBuiltinFunctionIT.java similarity index 90% rename from integ-test/src/test/java/org/opensearch/sql/calcite/standalone/CalcitePPLJsonBuiltinFunctionIT.java rename to integ-test/src/test/java/org/opensearch/sql/calcite/remote/CalcitePPLJsonBuiltinFunctionIT.java index ae05205f7ad..447bea7ae30 100644 --- a/integ-test/src/test/java/org/opensearch/sql/calcite/standalone/CalcitePPLJsonBuiltinFunctionIT.java +++ b/integ-test/src/test/java/org/opensearch/sql/calcite/remote/CalcitePPLJsonBuiltinFunctionIT.java @@ -3,7 +3,7 @@ * SPDX-License-Identifier: Apache-2.0 */ -package org.opensearch.sql.calcite.standalone; +package org.opensearch.sql.calcite.remote; import static org.opensearch.sql.expression.function.jsonUDF.JsonUtils.gson; import static org.opensearch.sql.legacy.TestsConstants.*; @@ -14,11 +14,15 @@ import java.util.List; import org.json.JSONObject; import org.junit.jupiter.api.Test; +import org.opensearch.sql.ppl.PPLIntegTestCase; -public class CalcitePPLJsonBuiltinFunctionIT extends CalcitePPLIntegTestCase { +public class CalcitePPLJsonBuiltinFunctionIT extends PPLIntegTestCase { @Override - public void init() throws IOException { + public void init() throws Exception { super.init(); + enableCalcite(); + disallowCalciteFallback(); + loadIndex(Index.STATE_COUNTRY); loadIndex(Index.STATE_COUNTRY_WITH_NULL); loadIndex(Index.DATE_FORMATS); @@ -31,7 +35,7 @@ public void init() throws IOException { } @Test - public void testJson() { + public void testJson() throws IOException { JSONObject actual = executeQuery( String.format( @@ -45,7 +49,7 @@ public void testJson() { } @Test - public void testJsonObject() { + public void testJsonObject() throws IOException { JSONObject actual = executeQuery( String.format( @@ -59,7 +63,7 @@ public void testJsonObject() { } @Test - public void testJsonArray() { + public void testJsonArray() throws IOException { JSONObject actual = executeQuery( String.format( @@ -72,7 +76,7 @@ public void testJsonArray() { } @Test - public void testJsonArrayWithDifferentType() { + public void testJsonArrayWithDifferentType() throws IOException { JSONObject actual = executeQuery( String.format( @@ -86,7 +90,7 @@ public void testJsonArrayWithDifferentType() { } @Test - public void testJsonArrayLength() { + public void testJsonArrayLength() throws IOException { JSONObject actual = executeQuery( String.format( @@ -101,7 +105,7 @@ public void testJsonArrayLength() { } @Test - public void testJsonExtract() { + public void testJsonExtract() throws IOException { String candidate = "[\n" + "{\n" @@ -152,7 +156,7 @@ public void testJsonExtract() { } @Test - public void testJsonExtractWithMultiplyResult() { + public void testJsonExtractWithMultiplyResult() throws IOException { String candidate = "[\n" + "{\n" @@ -191,7 +195,7 @@ public void testJsonExtractWithMultiplyResult() { } @Test - public void testJsonKeys() { + public void testJsonKeys() throws IOException { JSONObject actual = executeQuery( String.format( @@ -206,7 +210,7 @@ public void testJsonKeys() { } @Test - public void testJsonValid() { + public void testJsonValid() throws IOException { JSONObject actual = executeQuery( String.format( @@ -220,7 +224,7 @@ public void testJsonValid() { } @Test - public void testJsonSet() { + public void testJsonSet() throws IOException { JSONObject actual = executeQuery( String.format( @@ -234,7 +238,7 @@ public void testJsonSet() { } @Test - public void testJsonSetWithWrongPath() { + public void testJsonSetWithWrongPath() throws IOException { JSONObject actual = executeQuery( String.format( @@ -248,7 +252,7 @@ public void testJsonSetWithWrongPath() { } @Test - public void testJsonSetPartialSet() { + public void testJsonSetPartialSet() throws IOException { JSONObject actual = executeQuery( String.format( @@ -262,7 +266,7 @@ public void testJsonSetPartialSet() { } @Test - public void testJsonDelete() { + public void testJsonDelete() throws IOException { JSONObject actual = executeQuery( String.format( @@ -277,7 +281,7 @@ public void testJsonDelete() { } @Test - public void testJsonDeleteWithNested() { + public void testJsonDeleteWithNested() throws IOException { JSONObject actual = executeQuery( String.format( @@ -292,7 +296,7 @@ public void testJsonDeleteWithNested() { } @Test - public void testJsonDeleteWithNestedNothing() { + public void testJsonDeleteWithNestedNothing() throws IOException { JSONObject actual = executeQuery( String.format( @@ -307,7 +311,7 @@ public void testJsonDeleteWithNestedNothing() { } @Test - public void testJsonDeleteWithNestedAndArray() { + public void testJsonDeleteWithNestedAndArray() throws IOException { JSONObject actual = executeQuery( String.format( @@ -322,7 +326,7 @@ public void testJsonDeleteWithNestedAndArray() { } @Test - public void testJsonAppend() { + public void testJsonAppend() throws IOException { JSONObject actual = executeQuery( String.format( @@ -346,7 +350,7 @@ public void testJsonAppend() { } @Test - public void testJsonExtend() { + public void testJsonExtend() throws IOException { JSONObject actual = executeQuery( String.format( diff --git a/integ-test/src/test/java/org/opensearch/sql/calcite/standalone/CalcitePPLLookupIT.java b/integ-test/src/test/java/org/opensearch/sql/calcite/remote/CalcitePPLLookupIT.java similarity index 93% rename from integ-test/src/test/java/org/opensearch/sql/calcite/standalone/CalcitePPLLookupIT.java rename to integ-test/src/test/java/org/opensearch/sql/calcite/remote/CalcitePPLLookupIT.java index 780e8f002f2..bbe84a1cafe 100644 --- a/integ-test/src/test/java/org/opensearch/sql/calcite/standalone/CalcitePPLLookupIT.java +++ b/integ-test/src/test/java/org/opensearch/sql/calcite/remote/CalcitePPLLookupIT.java @@ -3,7 +3,7 @@ * SPDX-License-Identifier: Apache-2.0 */ -package org.opensearch.sql.calcite.standalone; +package org.opensearch.sql.calcite.remote; import static org.opensearch.sql.legacy.TestsConstants.TEST_INDEX_WORKER; import static org.opensearch.sql.legacy.TestsConstants.TEST_INDEX_WORK_INFORMATION; @@ -17,19 +17,22 @@ import org.json.JSONObject; import org.junit.Test; import org.opensearch.client.Request; +import org.opensearch.sql.ppl.PPLIntegTestCase; -public class CalcitePPLLookupIT extends CalcitePPLIntegTestCase { +public class CalcitePPLLookupIT extends PPLIntegTestCase { @Override - public void init() throws IOException { + public void init() throws Exception { super.init(); + enableCalcite(); + disallowCalciteFallback(); loadIndex(Index.WORKER); loadIndex(Index.WORK_INFORMATION); } @Test - public void testUidAsIdReplaceDepartment() { + public void testUidAsIdReplaceDepartment() throws IOException { JSONObject result = executeQuery( String.format( @@ -58,7 +61,7 @@ public void testUidAsIdReplaceDepartment() { } @Test - public void testUidAsIdAppendDepartment() { + public void testUidAsIdAppendDepartment() throws IOException { JSONObject result = executeQuery( String.format( @@ -87,7 +90,7 @@ public void testUidAsIdAppendDepartment() { } @Test - public void testUidAsIdReplaceDepartmentAsCountry() { + public void testUidAsIdReplaceDepartmentAsCountry() throws IOException { JSONObject result = executeQuery( String.format( @@ -115,7 +118,7 @@ public void testUidAsIdReplaceDepartmentAsCountry() { } @Test - public void testUidAsIdAppendDepartmentAsCountry() { + public void testUidAsIdAppendDepartmentAsCountry() throws IOException { JSONObject result = executeQuery( String.format( @@ -143,7 +146,7 @@ public void testUidAsIdAppendDepartmentAsCountry() { } @Test - public void testUidAsIdNameReplaceDepartment() { + public void testUidAsIdNameReplaceDepartment() throws IOException { JSONObject result = executeQuery( String.format( @@ -172,7 +175,7 @@ public void testUidAsIdNameReplaceDepartment() { } @Test - public void testUidAsIdNameAppendDepartment() { + public void testUidAsIdNameAppendDepartment() throws IOException { JSONObject result = executeQuery( String.format( @@ -201,7 +204,7 @@ public void testUidAsIdNameAppendDepartment() { } @Test - public void testUidASIdName() { + public void testUidASIdName() throws IOException { JSONObject result = executeQuery( String.format( @@ -230,7 +233,7 @@ public void testUidASIdName() { } @Test - public void testNameReplaceOccupationAsMajor() { + public void testNameReplaceOccupationAsMajor() throws IOException { JSONObject result = executeQuery( String.format( @@ -259,7 +262,7 @@ public void testNameReplaceOccupationAsMajor() { } @Test - public void testNameAppendOccupationAsMajor() { + public void testNameAppendOccupationAsMajor() throws IOException { JSONObject result = executeQuery( String.format( @@ -288,7 +291,7 @@ public void testNameAppendOccupationAsMajor() { } @Test - public void testName() { + public void testName() throws IOException { JSONObject result = executeQuery( String.format( @@ -318,7 +321,7 @@ public void testName() { } @Test - public void testIdWithRename() { + public void testIdWithRename() throws IOException { // rename country to department for verify the case if search side is not a table // and its output has diffed from the original fields of source table JSONObject result = @@ -397,7 +400,7 @@ public void testCorrectnessCombination() throws IOException { } @Test - public void testNameReplaceOccupation2() { + public void testNameReplaceOccupation2() throws IOException { JSONObject result = executeQuery( String.format( @@ -425,7 +428,7 @@ public void testNameReplaceOccupation2() { } @Test - public void testNameReplaceOccupationAsNewName() { + public void testNameReplaceOccupationAsNewName() throws IOException { JSONObject result = executeQuery( String.format( @@ -454,7 +457,7 @@ public void testNameReplaceOccupationAsNewName() { } @Test - public void testRnameAsIdShouldnWork() { + public void testRnameAsIdShouldnWork() throws IOException { JSONObject result = executeQuery( String.format( diff --git a/integ-test/src/test/java/org/opensearch/sql/calcite/standalone/CalcitePPLParseIT.java b/integ-test/src/test/java/org/opensearch/sql/calcite/remote/CalcitePPLParseIT.java similarity index 90% rename from integ-test/src/test/java/org/opensearch/sql/calcite/standalone/CalcitePPLParseIT.java rename to integ-test/src/test/java/org/opensearch/sql/calcite/remote/CalcitePPLParseIT.java index d4819eb3cb9..78f324483a1 100644 --- a/integ-test/src/test/java/org/opensearch/sql/calcite/standalone/CalcitePPLParseIT.java +++ b/integ-test/src/test/java/org/opensearch/sql/calcite/remote/CalcitePPLParseIT.java @@ -3,7 +3,7 @@ * SPDX-License-Identifier: Apache-2.0 */ -package org.opensearch.sql.calcite.standalone; +package org.opensearch.sql.calcite.remote; import static org.opensearch.sql.legacy.TestsConstants.TEST_INDEX_BANK; import static org.opensearch.sql.util.MatcherUtils.rows; @@ -16,18 +16,21 @@ import org.json.JSONObject; import org.junit.Test; import org.opensearch.client.Request; +import org.opensearch.sql.ppl.PPLIntegTestCase; -public class CalcitePPLParseIT extends CalcitePPLIntegTestCase { +public class CalcitePPLParseIT extends PPLIntegTestCase { @Override - public void init() throws IOException { + public void init() throws Exception { super.init(); + enableCalcite(); + disallowCalciteFallback(); loadIndex(Index.BANK); loadIndex(Index.BANK_WITH_NULL_VALUES); } @Test - public void testParseEmail() { + public void testParseEmail() throws IOException { JSONObject result = executeQuery( String.format( @@ -48,7 +51,7 @@ public void testParseEmail() { } @Test - public void testParseOverriding() { + public void testParseOverriding() throws IOException { JSONObject result = executeQuery( String.format( @@ -69,7 +72,7 @@ public void testParseOverriding() { } @Test - public void testParseEmailCountByHost() { + public void testParseEmailCountByHost() throws IOException { JSONObject result = executeQuery( String.format( @@ -90,7 +93,7 @@ public void testParseEmailCountByHost() { } @Test - public void testParseStreetNumber() { + public void testParseStreetNumber() throws IOException { JSONObject result = executeQuery( String.format( @@ -115,8 +118,8 @@ public void testParseStreetNumber() { // https://github.com/opensearch-project/sql/issues/3472 @Test public void testParseMultipleGroups() { - RuntimeException e = - assertThrows( + Throwable e = + assertThrowsWithReplace( RuntimeException.class, () -> executeQuery( diff --git a/integ-test/src/test/java/org/opensearch/sql/calcite/standalone/CalcitePPLPatternsIT.java b/integ-test/src/test/java/org/opensearch/sql/calcite/remote/CalcitePPLPatternsIT.java similarity index 93% rename from integ-test/src/test/java/org/opensearch/sql/calcite/standalone/CalcitePPLPatternsIT.java rename to integ-test/src/test/java/org/opensearch/sql/calcite/remote/CalcitePPLPatternsIT.java index cf65c08f446..eaf74270e4c 100644 --- a/integ-test/src/test/java/org/opensearch/sql/calcite/standalone/CalcitePPLPatternsIT.java +++ b/integ-test/src/test/java/org/opensearch/sql/calcite/remote/CalcitePPLPatternsIT.java @@ -3,7 +3,7 @@ * SPDX-License-Identifier: Apache-2.0 */ -package org.opensearch.sql.calcite.standalone; +package org.opensearch.sql.calcite.remote; import static org.opensearch.sql.legacy.TestsConstants.TEST_INDEX_BANK; import static org.opensearch.sql.legacy.TestsConstants.TEST_INDEX_HDFS_LOGS; @@ -17,11 +17,14 @@ import java.io.IOException; import org.json.JSONObject; import org.junit.Test; +import org.opensearch.sql.ppl.PPLIntegTestCase; -public class CalcitePPLPatternsIT extends CalcitePPLIntegTestCase { +public class CalcitePPLPatternsIT extends PPLIntegTestCase { @Override - public void init() throws IOException { + public void init() throws Exception { super.init(); + enableCalcite(); + disallowCalciteFallback(); loadIndex(Index.BANK); loadIndex(Index.WEBLOG); @@ -29,7 +32,7 @@ public void init() throws IOException { } @Test - public void testSimplePatternLabelMode() { + public void testSimplePatternLabelMode() throws IOException { JSONObject result = executeQuery( String.format( @@ -57,7 +60,7 @@ public void testSimplePatternLabelMode() { } @Test - public void testSimplePatternLabelModeWithCustomPattern() { + public void testSimplePatternLabelModeWithCustomPattern() throws IOException { JSONObject result = executeQuery( String.format( @@ -79,7 +82,7 @@ public void testSimplePatternLabelModeWithCustomPattern() { } @Test - public void testSimplePatternAggregationMode() { + public void testSimplePatternAggregationMode() throws IOException { JSONObject result = executeQuery( String.format( @@ -104,7 +107,7 @@ public void testSimplePatternAggregationMode() { } @Test - public void testBrainLabelMode() { + public void testBrainLabelMode() throws IOException { JSONObject result = executeQuery( String.format( @@ -157,7 +160,7 @@ public void testBrainLabelMode() { } @Test - public void testBrainAggregationMode() { + public void testBrainAggregationMode() throws IOException { JSONObject result = executeQuery( String.format( @@ -221,7 +224,7 @@ public void testBrainAggregationMode() { } @Test - public void testBrainAggregationModeWithGroupByClause() { + public void testBrainAggregationModeWithGroupByClause() throws IOException { JSONObject result = executeQuery( String.format( diff --git a/integ-test/src/test/java/org/opensearch/sql/calcite/standalone/CalcitePPLRenameIT.java b/integ-test/src/test/java/org/opensearch/sql/calcite/remote/CalcitePPLRenameIT.java similarity index 87% rename from integ-test/src/test/java/org/opensearch/sql/calcite/standalone/CalcitePPLRenameIT.java rename to integ-test/src/test/java/org/opensearch/sql/calcite/remote/CalcitePPLRenameIT.java index f37a941fda8..e18ae50ccd8 100644 --- a/integ-test/src/test/java/org/opensearch/sql/calcite/standalone/CalcitePPLRenameIT.java +++ b/integ-test/src/test/java/org/opensearch/sql/calcite/remote/CalcitePPLRenameIT.java @@ -3,7 +3,7 @@ * SPDX-License-Identifier: Apache-2.0 */ -package org.opensearch.sql.calcite.standalone; +package org.opensearch.sql.calcite.remote; import static org.opensearch.sql.legacy.TestsConstants.TEST_INDEX_STATE_COUNTRY; import static org.opensearch.sql.util.MatcherUtils.rows; @@ -15,17 +15,20 @@ import java.io.IOException; import org.json.JSONObject; import org.junit.Test; +import org.opensearch.sql.ppl.PPLIntegTestCase; -public class CalcitePPLRenameIT extends CalcitePPLIntegTestCase { +public class CalcitePPLRenameIT extends PPLIntegTestCase { - public void init() throws IOException { + public void init() throws Exception { super.init(); + enableCalcite(); + disallowCalciteFallback(); loadIndex(Index.STATE_COUNTRY); } @Test - public void testRename() { + public void testRename() throws IOException { JSONObject result = executeQuery( String.format( @@ -45,8 +48,8 @@ public void testRename() { @Test public void testRefRenamedField() { - IllegalArgumentException e = - assertThrows( + Throwable e = + assertThrowsWithReplace( IllegalArgumentException.class, () -> executeQuery( @@ -63,8 +66,8 @@ public void testRefRenamedField() { @Test public void testRenameNotExistedField() { - IllegalArgumentException e = - assertThrows( + Throwable e = + assertThrowsWithReplace( IllegalArgumentException.class, () -> executeQuery( @@ -80,9 +83,9 @@ public void testRenameNotExistedField() { } @Test - public void testRenameToMetaField() { - IllegalArgumentException e = - assertThrows( + public void testRenameToMetaField() throws IOException { + Throwable e = + assertThrowsWithReplace( IllegalArgumentException.class, () -> executeQuery( @@ -112,7 +115,7 @@ public void testRenameToMetaField() { } @Test - public void testMultipleRename() { + public void testMultipleRename() throws IOException { JSONObject result = executeQuery( String.format( @@ -135,7 +138,7 @@ public void testMultipleRename() { } @Test - public void testRenameInAgg() { + public void testRenameInAgg() throws IOException { JSONObject result = executeQuery( String.format( @@ -148,7 +151,7 @@ public void testRenameInAgg() { } @Test - public void testMultipleRenameWithBackticks() { + public void testMultipleRenameWithBackticks() throws IOException { JSONObject result = executeQuery( String.format( @@ -171,7 +174,7 @@ public void testMultipleRenameWithBackticks() { } @Test - public void testRenameWithBackticksInAgg() { + public void testRenameWithBackticksInAgg() throws IOException { JSONObject result = executeQuery( String.format( diff --git a/integ-test/src/test/java/org/opensearch/sql/calcite/standalone/CalcitePPLScalarSubqueryIT.java b/integ-test/src/test/java/org/opensearch/sql/calcite/remote/CalcitePPLScalarSubqueryIT.java similarity index 90% rename from integ-test/src/test/java/org/opensearch/sql/calcite/standalone/CalcitePPLScalarSubqueryIT.java rename to integ-test/src/test/java/org/opensearch/sql/calcite/remote/CalcitePPLScalarSubqueryIT.java index 1bdc54f2a43..403bd94b019 100644 --- a/integ-test/src/test/java/org/opensearch/sql/calcite/standalone/CalcitePPLScalarSubqueryIT.java +++ b/integ-test/src/test/java/org/opensearch/sql/calcite/remote/CalcitePPLScalarSubqueryIT.java @@ -3,7 +3,7 @@ * SPDX-License-Identifier: Apache-2.0 */ -package org.opensearch.sql.calcite.standalone; +package org.opensearch.sql.calcite.remote; import static org.opensearch.sql.legacy.TestsConstants.TEST_INDEX_OCCUPATION; import static org.opensearch.sql.legacy.TestsConstants.TEST_INDEX_WORKER; @@ -17,12 +17,15 @@ import org.json.JSONObject; import org.junit.Test; import org.opensearch.client.Request; +import org.opensearch.sql.ppl.PPLIntegTestCase; -public class CalcitePPLScalarSubqueryIT extends CalcitePPLIntegTestCase { +public class CalcitePPLScalarSubqueryIT extends PPLIntegTestCase { @Override - public void init() throws IOException { + public void init() throws Exception { super.init(); + enableCalcite(); + disallowCalciteFallback(); loadIndex(Index.WORKER); loadIndex(Index.WORK_INFORMATION); @@ -37,7 +40,7 @@ public void init() throws IOException { } @Test - public void testUncorrelatedScalarSubqueryInSelect() { + public void testUncorrelatedScalarSubqueryInSelect() throws IOException { JSONObject result = executeQuery( String.format( @@ -62,7 +65,7 @@ public void testUncorrelatedScalarSubqueryInSelect() { } @Test - public void testUncorrelatedScalarSubqueryInExpressionInSelect() { + public void testUncorrelatedScalarSubqueryInExpressionInSelect() throws IOException { JSONObject result = executeQuery( String.format( @@ -87,7 +90,7 @@ public void testUncorrelatedScalarSubqueryInExpressionInSelect() { } @Test - public void testUncorrelatedScalarSubqueryInSelectAndWhere() { + public void testUncorrelatedScalarSubqueryInSelectAndWhere() throws IOException { JSONObject result = executeQuery( String.format( @@ -107,7 +110,7 @@ public void testUncorrelatedScalarSubqueryInSelectAndWhere() { } @Test - public void testUncorrelatedScalarSubqueryInSelectAndInFilter() { + public void testUncorrelatedScalarSubqueryInSelectAndInFilter() throws IOException { JSONObject result = executeQuery( String.format( @@ -124,7 +127,7 @@ public void testUncorrelatedScalarSubqueryInSelectAndInFilter() { } @Test - public void testCorrelatedScalarSubqueryInSelect() { + public void testCorrelatedScalarSubqueryInSelect() throws IOException { JSONObject result = executeQuery( String.format( @@ -151,7 +154,7 @@ public void testCorrelatedScalarSubqueryInSelect() { } @Test - public void testCorrelatedScalarSubqueryInSelectWithNonEqual() { + public void testCorrelatedScalarSubqueryInSelectWithNonEqual() throws IOException { JSONObject result = executeQuery( String.format( @@ -178,7 +181,7 @@ public void testCorrelatedScalarSubqueryInSelectWithNonEqual() { } @Test - public void testCorrelatedScalarSubqueryInWhere() { + public void testCorrelatedScalarSubqueryInWhere() throws IOException { JSONObject result = executeQuery( String.format( @@ -201,7 +204,7 @@ public void testCorrelatedScalarSubqueryInWhere() { } @Test - public void testCorrelatedScalarSubqueryInFilter() { + public void testCorrelatedScalarSubqueryInFilter() throws IOException { JSONObject result = executeQuery( String.format( @@ -221,7 +224,7 @@ public void testCorrelatedScalarSubqueryInFilter() { } @Test - public void testDisjunctiveCorrelatedScalarSubquery() { + public void testDisjunctiveCorrelatedScalarSubquery() throws IOException { JSONObject result = executeQuery( String.format( @@ -244,7 +247,7 @@ public void testDisjunctiveCorrelatedScalarSubquery() { } @Test - public void testTwoUncorrelatedScalarSubqueriesInOr() { + public void testTwoUncorrelatedScalarSubqueriesInOr() throws IOException { JSONObject result = executeQuery( String.format( @@ -263,7 +266,7 @@ public void testTwoUncorrelatedScalarSubqueriesInOr() { } @Test - public void testTwoCorrelatedScalarSubqueriesInOr() { + public void testTwoCorrelatedScalarSubqueriesInOr() throws IOException { JSONObject result = executeQuery( String.format( @@ -288,7 +291,7 @@ public void testTwoCorrelatedScalarSubqueriesInOr() { } @Test - public void testNestedScalarSubquery() { + public void testNestedScalarSubquery() throws IOException { JSONObject result = executeQuery( String.format( @@ -311,7 +314,7 @@ public void testNestedScalarSubquery() { } @Test - public void testNestedScalarSubqueryWithTableAlias() { + public void testNestedScalarSubqueryWithTableAlias() throws IOException { JSONObject result = executeQuery( String.format( diff --git a/integ-test/src/test/java/org/opensearch/sql/calcite/standalone/CalcitePPLSortIT.java b/integ-test/src/test/java/org/opensearch/sql/calcite/remote/CalcitePPLSortIT.java similarity index 87% rename from integ-test/src/test/java/org/opensearch/sql/calcite/standalone/CalcitePPLSortIT.java rename to integ-test/src/test/java/org/opensearch/sql/calcite/remote/CalcitePPLSortIT.java index a5637a05f48..9c19ba00d62 100644 --- a/integ-test/src/test/java/org/opensearch/sql/calcite/standalone/CalcitePPLSortIT.java +++ b/integ-test/src/test/java/org/opensearch/sql/calcite/remote/CalcitePPLSortIT.java @@ -3,7 +3,7 @@ * SPDX-License-Identifier: Apache-2.0 */ -package org.opensearch.sql.calcite.standalone; +package org.opensearch.sql.calcite.remote; import static org.opensearch.sql.legacy.TestsConstants.TEST_INDEX_BANK; import static org.opensearch.sql.legacy.TestsConstants.TEST_INDEX_BANK_WITH_NULL_VALUES; @@ -15,19 +15,22 @@ import java.io.IOException; import org.json.JSONObject; import org.junit.jupiter.api.Test; +import org.opensearch.sql.ppl.PPLIntegTestCase; -public class CalcitePPLSortIT extends CalcitePPLIntegTestCase { +public class CalcitePPLSortIT extends PPLIntegTestCase { @Override - public void init() throws IOException { + public void init() throws Exception { super.init(); + enableCalcite(); + disallowCalciteFallback(); loadIndex(Index.BANK); loadIndex(Index.BANK_WITH_NULL_VALUES); } @Test - public void testFieldsAndSort1() { + public void testFieldsAndSort1() throws IOException { JSONObject actual = executeQuery( String.format( @@ -50,7 +53,7 @@ public void testFieldsAndSort1() { } @Test - public void testFieldsAndSort2() { + public void testFieldsAndSort2() throws IOException { JSONObject actual = executeQuery(String.format("source=%s | fields age | sort - age", TEST_INDEX_BANK)); verifySchema(actual, schema("age", "int")); @@ -59,7 +62,7 @@ public void testFieldsAndSort2() { } @Test - public void testFieldsAndSortTwoFields() { + public void testFieldsAndSortTwoFields() throws IOException { JSONObject actual = executeQuery( String.format( @@ -83,7 +86,7 @@ public void testFieldsAndSortTwoFields() { } @Test - public void testFieldsAndSortWithDescAndLimit() { + public void testFieldsAndSortWithDescAndLimit() throws IOException { JSONObject actual = executeQuery( String.format( @@ -105,7 +108,7 @@ public void testFieldsAndSortWithDescAndLimit() { } @Test - public void testSortAccountAndFieldsAccount() { + public void testSortAccountAndFieldsAccount() throws IOException { JSONObject actual = executeQuery( String.format( @@ -116,7 +119,7 @@ public void testSortAccountAndFieldsAccount() { } @Test - public void testSortAccountAndFieldsNameAccount() { + public void testSortAccountAndFieldsNameAccount() throws IOException { JSONObject actual = executeQuery( String.format( @@ -135,7 +138,7 @@ public void testSortAccountAndFieldsNameAccount() { } @Test - public void testSortAccountAndFieldsAccountName() { + public void testSortAccountAndFieldsAccountName() throws IOException { JSONObject actual = executeQuery( String.format( @@ -154,7 +157,7 @@ public void testSortAccountAndFieldsAccountName() { } @Test - public void testSortAgeAndFieldsAge() { + public void testSortAgeAndFieldsAge() throws IOException { JSONObject actual = executeQuery(String.format("source=%s | sort - age | fields age", TEST_INDEX_BANK)); verifySchema(actual, schema("age", "int")); @@ -163,7 +166,7 @@ public void testSortAgeAndFieldsAge() { } @Test - public void testSortAgeAndFieldsNameAge() { + public void testSortAgeAndFieldsNameAge() throws IOException { JSONObject actual = executeQuery( String.format("source=%s | sort - age | fields firstname, age", TEST_INDEX_BANK)); @@ -180,7 +183,7 @@ public void testSortAgeAndFieldsNameAge() { } @Test - public void testSortAgeNameAndFieldsNameAge() { + public void testSortAgeNameAndFieldsNameAge() throws IOException { JSONObject actual = executeQuery( String.format( diff --git a/integ-test/src/test/java/org/opensearch/sql/calcite/standalone/CalcitePPLStringBuiltinFunctionIT.java b/integ-test/src/test/java/org/opensearch/sql/calcite/remote/CalcitePPLStringBuiltinFunctionIT.java similarity index 93% rename from integ-test/src/test/java/org/opensearch/sql/calcite/standalone/CalcitePPLStringBuiltinFunctionIT.java rename to integ-test/src/test/java/org/opensearch/sql/calcite/remote/CalcitePPLStringBuiltinFunctionIT.java index 616a3375426..4ffad6dc74f 100644 --- a/integ-test/src/test/java/org/opensearch/sql/calcite/standalone/CalcitePPLStringBuiltinFunctionIT.java +++ b/integ-test/src/test/java/org/opensearch/sql/calcite/remote/CalcitePPLStringBuiltinFunctionIT.java @@ -3,7 +3,7 @@ * SPDX-License-Identifier: Apache-2.0 */ -package org.opensearch.sql.calcite.standalone; +package org.opensearch.sql.calcite.remote; import static org.opensearch.sql.legacy.TestsConstants.TEST_INDEX_STATE_COUNTRY; import static org.opensearch.sql.legacy.TestsConstants.TEST_INDEX_STATE_COUNTRY_WITH_NULL; @@ -14,11 +14,15 @@ import org.json.JSONObject; import org.junit.jupiter.api.Test; import org.opensearch.client.Request; +import org.opensearch.sql.ppl.PPLIntegTestCase; -public class CalcitePPLStringBuiltinFunctionIT extends CalcitePPLIntegTestCase { +public class CalcitePPLStringBuiltinFunctionIT extends PPLIntegTestCase { @Override - public void init() throws IOException { + public void init() throws Exception { super.init(); + enableCalcite(); + disallowCalciteFallback(); + loadIndex(Index.STATE_COUNTRY); loadIndex(Index.STATE_COUNTRY_WITH_NULL); } @@ -41,7 +45,7 @@ public void testAscii() throws IOException { } @Test - public void testConcat() { + public void testConcat() throws IOException { JSONObject actual = executeQuery( String.format( @@ -90,7 +94,7 @@ public void testConcatWs() throws IOException { } @Test - public void testLength() { + public void testLength() throws IOException { JSONObject actual = executeQuery( String.format( @@ -102,7 +106,7 @@ public void testLength() { } @Test - public void testLengthShouldBeInsensitive() { + public void testLengthShouldBeInsensitive() throws IOException { JSONObject actual = executeQuery( String.format( @@ -114,7 +118,7 @@ public void testLengthShouldBeInsensitive() { } @Test - public void testLower() { + public void testLower() throws IOException { JSONObject actual = executeQuery( String.format( @@ -127,7 +131,7 @@ public void testLower() { } @Test - public void testUpper() { + public void testUpper() throws IOException { JSONObject actual = executeQuery( String.format( @@ -140,7 +144,7 @@ public void testUpper() { } @Test - public void testLike() { + public void testLike() throws IOException { JSONObject actual = executeQuery( String.format( @@ -153,7 +157,7 @@ public void testLike() { } @Test - public void testLocate() { + public void testLocate() throws IOException { JSONObject actual = executeQuery( String.format( @@ -167,7 +171,7 @@ public void testLocate() { } @Test - public void testSubstring() { + public void testSubstring() throws IOException { JSONObject actual = executeQuery( String.format( @@ -180,7 +184,7 @@ public void testSubstring() { } @Test - public void testSubstr() { + public void testSubstr() throws IOException { JSONObject actual = executeQuery( String.format( @@ -193,7 +197,7 @@ public void testSubstr() { } @Test - public void testPosition() { + public void testPosition() throws IOException { JSONObject actual = executeQuery( String.format( diff --git a/integ-test/src/test/java/org/opensearch/sql/calcite/standalone/CalcitePPLTrendlineIT.java b/integ-test/src/test/java/org/opensearch/sql/calcite/remote/CalcitePPLTrendlineIT.java similarity index 94% rename from integ-test/src/test/java/org/opensearch/sql/calcite/standalone/CalcitePPLTrendlineIT.java rename to integ-test/src/test/java/org/opensearch/sql/calcite/remote/CalcitePPLTrendlineIT.java index c4867a83137..0e8ece14142 100644 --- a/integ-test/src/test/java/org/opensearch/sql/calcite/standalone/CalcitePPLTrendlineIT.java +++ b/integ-test/src/test/java/org/opensearch/sql/calcite/remote/CalcitePPLTrendlineIT.java @@ -3,7 +3,7 @@ * SPDX-License-Identifier: Apache-2.0 */ -package org.opensearch.sql.calcite.standalone; +package org.opensearch.sql.calcite.remote; import static org.opensearch.sql.legacy.TestsConstants.TEST_INDEX_BANK; import static org.opensearch.sql.legacy.TestsConstants.TEST_INDEX_BANK_WITH_NULL_VALUES; @@ -15,12 +15,16 @@ import java.io.IOException; import org.json.JSONObject; import org.junit.jupiter.api.Test; +import org.opensearch.sql.ppl.PPLIntegTestCase; -public class CalcitePPLTrendlineIT extends CalcitePPLIntegTestCase { +public class CalcitePPLTrendlineIT extends PPLIntegTestCase { @Override - public void init() throws IOException { + public void init() throws Exception { super.init(); + enableCalcite(); + disallowCalciteFallback(); + loadIndex(Index.BANK); loadIndex(Index.BANK_WITH_NULL_VALUES); } diff --git a/integ-test/src/test/java/org/opensearch/sql/calcite/standalone/CalcitePPLBuiltinFunctionPushdownIT.java b/integ-test/src/test/java/org/opensearch/sql/calcite/standalone/CalcitePPLBuiltinFunctionPushdownIT.java deleted file mode 100644 index d6bd2c55d81..00000000000 --- a/integ-test/src/test/java/org/opensearch/sql/calcite/standalone/CalcitePPLBuiltinFunctionPushdownIT.java +++ /dev/null @@ -1,16 +0,0 @@ -/* - * Copyright OpenSearch Contributors - * SPDX-License-Identifier: Apache-2.0 - */ - -package org.opensearch.sql.calcite.standalone; - -import org.opensearch.sql.common.setting.Settings; - -public class CalcitePPLBuiltinFunctionPushdownIT extends CalcitePPLBuiltinFunctionIT { - - @Override - protected Settings getSettings() { - return enablePushdown(); - } -} diff --git a/integ-test/src/test/java/org/opensearch/sql/calcite/standalone/CalcitePPLDedupPushdownIT.java b/integ-test/src/test/java/org/opensearch/sql/calcite/standalone/CalcitePPLDedupPushdownIT.java deleted file mode 100644 index b2551ebfb0f..00000000000 --- a/integ-test/src/test/java/org/opensearch/sql/calcite/standalone/CalcitePPLDedupPushdownIT.java +++ /dev/null @@ -1,16 +0,0 @@ -/* - * Copyright OpenSearch Contributors - * SPDX-License-Identifier: Apache-2.0 - */ - -package org.opensearch.sql.calcite.standalone; - -import org.opensearch.sql.common.setting.Settings; - -public class CalcitePPLDedupPushdownIT extends CalcitePPLDedupIT { - - @Override - protected Settings getSettings() { - return enablePushdown(); - } -} diff --git a/integ-test/src/test/java/org/opensearch/sql/calcite/standalone/CalcitePPLEventstatsPushdownIT.java b/integ-test/src/test/java/org/opensearch/sql/calcite/standalone/CalcitePPLEventstatsPushdownIT.java deleted file mode 100644 index 290e8f9163d..00000000000 --- a/integ-test/src/test/java/org/opensearch/sql/calcite/standalone/CalcitePPLEventstatsPushdownIT.java +++ /dev/null @@ -1,15 +0,0 @@ -/* - * Copyright OpenSearch Contributors - * SPDX-License-Identifier: Apache-2.0 - */ - -package org.opensearch.sql.calcite.standalone; - -import org.opensearch.sql.common.setting.Settings; - -public class CalcitePPLEventstatsPushdownIT extends CalcitePPLEventstatsIT { - @Override - protected Settings getSettings() { - return enablePushdown(); - } -} diff --git a/integ-test/src/test/java/org/opensearch/sql/calcite/standalone/CalcitePPLExistsSubqueryPushdownIT.java b/integ-test/src/test/java/org/opensearch/sql/calcite/standalone/CalcitePPLExistsSubqueryPushdownIT.java deleted file mode 100644 index 1064be3b8c3..00000000000 --- a/integ-test/src/test/java/org/opensearch/sql/calcite/standalone/CalcitePPLExistsSubqueryPushdownIT.java +++ /dev/null @@ -1,16 +0,0 @@ -/* - * Copyright OpenSearch Contributors - * SPDX-License-Identifier: Apache-2.0 - */ - -package org.opensearch.sql.calcite.standalone; - -import org.opensearch.sql.common.setting.Settings; - -public class CalcitePPLExistsSubqueryPushdownIT extends CalcitePPLExistsSubqueryIT { - - @Override - protected Settings getSettings() { - return enablePushdown(); - } -} diff --git a/integ-test/src/test/java/org/opensearch/sql/calcite/standalone/CalcitePPLExplainPushdownIT.java b/integ-test/src/test/java/org/opensearch/sql/calcite/standalone/CalcitePPLExplainPushdownIT.java deleted file mode 100644 index 2bc65338098..00000000000 --- a/integ-test/src/test/java/org/opensearch/sql/calcite/standalone/CalcitePPLExplainPushdownIT.java +++ /dev/null @@ -1,62 +0,0 @@ -/* - * Copyright OpenSearch Contributors - * SPDX-License-Identifier: Apache-2.0 - */ - -package org.opensearch.sql.calcite.standalone; - -import org.junit.jupiter.api.Test; -import org.opensearch.sql.common.setting.Settings; - -public class CalcitePPLExplainPushdownIT extends CalcitePPLExplainIT { - @Override - protected Settings getSettings() { - return enablePushdown(); - } - - @Override - @Test - public void testExplainCommand() { - String result = explainQuery("explain source=test | where age = 20 | fields name, age"); - assertEquals( - "{\n" - + " \"calcite\": {\n" - + " \"logical\": \"LogicalProject(name=[$0], age=[$1])\\n" - + " LogicalFilter(condition=[=($1, 20)])\\n" - + " CalciteLogicalIndexScan(table=[[OpenSearch, test]])\\n" - + "\",\n" - + " \"physical\": \"CalciteEnumerableIndexScan(table=[[OpenSearch, test]]," - + " PushDownContext=[[PROJECT->[name, age], FILTER->=($1, 20)]," - + " OpenSearchRequestBuilder(sourceBuilder={\\\"from\\\":0,\\\"timeout\\\":\\\"1m\\\",\\\"query\\\":{\\\"term\\\":{\\\"age\\\":{\\\"value\\\":20,\\\"boost\\\":1.0}}},\\\"_source\\\":{\\\"includes\\\":[\\\"name\\\",\\\"age\\\"],\\\"excludes\\\":[]},\\\"sort\\\":[{\\\"_doc\\\":{\\\"order\\\":\\\"asc\\\"}}]}," - + " requestedTotalSize=2147483647, pageSize=null, startFrom=0)])\\n" - + "\"\n" - + " }\n" - + "}", - result); - } - - @Override - @Test - public void testExplainCommandCost() { - String result = explainQuery("explain cost source=test | where age = 20 | fields name, age"); - String expected = - "{\n" - + " \"calcite\": {\n" - + " \"logical\": \"LogicalProject(name=[$0], age=[$1]): rowcount = 1500.0," - + " cumulative cost = {13000.0 rows, 23001.0 cpu, 0.0 io}, id = *\\n" - + " LogicalFilter(condition=[=($1, 20)]): rowcount = 1500.0, cumulative cost =" - + " {11500.0 rows, 20001.0 cpu, 0.0 io}, id = *\\n" - + " CalciteLogicalIndexScan(table=[[OpenSearch, test]]): rowcount = 10000.0," - + " cumulative cost = {10000.0 rows, 10001.0 cpu, 0.0 io}, id = *\\n" - + "\",\n" - + " \"physical\": \"CalciteEnumerableIndexScan(table=[[OpenSearch, test]]," - + " PushDownContext=[[PROJECT->[name, age], FILTER->=($1, 20)]," - + " OpenSearchRequestBuilder(sourceBuilder={\\\"from\\\":0,\\\"timeout\\\":\\\"1m\\\",\\\"query\\\":{\\\"term\\\":{\\\"age\\\":{\\\"value\\\":20,\\\"boost\\\":1.0}}},\\\"_source\\\":{\\\"includes\\\":[\\\"name\\\",\\\"age\\\"],\\\"excludes\\\":[]},\\\"sort\\\":[{\\\"_doc\\\":{\\\"order\\\":\\\"asc\\\"}}]}," - + " requestedTotalSize=2147483647, pageSize=null, startFrom=0)]): rowcount = 1215.0," - + " cumulative cost = {1215.0 rows, 1216.0 cpu, 0.0 io}, id = *\\n" - + "\"\n" - + " }\n" - + "}"; - assertEquals(expected, result.replaceAll("id = \\d+", "id = *")); - } -} diff --git a/integ-test/src/test/java/org/opensearch/sql/calcite/standalone/CalcitePPLFillnullPushdownIT.java b/integ-test/src/test/java/org/opensearch/sql/calcite/standalone/CalcitePPLFillnullPushdownIT.java deleted file mode 100644 index a93fa4f865c..00000000000 --- a/integ-test/src/test/java/org/opensearch/sql/calcite/standalone/CalcitePPLFillnullPushdownIT.java +++ /dev/null @@ -1,15 +0,0 @@ -/* - * Copyright OpenSearch Contributors - * SPDX-License-Identifier: Apache-2.0 - */ - -package org.opensearch.sql.calcite.standalone; - -import org.opensearch.sql.common.setting.Settings; - -public class CalcitePPLFillnullPushdownIT extends CalcitePPLFillnullIT { - @Override - protected Settings getSettings() { - return enablePushdown(); - } -} diff --git a/integ-test/src/test/java/org/opensearch/sql/calcite/standalone/CalcitePPLGrokPushdownIT.java b/integ-test/src/test/java/org/opensearch/sql/calcite/standalone/CalcitePPLGrokPushdownIT.java deleted file mode 100644 index a1f318f2d44..00000000000 --- a/integ-test/src/test/java/org/opensearch/sql/calcite/standalone/CalcitePPLGrokPushdownIT.java +++ /dev/null @@ -1,15 +0,0 @@ -/* - * Copyright OpenSearch Contributors - * SPDX-License-Identifier: Apache-2.0 - */ - -package org.opensearch.sql.calcite.standalone; - -import org.opensearch.sql.common.setting.Settings; - -public class CalcitePPLGrokPushdownIT extends CalcitePPLGrokIT { - @Override - protected Settings getSettings() { - return enablePushdown(); - } -} diff --git a/integ-test/src/test/java/org/opensearch/sql/calcite/standalone/CalcitePPLIPFunctionPushdownIT.java b/integ-test/src/test/java/org/opensearch/sql/calcite/standalone/CalcitePPLIPFunctionPushdownIT.java deleted file mode 100644 index f1455b01f0e..00000000000 --- a/integ-test/src/test/java/org/opensearch/sql/calcite/standalone/CalcitePPLIPFunctionPushdownIT.java +++ /dev/null @@ -1,15 +0,0 @@ -/* - * Copyright OpenSearch Contributors - * SPDX-License-Identifier: Apache-2.0 - */ - -package org.opensearch.sql.calcite.standalone; - -import org.opensearch.sql.common.setting.Settings; - -public class CalcitePPLIPFunctionPushdownIT extends CalcitePPLIPFunctionIT { - @Override - protected Settings getSettings() { - return enablePushdown(); - } -} diff --git a/integ-test/src/test/java/org/opensearch/sql/calcite/standalone/CalcitePPLInSubqueryPushdownIT.java b/integ-test/src/test/java/org/opensearch/sql/calcite/standalone/CalcitePPLInSubqueryPushdownIT.java deleted file mode 100644 index 29e779acfe3..00000000000 --- a/integ-test/src/test/java/org/opensearch/sql/calcite/standalone/CalcitePPLInSubqueryPushdownIT.java +++ /dev/null @@ -1,16 +0,0 @@ -/* - * Copyright OpenSearch Contributors - * SPDX-License-Identifier: Apache-2.0 - */ - -package org.opensearch.sql.calcite.standalone; - -import org.opensearch.sql.common.setting.Settings; - -public class CalcitePPLInSubqueryPushdownIT extends CalcitePPLInSubqueryIT { - - @Override - protected Settings getSettings() { - return enablePushdown(); - } -} diff --git a/integ-test/src/test/java/org/opensearch/sql/calcite/standalone/CalcitePPLJoinPushdownIT.java b/integ-test/src/test/java/org/opensearch/sql/calcite/standalone/CalcitePPLJoinPushdownIT.java deleted file mode 100644 index 33f3d5d6021..00000000000 --- a/integ-test/src/test/java/org/opensearch/sql/calcite/standalone/CalcitePPLJoinPushdownIT.java +++ /dev/null @@ -1,16 +0,0 @@ -/* - * Copyright OpenSearch Contributors - * SPDX-License-Identifier: Apache-2.0 - */ - -package org.opensearch.sql.calcite.standalone; - -import org.opensearch.sql.common.setting.Settings; - -public class CalcitePPLJoinPushdownIT extends CalcitePPLJoinIT { - - @Override - protected Settings getSettings() { - return enablePushdown(); - } -} diff --git a/integ-test/src/test/java/org/opensearch/sql/calcite/standalone/CalcitePPLLookupPushdownIT.java b/integ-test/src/test/java/org/opensearch/sql/calcite/standalone/CalcitePPLLookupPushdownIT.java deleted file mode 100644 index 55b68f54e5f..00000000000 --- a/integ-test/src/test/java/org/opensearch/sql/calcite/standalone/CalcitePPLLookupPushdownIT.java +++ /dev/null @@ -1,15 +0,0 @@ -/* - * Copyright OpenSearch Contributors - * SPDX-License-Identifier: Apache-2.0 - */ - -package org.opensearch.sql.calcite.standalone; - -import org.opensearch.sql.common.setting.Settings; - -public class CalcitePPLLookupPushdownIT extends CalcitePPLLookupIT { - @Override - protected Settings getSettings() { - return enablePushdown(); - } -} diff --git a/integ-test/src/test/java/org/opensearch/sql/calcite/standalone/CalcitePPLParsePushdownIT.java b/integ-test/src/test/java/org/opensearch/sql/calcite/standalone/CalcitePPLParsePushdownIT.java deleted file mode 100644 index 8d3790ea9d4..00000000000 --- a/integ-test/src/test/java/org/opensearch/sql/calcite/standalone/CalcitePPLParsePushdownIT.java +++ /dev/null @@ -1,15 +0,0 @@ -/* - * Copyright OpenSearch Contributors - * SPDX-License-Identifier: Apache-2.0 - */ - -package org.opensearch.sql.calcite.standalone; - -import org.opensearch.sql.common.setting.Settings; - -public class CalcitePPLParsePushdownIT extends CalcitePPLParseIT { - @Override - protected Settings getSettings() { - return enablePushdown(); - } -} diff --git a/integ-test/src/test/java/org/opensearch/sql/calcite/standalone/CalcitePPLPatternsPushdownIT.java b/integ-test/src/test/java/org/opensearch/sql/calcite/standalone/CalcitePPLPatternsPushdownIT.java deleted file mode 100644 index b1d18fda69a..00000000000 --- a/integ-test/src/test/java/org/opensearch/sql/calcite/standalone/CalcitePPLPatternsPushdownIT.java +++ /dev/null @@ -1,15 +0,0 @@ -/* - * Copyright OpenSearch Contributors - * SPDX-License-Identifier: Apache-2.0 - */ - -package org.opensearch.sql.calcite.standalone; - -import org.opensearch.sql.common.setting.Settings; - -public class CalcitePPLPatternsPushdownIT extends CalcitePPLPatternsIT { - @Override - protected Settings getSettings() { - return enablePushdown(); - } -} diff --git a/integ-test/src/test/java/org/opensearch/sql/calcite/standalone/CalcitePPLRenamePushdownIT.java b/integ-test/src/test/java/org/opensearch/sql/calcite/standalone/CalcitePPLRenamePushdownIT.java deleted file mode 100644 index 44b5406849f..00000000000 --- a/integ-test/src/test/java/org/opensearch/sql/calcite/standalone/CalcitePPLRenamePushdownIT.java +++ /dev/null @@ -1,16 +0,0 @@ -/* - * Copyright OpenSearch Contributors - * SPDX-License-Identifier: Apache-2.0 - */ - -package org.opensearch.sql.calcite.standalone; - -import org.opensearch.sql.common.setting.Settings; - -public class CalcitePPLRenamePushdownIT extends CalcitePPLRenameIT { - - @Override - protected Settings getSettings() { - return enablePushdown(); - } -} diff --git a/integ-test/src/test/java/org/opensearch/sql/calcite/standalone/CalcitePPLScalarSubqueryPushdownIT.java b/integ-test/src/test/java/org/opensearch/sql/calcite/standalone/CalcitePPLScalarSubqueryPushdownIT.java deleted file mode 100644 index 5a8fbc56edc..00000000000 --- a/integ-test/src/test/java/org/opensearch/sql/calcite/standalone/CalcitePPLScalarSubqueryPushdownIT.java +++ /dev/null @@ -1,16 +0,0 @@ -/* - * Copyright OpenSearch Contributors - * SPDX-License-Identifier: Apache-2.0 - */ - -package org.opensearch.sql.calcite.standalone; - -import org.opensearch.sql.common.setting.Settings; - -public class CalcitePPLScalarSubqueryPushdownIT extends CalcitePPLScalarSubqueryIT { - - @Override - protected Settings getSettings() { - return enablePushdown(); - } -} diff --git a/integ-test/src/test/java/org/opensearch/sql/calcite/standalone/CalcitePPLSortPushdownIT.java b/integ-test/src/test/java/org/opensearch/sql/calcite/standalone/CalcitePPLSortPushdownIT.java deleted file mode 100644 index 881c554a02c..00000000000 --- a/integ-test/src/test/java/org/opensearch/sql/calcite/standalone/CalcitePPLSortPushdownIT.java +++ /dev/null @@ -1,16 +0,0 @@ -/* - * Copyright OpenSearch Contributors - * SPDX-License-Identifier: Apache-2.0 - */ - -package org.opensearch.sql.calcite.standalone; - -import org.opensearch.sql.common.setting.Settings; - -public class CalcitePPLSortPushdownIT extends CalcitePPLSortIT { - - @Override - protected Settings getSettings() { - return enablePushdown(); - } -} diff --git a/integ-test/src/test/java/org/opensearch/sql/calcite/standalone/CalcitePPLStringBuiltinFunctionPushdownIT.java b/integ-test/src/test/java/org/opensearch/sql/calcite/standalone/CalcitePPLStringBuiltinFunctionPushdownIT.java deleted file mode 100644 index 034c76bdeab..00000000000 --- a/integ-test/src/test/java/org/opensearch/sql/calcite/standalone/CalcitePPLStringBuiltinFunctionPushdownIT.java +++ /dev/null @@ -1,15 +0,0 @@ -/* - * Copyright OpenSearch Contributors - * SPDX-License-Identifier: Apache-2.0 - */ - -package org.opensearch.sql.calcite.standalone; - -import org.opensearch.sql.common.setting.Settings; - -public class CalcitePPLStringBuiltinFunctionPushdownIT extends CalcitePPLStringBuiltinFunctionIT { - @Override - protected Settings getSettings() { - return enablePushdown(); - } -} diff --git a/integ-test/src/test/java/org/opensearch/sql/calcite/standalone/CalcitePPLTrendlinePushdownIT.java b/integ-test/src/test/java/org/opensearch/sql/calcite/standalone/CalcitePPLTrendlinePushdownIT.java deleted file mode 100644 index c046240f52c..00000000000 --- a/integ-test/src/test/java/org/opensearch/sql/calcite/standalone/CalcitePPLTrendlinePushdownIT.java +++ /dev/null @@ -1,15 +0,0 @@ -/* - * Copyright OpenSearch Contributors - * SPDX-License-Identifier: Apache-2.0 - */ - -package org.opensearch.sql.calcite.standalone; - -import org.opensearch.sql.common.setting.Settings; - -public class CalcitePPLTrendlinePushdownIT extends CalcitePPLTrendlineIT { - @Override - protected Settings getSettings() { - return enablePushdown(); - } -}