Skip to content

Commit e02639d

Browse files
committed
Inject parquet settings in testSearchCommandWithSpecialIndexName
The test creates `logs-2021.01.11` and `logs-7.10.0-2021.01.11` directly via raw PUTs to exercise the parser's handling of dot/version-prefixed index names. The raw path bypasses `TestUtils.createIndexByRestClient`, so the analytics-engine `tests.analytics.parquet_indices=true` toggle never injects the composite/parquet settings. On the analytics-engine route this surfaces as `Table 'logs-2021.01.11' not found` (the catalog-builder only exposes indices that match an analytics-engine- recognized data format), failing the test. Routing the creates through `TestUtils.createIndexByRestClient` makes both code paths honor the toggle: legacy / Calcite continues to create plain Lucene-backed indices, analytics-engine gets parquet-backed composite indices. The index names are still tested verbatim. Surfaced by `CalciteSearchCommandIT` on the analytics-engine route. Signed-off-by: Kai Huang <ahkcs@amazon.com>
1 parent 9300574 commit e02639d

1 file changed

Lines changed: 7 additions & 2 deletions

File tree

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

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,10 +54,15 @@ public void testSearchCommandWithoutSearchKeyword() throws IOException {
5454

5555
@Test
5656
public void testSearchCommandWithSpecialIndexName() throws IOException {
57-
executeRequest(new Request("PUT", "/logs-2021.01.11"));
57+
// Route through TestUtils so the analytics-engine parquet-indices toggle
58+
// (tests.analytics.parquet_indices=true) applies the composite/parquet
59+
// settings; without them the analytics-engine planner can't find a backend
60+
// for the scan and the query 500s.
61+
org.opensearch.sql.legacy.TestUtils.createIndexByRestClient(client(), "logs-2021.01.11", null);
5862
verifyDataRows(executeQuery("search source=logs-2021.01.11"));
5963

60-
executeRequest(new Request("PUT", "/logs-7.10.0-2021.01.11"));
64+
org.opensearch.sql.legacy.TestUtils.createIndexByRestClient(
65+
client(), "logs-7.10.0-2021.01.11", null);
6166
verifyDataRows(executeQuery("search source=logs-7.10.0-2021.01.11"));
6267
}
6368

0 commit comments

Comments
 (0)