apache/cassandra · error · IllegalArgumentException

Unknown column " + columns[i].name.toString()

Error message

Unknown column " + columns[i].name.toString()

What it means

When parsing an INSERT into accord_command_store_ops, applyRowUpdate switches on each supplied column name and throws IllegalArgumentException for any column other than 'op' or 'param'. The virtual table's write schema only understands these two columns.

Solutions

  1. Use only the columns 'op' and 'param' in the INSERT.
  2. Check the exact column names with `DESCRIBE system_views.accord_command_store_ops;`.
  3. Fix the typo/adjust the query for the specific op table being written.

Example fix

// before
INSERT INTO system_views.accord_command_store_ops (command_store_id, operation) VALUES (0, 'REPLAY');
// after
INSERT INTO system_views.accord_command_store_ops (command_store_id, op) VALUES (0, 'REPLAY');
Defensive patterns

Strategy: validation

Validate before calling

Set<String> allowed = Set.of("op", "param");
for (String col : insertedColumns)
    if (!allowed.contains(col))
        throw new IllegalArgumentException("accord_command_store_ops only accepts columns " + allowed + ", got " + col);

Try / catch

try {
    session.execute(insert);
} catch (InvalidQueryException e) {
    if (e.getMessage().startsWith("Unknown column")) {
        // re-derive column list via DESCRIBE system_views.accord_command_store_ops
    }
}

Prevention

When it happens

Trigger: INSERTing a row into system_views.accord_command_store_ops with a column name not in {op, param}, e.g. misspelled 'param', or reusing columns valid on other accord debug tables (like txn_id or depth).

Common situations: Copy-pasting an INSERT template from accord_txn_ops (whose columns differ) into command_store_ops; typos like 'operation' or 'paramater'; schema assumptions after a Cassandra version upgrade changed the table columns.

Understand the failure class

Background: Schema validation failed / invalid input schema: payload rejected because its shape doesn't match the expected schema — this error's family across 28 libraries.

Related errors


AI-assisted analysis of apache/cassandra@88fd0f6a0e (2026-09-10). Data as JSON: /api/errors/287e50bcb867d15b. Report an issue: GitHub.

Appendix: source

Thrown at src/java/org/apache/cassandra/db/virtual/AccordDebugKeyspace.java:2031

        @Override
        protected void collect(PartitionsCollector collector)
        {
            throw new UnsupportedOperationException(COMMAND_STORE_OPS + " is a write-only table");
        }

        @Override
        protected void applyRowUpdate(Object[] partitionKeys, Object[] clusteringKeys, ColumnMetadata[] columns, Object[] values)
        {
            int commandStoreId = (Integer) partitionKeys[0];

            CommandStoreOp op = null;
            String param = null;
            for (int i = 0 ; i < columns.length ; ++i)
            {
                switch (columns[i].name.toString())
                {
                    default: throw new IllegalArgumentException("Unknown column " + columns[i].name.toString());
                    case "op":
                        op = tryParse(values[i], true, CommandStoreOp.class, CommandStoreOp::valueOf);
                        break;
                    case "param":
                        param = (String) values[i];
                        break;
                }
            }

            if (op == null)
                throw new IllegalArgumentException("Must specify 'op'");

            final AccordService accord = (AccordService) AccordService.unsafeInstance();
            final Node node = accord.node();
            final Function<CommandStore, AsyncResult<?>> function;
            Supplier<AsyncResult<?>> allFunction = null;
            switch (op)
            {

View on GitHub (pinned to 88fd0f6a0e)