{"record":{"id":"fb0173c5c348c86f","repo":"apache/cassandra","slug":"the-s-virtual-table-is-deprecated-please-use-fb0173","errorCode":null,"errorMessage":"The \"%s\" virtual table is deprecated. Please, use \"system_metrics.cql_group\" virtual table instead.","messagePattern":"The \"(.+?)\" virtual table is deprecated\\. Please, use \"system_metrics\\.cql_group\" virtual table instead\\.","errorType":"console","errorClass":null,"httpStatus":null,"severity":"info","filePath":"src/java/org/apache/cassandra/db/virtual/CQLMetricsTable.java","lineNumber":78,"sourceCode":"                           .kind(TableMetadata.Kind.VIRTUAL)\n                           .partitioner(new LocalPartitioner(UTF8Type.instance))\n                           .addPartitionKeyColumn(NAME_COL, UTF8Type.instance)\n                           .addRegularColumn(VALUE_COL, DoubleType.instance)\n                           .build());\n        this.cqlMetrics = cqlMetrics;\n    }\n\n    @Override\n    public DataSet data()\n    {\n        SimpleDataSet result = new SimpleDataSet(metadata());\n        addRow(result, PREPARED_STATEMENTS_COUNT, cqlMetrics.preparedStatementsCount.getValue());\n        addRow(result, PREPARED_STATEMENTS_EVICTED, cqlMetrics.preparedStatementsEvicted.getCount());\n        addRow(result, PREPARED_STATEMENTS_EXECUTED, cqlMetrics.preparedStatementsExecuted.getCount());\n        addRow(result, PREPARED_STATEMENTS_RATIO, cqlMetrics.preparedStatementsRatio.getValue());\n        addRow(result, REGULAR_STATEMENTS_EXECUTED, cqlMetrics.regularStatementsExecuted.getCount());\n\n        ClientWarn.instance.warn(\"The \\\"\" + TABLE_NAME + \"\\\" virtual table is deprecated. \" +\n                                 \"Please, use \\\"system_metrics.cql_group\\\" virtual table instead.\");\n        return result;\n    }\n\n    private void addRow(SimpleDataSet dataSet, String name, double value)\n    {\n        dataSet.row(name)\n               .column(VALUE_COL, value);\n    }\n}\n","sourceCodeStart":60,"sourceCodeEnd":89,"githubUrl":"https://github.com/apache/cassandra/blob/88fd0f6a0eaed8943f05ac9e8f947882b8ddc8f1/src/java/org/apache/cassandra/db/virtual/CQLMetricsTable.java#L60-L89","documentation":"CQLMetricsTable.data() emits a ClientWarn deprecation notice whenever the deprecated CQL metrics virtual table is read, pointing users to the 'system_metrics.cql_group' virtual table. The legacy rows are still returned; this is an informational notice only.","triggerScenarios":"Any SELECT against the deprecated CQL metrics virtual table (e.g. system_metrics.cql_metrics) — prepared-statement and regular-statement metric rows are returned along with the warning.","commonSituations":"Older dashboards or ops runbooks querying cql_metrics after its replacement shipped; automation that still reads preparedStatementsRatio etc. from the legacy table.","solutions":["Migrate queries to the system_metrics.cql_group virtual table.","Update dashboards/scripts referencing the deprecated table name.","Ignore the warning if intentional temporary use of the legacy table is required; it does not alter results."],"exampleFix":"// before\nSELECT * FROM system_metrics.cql_metrics;\n\n// after\nSELECT * FROM system_metrics.cql_group;","handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":["Migrate dashboards to system_metrics.cql_group.","Search runbooks for 'cql_metrics' and update them.","Treat driver warnings as migration signals in CI."],"tags":["deprecation","virtual-table","metrics","cql"],"backgroundTag":"deprecated-api-usage","analyzedSha":"88fd0f6a0eaed8943f05ac9e8f947882b8ddc8f1","analyzedAt":"2026-09-10T07:29:22.284Z","contentChangedAt":"2026-09-10T07:29:22.284Z","schemaVersion":2},"datasetVersion":"2026-09-17T15:17:12.973Z"}