{"record":{"id":"b020634890e348e6","repo":"influxdata/influxdb","slug":"only-uint64-int64-bool-tag-and-string-columns-are-supported","errorCode":null,"errorMessage":"only uint64, int64, bool, tag, and string columns are supported in the last cache","messagePattern":"only uint64, int64, bool, tag, and string columns are supported in the last cache","errorType":"validation","errorClass":"CatalogError","httpStatus":400,"severity":"error","filePath":"influxdb3_catalog/src/error.rs","lineNumber":81,"sourceCode":"    /// Request is invalid.\n    #[error(\"catalog internal error: {details}\")]\n    Internal { details: String },\n\n    #[error(\n        \"persisted catalog checkpoint sequence {checkpoint_sequence} is ahead of live catalog sequence {live_sequence}\"\n    )]\n    BackupCheckpointAhead {\n        checkpoint_sequence: u64,\n        live_sequence: u64,\n    },\n\n    #[error(\"invalid configuration provided: {message}\")]\n    InvalidConfiguration { message: Box<str> },\n\n    #[error(\"only tag and string columns are supported in the distinct cache\")]\n    InvalidDistinctCacheColumnType,\n\n    #[error(\"only uint64, int64, bool, tag, and string columns are supported in the last cache\")]\n    InvalidLastCacheKeyColumnType,\n\n    #[error(\"plugin trigger is already enabled\")]\n    TriggerAlreadyEnabled,\n\n    #[error(\"plugin trigger is already disabled\")]\n    TriggerAlreadyDisabled,\n\n    #[error(\"invalid column type for column '{column_name}', expected {expected}, got {got}\")]\n    InvalidColumnType {\n        column_name: Arc<str>,\n        expected: InfluxColumnType,\n        got: InfluxColumnType,\n    },\n\n    #[error(\"'{0}' is a reserved column\")]\n    ReservedColumn(Arc<str>),\n","sourceCodeStart":63,"sourceCodeEnd":99,"githubUrl":"https://github.com/influxdata/influxdb/blob/06200ef96ba82c5f6727e5038a83af8e722c6875/influxdb3_catalog/src/error.rs#L63-L99","documentation":"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).","triggerScenarios":"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.","commonSituations":"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.","solutions":["Change the cache key to use only tag columns (and value columns of type uint64, int64, bool, tag, or string).","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.","Inspect the table schema first (SHOW COLUMNS / table definition API) and filter out unsupported column types before constructing the cache definition."],"exampleFix":"// before\ncurl -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\n// after\ncurl -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","handlingStrategy":"validation","validationCode":"const ALLOWED = new Set([\"uint64\", \"int64\", \"bool\", \"tag\", \"string\"]);\nfunction validLastCache(cache, tableSchema) {\n  const cols = new Map(tableSchema.columns.map(c => [c.name, c.type]));\n  return [...cache.key_columns, ...(cache.value_columns ?? [])]\n    .every(n => ALLOWED.has(cols.get(n)));\n}","typeGuard":"const isCacheableType = (t) => [\"uint64\", \"int64\", \"bool\", \"tag\", \"string\"].includes(t);","tryCatchPattern":null,"preventionTips":["Key last caches on tag columns only.","Fetch the table schema before defining a cache and intersect with supported types.","Add a CI check validating cache definitions against schemas."],"tags":["influxdb3","last-cache","schema","unsupported-type"],"backgroundTag":"unsupported-operation","analyzedSha":"06200ef96ba82c5f6727e5038a83af8e722c6875","analyzedAt":"2026-09-19T12:55:30.003Z","contentChangedAt":"2026-09-19T12:55:30.003Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}