{"record":{"id":"ce1bad606825bf41","repo":"prestodb/presto","slug":"indexes-not-supported","errorCode":null,"errorMessage":"indexes not supported","messagePattern":"indexes not supported","errorType":"exception","errorClass":"SQLFeatureNotSupportedException","httpStatus":null,"severity":"warning","filePath":"presto-jdbc/src/main/java/com/facebook/presto/jdbc/PrestoDatabaseMetaData.java","lineNumber":1062,"sourceCode":"\n    @Override\n    public ResultSet getTypeInfo()\n            throws SQLException\n    {\n        return select(\"\" +\n                \"SELECT TYPE_NAME, DATA_TYPE, PRECISION, LITERAL_PREFIX, LITERAL_SUFFIX,\\n\" +\n                \"CREATE_PARAMS, NULLABLE, CASE_SENSITIVE, SEARCHABLE, UNSIGNED_ATTRIBUTE,\\n\" +\n                \"FIXED_PREC_SCALE, AUTO_INCREMENT, LOCAL_TYPE_NAME, MINIMUM_SCALE, MAXIMUM_SCALE,\\n\" +\n                \"SQL_DATA_TYPE, SQL_DATETIME_SUB, NUM_PREC_RADIX\\n\" +\n                \"FROM system.jdbc.types\\n\" +\n                \"ORDER BY DATA_TYPE\");\n    }\n\n    @Override\n    public ResultSet getIndexInfo(String catalog, String schema, String table, boolean unique, boolean approximate)\n            throws SQLException\n    {\n        throw new SQLFeatureNotSupportedException(\"indexes not supported\");\n    }\n\n    @Override\n    public boolean supportsResultSetType(int type)\n            throws SQLException\n    {\n        return type == ResultSet.TYPE_FORWARD_ONLY;\n    }\n\n    @Override\n    public boolean supportsResultSetConcurrency(int type, int concurrency)\n            throws SQLException\n    {\n        return (type == ResultSet.TYPE_FORWARD_ONLY) &&\n                (concurrency == ResultSet.CONCUR_READ_ONLY);\n    }\n\n    @Override","sourceCodeStart":1044,"sourceCodeEnd":1080,"githubUrl":"https://github.com/prestodb/presto/blob/55bb57d202de3b926896fa966c2c4a44c779634e/presto-jdbc/src/main/java/com/facebook/presto/jdbc/PrestoDatabaseMetaData.java#L1044-L1080","documentation":"getIndexInfo() in PrestoDatabaseMetaData throws SQLFeatureNotSupportedException ('indexes not supported'). Presto's connector model does not expose secondary index metadata through the JDBC driver, so the method is an unimplemented interface stub.","triggerScenarios":"Calling DatabaseMetaData.getIndexInfo(catalog, schema, table, unique, approximate) on a Presto connection, often during query-plan or schema analysis by tools.","commonSituations":"Query optimizers/SQL formatters inspecting indexes, performance-analysis tools, ORMs generating index-aware DDL against Presto.","solutions":["Assume no secondary indexes on Presto tables and skip getIndexInfo calls","Catch SQLFeatureNotSupportedException and treat as empty index list","Rely on connector-specific partitioning/sorting knowledge instead of index metadata","Track upstream implementation if index metadata support is added"],"exampleFix":"// before\nResultSet idx = meta.getIndexInfo(catalog, schema, table, false, false);\n// after\nResultSet idx;\ntry {\n    idx = meta.getIndexInfo(catalog, schema, table, false, false);\n} catch (SQLFeatureNotSupportedException e) {\n    idx = EMPTY_RESULT_SET;\n}","handlingStrategy":"try-catch","validationCode":"boolean supportsIndexInfo = !(meta instanceof com.facebook.presto.jdbc.PrestoDatabaseMetaData);","typeGuard":"boolean supportsIndexInfo = !(meta instanceof com.facebook.presto.jdbc.PrestoDatabaseMetaData);","tryCatchPattern":"try (ResultSet rs = meta.getIndexInfo(cat, schema, table, false, false)) { ... } catch (SQLFeatureNotSupportedException e) { /* no indexes */ }","preventionTips":["Assume no secondary index metadata for Presto tables","Use partitioning/layout knowledge instead of index introspection","Gate index-aware tooling by driver type"],"tags":["jdbc","unsupported-feature","metadata","indexes"],"backgroundTag":"jdbc-feature-not-supported","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"}