{"record":{"id":"7d5fada25c2e9679","repo":"prestodb/presto","slug":"arrow-flight-metadata-error","errorCode":"ARROW_FLIGHT_METADATA_ERROR","errorMessage":"Table columns could not be listed for table: ","messagePattern":"Table columns could not be listed for table: ","errorType":"error_code","errorClass":"ArrowException","httpStatus":null,"severity":"error","filePath":"presto-base-arrow-flight/src/main/java/com/facebook/plugin/arrow/ArrowMetadata.java","lineNumber":96,"sourceCode":"    {\n        if (!listSchemaNames(session).contains(tableName.getSchemaName())) {\n            return null;\n        }\n\n        if (!listTables(session, Optional.ofNullable(tableName.getSchemaName())).contains(tableName)) {\n            return null;\n        }\n        return new ArrowTableHandle(tableName.getSchemaName(), tableName.getTableName());\n    }\n\n    public List<Field> getColumnsList(ConnectorSession connectorSession, String schema, String table)\n    {\n        try {\n            Schema flightSchema = clientHandler.getSchemaForTable(connectorSession, schema, table);\n            return flightSchema.getFields();\n        }\n        catch (Exception e) {\n            throw new ArrowException(ARROW_FLIGHT_METADATA_ERROR, \"Table columns could not be listed for table: \" + table, e);\n        }\n    }\n\n    @Override\n    public Map<String, ColumnHandle> getColumnHandles(ConnectorSession session, ConnectorTableHandle tableHandle)\n    {\n        Map<String, ColumnHandle> columnHandles = new HashMap<>();\n\n        String schemaValue = ((ArrowTableHandle) tableHandle).getSchema();\n        String tableValue = ((ArrowTableHandle) tableHandle).getTable();\n        List<Field> columnList = getColumnsList(session, schemaValue, tableValue);\n\n        for (Field field : columnList) {\n            String columnName = field.getName();\n            Type type = getPrestoTypeFromArrowField(field);\n            columnHandles.put(columnName, new ArrowColumnHandle(columnName, type));\n        }\n        return columnHandles;","sourceCodeStart":78,"sourceCodeEnd":114,"githubUrl":"https://github.com/prestodb/presto/blob/55bb57d202de3b926896fa966c2c4a44c779634e/presto-base-arrow-flight/src/main/java/com/facebook/plugin/arrow/ArrowMetadata.java#L78-L114","documentation":"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.","triggerScenarios":"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.","commonSituations":"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.","solutions":["Inspect the cause chain of the ArrowException for the actual Flight/transport error.","Verify the Flight server is reachable from every Presto worker (host, port, TLS).","Confirm the table exists on the Flight server and the descriptor naming matches.","Re-check auth/TLS settings (key/cert files, tokens) in the catalog configuration.","Retry after fixing server-side issues; metadata errors here are not transient by themselves."],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":"// Probe the Flight server before fetching columns\ntry (FlightClient client = createFlightClient()) {\n    client.listTables(...) or client.getInfo(descriptor); // connectivity/auth probe\n}","typeGuard":null,"tryCatchPattern":"try {\n    return metadata.getColumnsList(session, schema, table);\n} catch (ArrowException e) {\n    if (e.getErrorCode().getCode() == ARROW_FLIGHT_METADATA_ERROR.getCode()) {\n        // inspect e.getCause(): reconnect, re-auth, or confirm table exists, then retry once\n    }\n    throw e;\n}","preventionTips":["Health-check the Flight server (host/port/TLS) from every worker before query time.","Keep auth tokens/TLS material fresh and mounted consistently.","Avoid concurrent DDL on tables being read.","Log and monitor the cause chain, not just the wrapper message."],"tags":["presto","arrow-flight","metadata","schema"],"backgroundTag":"flight-server-unreachable","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"}