{"record":{"id":"f3325dcea49d835c","repo":"prestodb/presto","slug":"table-not-setup","errorCode":null,"errorMessage":"Table not setup: ","messagePattern":"Table not setup: ","errorType":"validation","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"presto-thrift-testing-server/src/main/java/com/facebook/presto/connector/thrift/server/ThriftTpchService.java","lineNumber":291,"sourceCode":"    private static ConnectorPageSource createPageSource(SplitInfo splitInfo, List<String> columnNames)\n    {\n        switch (splitInfo.getTableName()) {\n            case \"orders\":\n                return createPageSource(TpchTable.ORDERS, columnNames, splitInfo);\n            case \"customer\":\n                return createPageSource(TpchTable.CUSTOMER, columnNames, splitInfo);\n            case \"lineitem\":\n                return createPageSource(TpchTable.LINE_ITEM, columnNames, splitInfo);\n            case \"nation\":\n                return createPageSource(TpchTable.NATION, columnNames, splitInfo);\n            case \"region\":\n                return createPageSource(TpchTable.REGION, columnNames, splitInfo);\n            case \"part\":\n                return createPageSource(TpchTable.PART, columnNames, splitInfo);\n            case \"supplier\":\n                return createPageSource(TpchTable.SUPPLIER, columnNames, splitInfo);\n            default:\n                throw new IllegalArgumentException(\"Table not setup: \" + splitInfo.getTableName());\n        }\n    }\n\n    private static <T extends TpchEntity> ConnectorPageSource createPageSource(TpchTable<T> table, List<String> columnNames, SplitInfo splitInfo)\n    {\n        List<TpchColumn<T>> columns = columnNames.stream().map(table::getColumn).collect(toList());\n        return new RecordPageSource(createTpchRecordSet(\n                table,\n                columns,\n                schemaNameToScaleFactor(splitInfo.getSchemaName()),\n                splitInfo.getPartNumber(),\n                splitInfo.getTotalParts(),\n                TupleDomain.all()));\n    }\n\n    private static List<String> getSchemaNames(String schemaNameOrNull)\n    {\n        if (schemaNameOrNull == null) {","sourceCodeStart":273,"sourceCodeEnd":309,"githubUrl":"https://github.com/prestodb/presto/blob/55bb57d202de3b926896fa966c2c4a44c779634e/presto-thrift-testing-server/src/main/java/com/facebook/presto/connector/thrift/server/ThriftTpchService.java#L273-L309","documentation":"ThriftTpchService.createPageSource(SplitInfo,...) dispatches on the split's table name and only knows nation, region, part, supplier, etc.; any other table hits the default branch and throws IllegalArgumentException(\"Table not setup: <name>\"). The in-memory TPCH test service only serves the tables it explicitly wired.","triggerScenarios":"Querying the thrift testing server for a TPCH table that was not registered in createPageSource's switch (e.g., orders, lineitem, if absent in the deployed version).","commonSituations":"Tests assuming all TPCH tables exist on the thrift testing server; new TPCH tables queried before extending the service; typos in table names in test SQL.","solutions":["Query only tables registered in the switch (check the deployed ThriftTpchService version)","Add a case for the missing table: createPageSource(TpchTable.<NAME>, columnNames, splitInfo)","Correct the table name in the test query"],"exampleFix":"// before\ncase \"supplier\":\n    return createPageSource(TpchTable.SUPPLIER, columnNames, splitInfo);\ndefault:\n    throw new IllegalArgumentException(\"Table not setup: \" + splitInfo.getTableName());\n// after\ncase \"supplier\":\n    return createPageSource(TpchTable.SUPPLIER, columnNames, splitInfo);\ncase \"orders\":\n    return createPageSource(TpchTable.ORDERS, columnNames, splitInfo);\ndefault:\n    throw new IllegalArgumentException(\"Table not setup: \" + splitInfo.getTableName());","handlingStrategy":"validation","validationCode":"Set<String> supportedTables = Set.of(\"nation\", \"region\", \"part\", \"supplier\");\nif (!supportedTables.contains(tableName)) {\n    throw new IllegalArgumentException(\"table not served by thrift test server: \" + tableName);\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Check the deployed ThriftTpchService switch for supported tables before writing tests","Add a case per TPCH table when extending the test server","Verify table names in test SQL against TpchTable entries"],"tags":["thrift","testing","tpch","configuration"],"backgroundTag":"table-not-configured","analyzedSha":"55bb57d202de3b926896fa966c2c4a44c779634e","analyzedAt":"2026-09-04T12:50:26.162Z","contentChangedAt":"2026-09-04T12:50:26.162Z","schemaVersion":2},"datasetVersion":"2026-09-11T21:17:09.523Z"}