prestodb/presto · error · PrestoException

LANCE_ERROR

LANCE_ERROR

Error message

Failed to read schema for table %s.%s at %s

What it means

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.

Source

Thrown at presto-lance/src/main/java/com/facebook/presto/lance/LanceMetadata.java:137

    }

    /**
     * Reads the Arrow schema for an already-resolved table handle.
     *
     * <p>The handle's path came from the namespace, so a failure here means the dataset itself
     * could not be opened. Returning {@code null}/empty in that case would surface as an NPE or
     * as a table that appears to have no columns, both of which hide the real cause.
     */
    private Schema describeTableOrFail(LanceTableHandle lanceTable)
    {
        try {
            return namespaceHolder.describeTable(lanceTable.getTablePath(), lanceTable.getDatasetVersion());
        }
        catch (PrestoException e) {
            throw e;
        }
        catch (RuntimeException e) {
            throw new PrestoException(LanceErrorCode.LANCE_ERROR,
                    format("Failed to read schema for table %s.%s at %s",
                            lanceTable.getSchemaName(), lanceTable.getTableName(), lanceTable.getTablePath()),
                    e);
        }
    }

    @Override
    public List<SchemaTableName> listTables(ConnectorSession session, Optional<String> schemaName)
    {
        if (schemaName.isPresent()) {
            String schema = schemaName.get();
            if (!namespaceHolder.schemaExists(schema)) {
                return ImmutableList.of();
            }
            return listTablesInSchema(schema);
        }

        // No schema filter means every schema in the catalog. Falling back to a single

View on GitHub (pinned to 55bb57d202)

Solutions

  1. Verify the Lance dataset path exists and is accessible from the Presto coordinator
  2. Check the dataset version in the table handle is still valid (not GC'd)
  3. Inspect the underlying cause in the wrapped exception for storage/permission errors
Defensive patterns

Strategy: try-catch

When it happens

Trigger: Thrown at presto-lance/src/main/java/com/facebook/presto/lance/LanceMetadata.java:137 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of prestodb/presto@55bb57d202 (2026-09-04). Data as JSON: /api/errors/452c9081d4480676. Report an issue: GitHub.