prestodb/presto · error · PrestoException

NOT_FOUND

NOT_FOUND

Error message

No column with name 

What it means

RowSchema.getColumn looks up an AccumuloColumnHandle by name among the schema's columns; if no column matches it throws NOT_FOUND with 'No column with name <name>'. It is a lookup failure against the connector's declared table schema, not against live Accumulo data.

Source

Thrown at presto-accumulo/src/main/java/com/facebook/presto/accumulo/model/RowSchema.java:70

                        indexed));
        return this;
    }

    public AccumuloColumnHandle getColumn(int i)
    {
        checkArgument(i >= 0 && i < columns.size(), "column index must be non-negative and less than length");
        return columns.get(i);
    }

    public AccumuloColumnHandle getColumn(String name)
    {
        for (AccumuloColumnHandle columnHandle : columns) {
            if (columnHandle.getName().equals(name)) {
                return columnHandle;
            }
        }

        throw new PrestoException(NOT_FOUND, "No column with name " + name);
    }

    public List<AccumuloColumnHandle> getColumns()
    {
        return columns;
    }

    public int getLength()
    {
        return columns.size();
    }

    /**
     * Creates a new {@link RowSchema} from a list of {@link AccumuloColumnHandle} objects. Does not validate the schema.
     *
     * @param columns Column handles
     * @return Row schema
     */

View on GitHub (pinned to 55bb57d202)

Solutions

  1. Use RowSchema.getColumns() and match names case-insensitively before calling getColumn
  2. Correct the column name in the query/config to exactly match the schema's declared name
  3. Re-create the table metadata so column handles reflect the current names
  4. In forked code, switch getColumn to case-insensitive comparison or return Optional

Example fix

// before
AccumuloColumnHandle col = schema.getColumn(colName);
// after
AccumuloColumnHandle col = schema.getColumns().stream()
    .filter(c -> c.getName().equalsIgnoreCase(colName))
    .findFirst()
    .orElseThrow(() -> new PrestoException(NOT_FOUND, "No column with name " + colName));
Defensive patterns

Strategy: validation

Validate before calling

Optional<AccumuloColumnHandle> col = schema.getColumns().stream()
    .filter(c -> c.getName().equals(name))
    .findFirst();
if (!col.isPresent()) throw new IllegalArgumentException("Unknown column: " + name);

Type guard

static boolean schemaHasColumn(RowSchema schema, String name) {
    return schema.getColumns().stream().anyMatch(c -> c.getName().equals(name));
}

Try / catch

try {
    AccumuloColumnHandle col = schema.getColumn(name);
} catch (PrestoException e) {
    if (e.getErrorCode().getCode() == StandardErrorCode.NOT_FOUND.toErrorCode().getCode()) {
        log.error("Column %s not in schema; available: %s", name, schema.getColumns());
    }
    throw e;
}

Prevention

When it happens

Trigger: Calling getColumn(name) with a name that differs in case/spacing from the declared column handle name, or referencing a column (e.g. row_id, indexed column, serializer-specific field) not registered in the schema; code paths in serializers or index lookups passing a stale column name.

Common situations: Connector metadata/table config renamed a column but cached row serializers still use the old name; querying an index or column family configured under a different identifier; case-sensitivity mismatch between SQL and stored column names.

Understand the failure class

Background: NOT_FOUND error code: why tRPC, Harbor, Nacos and other libraries return 404 "not found" errors for resources that may still exist — this error's family across 11 libraries.

Related errors


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