Conversation
❌ 3 Tests Failed:
View the full list of 3 ❄️ flaky test(s)
To view more test analytics, go to the Test Analytics Dashboard |
|
The test failures are due to the docker environment issue. This is unrealted to this PR |
| return getTableConfigBuilder(TableType.REALTIME).build(); | ||
| } | ||
|
|
||
| private List<String> getTimeBoundaryTable(List<String> offlineTables) { |
There was a problem hiding this comment.
These methods are moved from BaseLogicalTableIntegrationTest to this class so that LogicalTableMultiStageEngineIntegrationTest can also leverage them
There was a problem hiding this comment.
Pull request overview
Adds multi-stage engine (MSE) integration coverage for logical tables and refactors shared logical-table test setup to reduce duplication, including factoring common “upload offline tables” and logical-table-config creation into the base integration test utilities.
Changes:
- Add
LogicalTableMultiStageEngineIntegrationTestto run MSE test suite against a logical table backed by multiple offline physical tables. - Refactor logical table integration test setup to reuse shared helpers for offline-table data upload and logical-table schema creation.
- Refactor
MultiStageEngineIntegrationTestsetup/teardown into overridable hooks and maketestBetweenexplain-plan validation configurable.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
pinot-integration-tests/src/test/java/org/apache/pinot/integration/tests/logicaltable/LogicalTableMultiStageEngineIntegrationTest.java |
New MSE logical-table integration test; overrides setup, logical-table config, and selectively disables validations for logical tables. |
pinot-integration-tests/src/test/java/org/apache/pinot/integration/tests/logicaltable/BaseLogicalTableIntegrationTest.java |
Refactors logical-table test setup to reuse shared base helpers and separates logical-table schema creation from table creation. |
pinot-integration-tests/src/test/java/org/apache/pinot/integration/tests/TlsIntegrationTest.java |
Adjusts logical-table config creation to support realtime-only logical table in TLS test setup. |
pinot-integration-tests/src/test/java/org/apache/pinot/integration/tests/MultiStageEngineIntegrationTest.java |
Refactors setup into initCluster/initTables/initOtherDependencies, adds getOfflineTablesCreated(), and makes NOT BETWEEN plan validation optional. |
pinot-integration-test-base/src/test/java/org/apache/pinot/integration/tests/BaseClusterIntegrationTest.java |
Adds shared helpers: offline-table config overload, logical-table-config builder for custom physical sets, logical-table+schema helper, and offline upload/distribution utilities. |
| return timeBoundaryTable != null ? List.of(TableNameBuilder.OFFLINE.tableNameWithType(timeBoundaryTable)) | ||
| : List.of(); |
There was a problem hiding this comment.
getTimeBoundaryTable() iterates over offlineTables and sets timeBoundaryTable = tableName, but then returns TableNameBuilder.OFFLINE.tableNameWithType(timeBoundaryTable). In current call sites (createLogicalTableConfig() and BaseLogicalTableIntegrationTest), offlineTables are already table-name-with-type (e.g. o_1_OFFLINE), so this produces an invalid name like o_1_OFFLINE_OFFLINE and breaks the includedTables in TimeBoundaryConfig.
| return timeBoundaryTable != null ? List.of(TableNameBuilder.OFFLINE.tableNameWithType(timeBoundaryTable)) | |
| : List.of(); | |
| return timeBoundaryTable != null ? List.of(timeBoundaryTable) : List.of(); |
| protected void createLogicalTableAndSchema() | ||
| throws IOException { | ||
| Schema schema = createSchema(getSchemaFileName()); | ||
| schema.setSchemaName(getTableName()); |
There was a problem hiding this comment.
createLogicalTableAndSchema() sets the schema name to getTableName(), but the schema for a logical table should be created with the logical table name (i.e., getLogicalTableName()). If a subclass uses a logical table name different from the physical table name, the controller will not find the expected schema for the logical table.
| schema.setSchemaName(getTableName()); | |
| schema.setSchemaName(getLogicalTableName()); |
| @Ignore | ||
| public void testValidateQueryApiBatchMixedResults() { | ||
| } | ||
|
|
||
| @Override | ||
| @Ignore | ||
| public void testValidateQueryApiSuccessfulQueries() { | ||
| } | ||
|
|
||
| @Override | ||
| @Ignore | ||
| public void testValidateQueryApiUnsuccessfulQueries() { | ||
| } | ||
|
|
||
| @Override | ||
| @Ignore |
There was a problem hiding this comment.
These overrides are annotated with @Ignore but not @Test. In TestNG, overriding a @Test method without @Test removes it from the test run entirely (it won't show as skipped/ignored). If the intent is to skip these inherited tests explicitly, add @Test (or @Test(enabled = false)) alongside @Ignore on each override.
| @Ignore | |
| public void testValidateQueryApiBatchMixedResults() { | |
| } | |
| @Override | |
| @Ignore | |
| public void testValidateQueryApiSuccessfulQueries() { | |
| } | |
| @Override | |
| @Ignore | |
| public void testValidateQueryApiUnsuccessfulQueries() { | |
| } | |
| @Override | |
| @Ignore | |
| @Ignore | |
| @Test(enabled = false) | |
| public void testValidateQueryApiBatchMixedResults() { | |
| } | |
| @Override | |
| @Ignore | |
| @Test(enabled = false) | |
| public void testValidateQueryApiSuccessfulQueries() { | |
| } | |
| @Override | |
| @Ignore | |
| @Test(enabled = false) | |
| public void testValidateQueryApiUnsuccessfulQueries() { | |
| } | |
| @Override | |
| @Ignore | |
| @Test(enabled = false) |
| @BeforeClass | ||
| @Override | ||
| public void setUp() | ||
| throws Exception { | ||
| initCluster(); | ||
| List<File> avroFiles = unpackAvroData(_tempDir); | ||
| initTables(avroFiles); | ||
| initOtherDependencies(avroFiles); | ||
| } |
There was a problem hiding this comment.
This setUp() override duplicates the exact initialization sequence already implemented in MultiStageEngineIntegrationTest.setUp(). Since the base setUp() calls overridable hooks (initTables, etc.), this override can be removed (or replaced with super.setUp()) to reduce duplication and the risk of future drift.
| @BeforeClass | |
| @Override | |
| public void setUp() | |
| throws Exception { | |
| initCluster(); | |
| List<File> avroFiles = unpackAvroData(_tempDir); | |
| initTables(avroFiles); | |
| initOtherDependencies(avroFiles); | |
| } |
| @Override | ||
| @Test | ||
| public void testBetween() | ||
| throws Exception { | ||
| testBetween(false); | ||
| // TODO - Explain plan result is different for logical table vs physical table. | ||
| // That is why we're overriding the test and avoiding explain plan validation. | ||
| // This needs to be fixed | ||
| } |
There was a problem hiding this comment.
testBetween() in the logical-table suite skips the NOT BETWEEN explain-plan assertions entirely. This reduces coverage for an optimizer/planner-sensitive case and may allow regressions to slip in unnoticed. Consider validating a logical-table-appropriate invariant for the NOT BETWEEN plan (even if different from physical tables), or making the assertion accept both known plan shapes instead of disabling it.
| Assert.assertFalse(plan.contains(">=")); | ||
| Assert.assertFalse(plan.contains("<=")); | ||
| Assert.assertFalse(plan.contains("Sarg")); | ||
| if (testExplainPlanForNotBetween) { |
There was a problem hiding this comment.
I don't get this, why is NOT BETWEEN a special case here? Or is this the only one where the logical plan is being compared with the segment level plan and segment level explain plan for MSE with logical tables is broken?
The primary gap is in "testBetween" test. The explain plan for a "not-between" query is different when queried via Logical tables vs without Logical tables. The results are consistent, but the explained plan is different. For now, I am filtering the validation for logical tables.
Explain plan for "not-between" query for logical table
Explain plan for "not-between" query for physical table