influxdata/influxdb · warning · TimeColumnError
No time column found
Error message
No time column found
What it means
TimeColumnError::NotFound with display 'No time column found' is the error the partition library returns when a batch does not contain a column named TIME_COLUMN_NAME ('time'). Unlike the unreachable/expect panics in this module, this is a designed, catchable error for the legitimate case of a batch lacking a time column.
Solutions
- Ensure every batch written to a partition includes a 'time' column of i64 nanoseconds
- Check for typos or alternate names in the column name used at write time
- Match on TimeColumnError::NotFound in the caller and handle batches without time gracefully
- Inspect the batch's column list before calling time_column()
Example fix
// before
let tc = batch.time_column().expect("time exists");
// after
let tc = match batch.time_column() {
Ok(tc) => tc,
Err(TimeColumnError::NotFound) => return Ok(()), // batch has no time column
Err(e) => return Err(e.into()),
}; Defensive patterns
Strategy: validation
Validate before calling
// rust
fn has_time_column(batch: &RecordBatch) -> bool {
batch.schema().column_with_name(TIME_COLUMN_NAME).is_some()
} Try / catch
match batch.time_column() {
Ok(col) => col,
Err(TimeColumnError::NotFound) => return Ok(()), // no time column: skip
Err(e) => return Err(e.into()),
} Prevention
- Always include a 'time' column when writing batches destined for partitioning
- Check the schema for TIME_COLUMN_NAME before calling time_column()
- Match on TimeColumnError::NotFound explicitly rather than treating all errors alike
When it happens
Trigger: Calling MutableBatch::time_column or RecordBatch::time_column when self.column(TIME_COLUMN_NAME) / column_by_name(TIME_COLUMN_NAME) returns None — i.e. the batch was never given a 'time' column, or it was named differently.
Common situations: Writing batches that omit the time column, renaming the time column in an upstream writer, aggregations that drop the time column, or fixture batches missing the field.
Understand the failure class
Background: 'Could not be found', 'does not exist', 'not found in database': the resource-not-found family when an ID, slug, key, or URI lookup comes back empty — this error's family across 20 libraries.
Related errors
- error reading time column
- table batch must contain time column
- The Record batch is empty
- is not a valid data type, values are int64, uint64…
- a supported service limit value is required
AI-assisted analysis of influxdata/influxdb@06200ef96b (2026-09-19).
Data as JSON: /api/errors/f1cf08db0dc460ea.
Report an issue: GitHub.
Appendix: source
Thrown at core/partition/src/traits.rs:20
mod record_batch;
use bitvec::{prelude::Lsb0, view::BitView};
use data_types::TableBatchWithoutId;
use generated_types::influxdata::pbdata::v1::{
self as proto,
column::{SemanticType, Values},
};
use schema::InfluxColumnType;
use table_batch::ValueCollection;
use thiserror::Error;
/// An error accessing the time column of a batch.
#[expect(missing_copy_implementations)]
#[derive(Debug, Error, PartialEq, Eq, Clone)]
pub enum TimeColumnError {
/// The batch did not have a time column.
#[error("No time column found")]
NotFound,
}
/// The behavior a column in a batch needs to have to be partitioned
pub trait PartitioningColumn: std::fmt::Debug {
/// The type of a thing that can be used to identify whether a tag has changed or not; may or
/// may not be the actual tag
type TagIdentityKey: ?Sized + PartialEq;
/// Whether the value at the given row index is valid or NULL
fn is_valid(&self, idx: usize) -> bool;
/// Get the identity of the tag at the given row index.
///
/// The return value is only valid if `is_valid(idx)` for the same `idx`
/// returns true.
fn get_tag_identity_key(&self, idx: usize) -> Option<&Self::TagIdentityKey>;
View on GitHub (pinned to 06200ef96b)