influxdata/influxdb · error · CatalogError

only uint64, int64, bool, tag, and string columns are…

Error message

only uint64, int64, bool, tag, and string columns are supported in the last cache

What it means

CatalogError::InvalidLastCacheKeyColumnType is thrown when creating or updating a last-n-values cache whose key (or value) columns include a type outside the allowed set: uint64, int64, bool, tag, and string. The catalog's last cache serializer only supports these column types, so columns like float or timestamp cannot be cached. It is raised from the last-cache creation/update catalog operations (e.g. influxdb3_catalog/src/catalog/versions/v3/ops/cache.rs:321).

Solutions

  1. Change the cache key to use only tag columns (and value columns of type uint64, int64, bool, tag, or string).
  2. If you need fast lookup on a float field, add a tag or string column that encodes the value (or index on an existing tag) and key the cache on that.
  3. Inspect the table schema first (SHOW COLUMNS / table definition API) and filter out unsupported column types before constructing the cache definition.

Example fix

// before
curl -X POST .../api/v3/configure/last_cache -d '{"table":"cpu","key_columns":["temp"],"value_columns":["time"]}' // temp is a float field, time is a timestamp
// after
curl -X POST .../api/v3/configure/last_cache -d '{"table":"cpu","key_columns":["host"],"value_columns":["temp"]}' // host is a tag; float goes in value_columns is still invalid, so restrict to supported types e.g. string fields
Defensive patterns

Strategy: validation

Validate before calling

const ALLOWED = new Set(["uint64", "int64", "bool", "tag", "string"]);
function validLastCache(cache, tableSchema) {
  const cols = new Map(tableSchema.columns.map(c => [c.name, c.type]));
  return [...cache.key_columns, ...(cache.value_columns ?? [])]
    .every(n => ALLOWED.has(cols.get(n)));
}

Type guard

const isCacheableType = (t) => ["uint64", "int64", "bool", "tag", "string"].includes(t);

Prevention

When it happens

Trigger: Calling the /api/v3/configure/last_cache HTTP API (or Catalog::create_last_cache) with a cache whose key columns include a float or timestamp column, or whose value column list includes unsupported types like float64 or time.

Common situations: Trying to build a last cache keyed on a measurement's float field (e.g. 'value') instead of a tag; cache definitions copied from tables where the column was a tag but later changed to a field of type float; automated schema tooling generating caches over arbitrary columns.

Understand the failure class

Background: UnsupportedOperationException and "is not supported" errors: when a library deliberately refuses a call — this error's family across 30 libraries.

Related errors


AI-assisted analysis of influxdata/influxdb@06200ef96b (2026-09-19). Data as JSON: /api/errors/b020634890e348e6. Report an issue: GitHub.

Appendix: source

Thrown at influxdb3_catalog/src/error.rs:81

    /// Request is invalid.
    #[error("catalog internal error: {details}")]
    Internal { details: String },

    #[error(
        "persisted catalog checkpoint sequence {checkpoint_sequence} is ahead of live catalog sequence {live_sequence}"
    )]
    BackupCheckpointAhead {
        checkpoint_sequence: u64,
        live_sequence: u64,
    },

    #[error("invalid configuration provided: {message}")]
    InvalidConfiguration { message: Box<str> },

    #[error("only tag and string columns are supported in the distinct cache")]
    InvalidDistinctCacheColumnType,

    #[error("only uint64, int64, bool, tag, and string columns are supported in the last cache")]
    InvalidLastCacheKeyColumnType,

    #[error("plugin trigger is already enabled")]
    TriggerAlreadyEnabled,

    #[error("plugin trigger is already disabled")]
    TriggerAlreadyDisabled,

    #[error("invalid column type for column '{column_name}', expected {expected}, got {got}")]
    InvalidColumnType {
        column_name: Arc<str>,
        expected: InfluxColumnType,
        got: InfluxColumnType,
    },

    #[error("'{0}' is a reserved column")]
    ReservedColumn(Arc<str>),

View on GitHub (pinned to 06200ef96b)