{"record":{"id":"452c9081d4480676","repo":"prestodb/presto","slug":"lance-error-452c90","errorCode":"LANCE_ERROR","errorMessage":"Failed to read schema for table %s.%s at %s","messagePattern":"Failed to read schema for table (.+?)\\.(.+?) at (.+?)","errorType":"error_code","errorClass":"PrestoException","httpStatus":null,"severity":"error","filePath":"presto-lance/src/main/java/com/facebook/presto/lance/LanceMetadata.java","lineNumber":137,"sourceCode":"    }\n\n    /**\n     * Reads the Arrow schema for an already-resolved table handle.\n     *\n     * <p>The handle's path came from the namespace, so a failure here means the dataset itself\n     * could not be opened. Returning {@code null}/empty in that case would surface as an NPE or\n     * as a table that appears to have no columns, both of which hide the real cause.\n     */\n    private Schema describeTableOrFail(LanceTableHandle lanceTable)\n    {\n        try {\n            return namespaceHolder.describeTable(lanceTable.getTablePath(), lanceTable.getDatasetVersion());\n        }\n        catch (PrestoException e) {\n            throw e;\n        }\n        catch (RuntimeException e) {\n            throw new PrestoException(LanceErrorCode.LANCE_ERROR,\n                    format(\"Failed to read schema for table %s.%s at %s\",\n                            lanceTable.getSchemaName(), lanceTable.getTableName(), lanceTable.getTablePath()),\n                    e);\n        }\n    }\n\n    @Override\n    public List<SchemaTableName> listTables(ConnectorSession session, Optional<String> schemaName)\n    {\n        if (schemaName.isPresent()) {\n            String schema = schemaName.get();\n            if (!namespaceHolder.schemaExists(schema)) {\n                return ImmutableList.of();\n            }\n            return listTablesInSchema(schema);\n        }\n\n        // No schema filter means every schema in the catalog. Falling back to a single","sourceCodeStart":119,"sourceCodeEnd":155,"githubUrl":"https://github.com/prestodb/presto/blob/55bb57d202de3b926896fa966c2c4a44c779634e/presto-lance/src/main/java/com/facebook/presto/lance/LanceMetadata.java#L119-L155","documentation":"Thrown by describeTableOrFail when the Lance namespace cannot open the dataset at the handle's path/version to read its Arrow schema. The handle path came from the namespace listing, so failure indicates the dataset itself is unreadable (deleted, corrupted, wrong version, or storage access issue); the code deliberately fails fast instead of returning null, which would surface as an NPE or an empty-schema table.","triggerScenarios":"Thrown at presto-lance/src/main/java/com/facebook/presto/lance/LanceMetadata.java:137 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Verify the Lance dataset path exists and is accessible from the Presto coordinator","Check the dataset version in the table handle is still valid (not GC'd)","Inspect the underlying cause in the wrapped exception for storage/permission errors"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"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"}