prestodb/presto · error · ArrowException

ARROW_FLIGHT_METADATA_ERROR

ARROW_FLIGHT_METADATA_ERROR

Error message

Table columns could not be listed for table: 

What it means

ArrowMetadata.getColumnsList fetches the Arrow Flight schema for a table via clientHandler.getSchemaForTable and returns its fields. Any exception from the Flight client (connection failure, auth failure, table not found, RPC error) is wrapped into ArrowException(ARROW_FLIGHT_METADATA_ERROR) with the message 'Table columns could not be listed for table: <table>'. The root cause is always in the cause chain of the ArrowException.

Source

Thrown at presto-base-arrow-flight/src/main/java/com/facebook/plugin/arrow/ArrowMetadata.java:96

    {
        if (!listSchemaNames(session).contains(tableName.getSchemaName())) {
            return null;
        }

        if (!listTables(session, Optional.ofNullable(tableName.getSchemaName())).contains(tableName)) {
            return null;
        }
        return new ArrowTableHandle(tableName.getSchemaName(), tableName.getTableName());
    }

    public List<Field> getColumnsList(ConnectorSession connectorSession, String schema, String table)
    {
        try {
            Schema flightSchema = clientHandler.getSchemaForTable(connectorSession, schema, table);
            return flightSchema.getFields();
        }
        catch (Exception e) {
            throw new ArrowException(ARROW_FLIGHT_METADATA_ERROR, "Table columns could not be listed for table: " + table, e);
        }
    }

    @Override
    public Map<String, ColumnHandle> getColumnHandles(ConnectorSession session, ConnectorTableHandle tableHandle)
    {
        Map<String, ColumnHandle> columnHandles = new HashMap<>();

        String schemaValue = ((ArrowTableHandle) tableHandle).getSchema();
        String tableValue = ((ArrowTableHandle) tableHandle).getTable();
        List<Field> columnList = getColumnsList(session, schemaValue, tableValue);

        for (Field field : columnList) {
            String columnName = field.getName();
            Type type = getPrestoTypeFromArrowField(field);
            columnHandles.put(columnName, new ArrowColumnHandle(columnName, type));
        }
        return columnHandles;

View on GitHub (pinned to 55bb57d202)

Solutions

  1. Inspect the cause chain of the ArrowException for the actual Flight/transport error.
  2. Verify the Flight server is reachable from every Presto worker (host, port, TLS).
  3. Confirm the table exists on the Flight server and the descriptor naming matches.
  4. Re-check auth/TLS settings (key/cert files, tokens) in the catalog configuration.
  5. Retry after fixing server-side issues; metadata errors here are not transient by themselves.
Defensive patterns

Strategy: try-catch

Validate before calling

// Probe the Flight server before fetching columns
try (FlightClient client = createFlightClient()) {
    client.listTables(...) or client.getInfo(descriptor); // connectivity/auth probe
}

Try / catch

try {
    return metadata.getColumnsList(session, schema, table);
} catch (ArrowException e) {
    if (e.getErrorCode().getCode() == ARROW_FLIGHT_METADATA_ERROR.getCode()) {
        // inspect e.getCause(): reconnect, re-auth, or confirm table exists, then retry once
    }
    throw e;
}

Prevention

When it happens

Trigger: Calling getColumnsList (e.g. via getColumnHandles/columnList metadata API) when getSchemaForTable throws: Flight server unreachable, credentials rejected, descriptor does not match a table, or the server returns a non-schema RPC error.

Common situations: Flight server down or wrong host/port in catalog config; TLS cert mismatch between Presto and the Flight server; table dropped/renamed on the Flight server between listing and column fetch; expired auth token in session properties.

Related errors


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