gortiz commented on code in PR #12591: URL: https://github.com/apache/pinot/pull/12591#discussion_r1526634952
########## pinot-integration-tests/src/test/java/org/apache/pinot/integration/tests/MultiStageEngineIntegrationTest.java: ########## @@ -749,6 +758,76 @@ public void testSearch() assertNoError(jsonNode); } + @Override + protected String getTableName() { + return _tableName; + } + + @Test + public void testWithDatabaseContext() + throws Exception { + try { + _tableName = "db1." + DEFAULT_TABLE_NAME; + String defaultCol = "ActualElapsedTime"; + String customCol = "ActualElapsedTime_2"; + Schema schema = createSchema(); + schema.addField(new MetricFieldSpec(customCol, FieldSpec.DataType.INT)); + addSchema(schema); + TableConfig tableConfig = createOfflineTableConfig(); + assert tableConfig.getIndexingConfig().getNoDictionaryColumns() != null; + List<String> noDicCols = new ArrayList<>(DEFAULT_NO_DICTIONARY_COLUMNS); + noDicCols.add(customCol); + tableConfig.getIndexingConfig().setNoDictionaryColumns(noDicCols); + IngestionConfig ingestionConfig = new IngestionConfig(); + ingestionConfig.setTransformConfigs(List.of(new TransformConfig(customCol, defaultCol))); + tableConfig.setIngestionConfig(ingestionConfig); + addTableConfig(tableConfig); + + // Create and upload segments to 'db1.mytable' + TestUtils.ensureDirectoriesExistAndEmpty(_segmentDir, _tarDir); + ClusterIntegrationTestUtils.buildSegmentsFromAvro(_avroFiles, tableConfig, schema, 0, _segmentDir, _tarDir); + uploadSegments(getTableName(), _tarDir); + + // Wait for all documents loaded + waitForAllDocsLoaded(600_000L); + + // default database check. No database context passed + checkQueryResultForDBTest(defaultCol, DEFAULT_TABLE_NAME); Review Comment: Could we split these checks into different test methods? Right now if this check fails, we don't test the others, which means it could be more difficult to find the issue. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@pinot.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@pinot.apache.org For additional commands, e-mail: commits-h...@pinot.apache.org