influxdata/influxdb · error

no min time statistic

Error message

no min time statistic

What it means

After locating the time column's summary, derive_min_max_time expects the I64 statistics to carry a min value; if stats.min is None (no statistic recorded, e.g. an all-null page or missing statistics) it panics. IOx requires a bounded time range to index the file.

Solutions

  1. Ensure the time column is never NULL before encoding the batch
  2. Ensure Parquet writer statistics are enabled so min/max are recorded
  3. Validate that time_column min statistic exists before calling to_parquet_file

Example fix

// caller-side validation
let time = batch.column_by_name("time").unwrap();
assert_eq!(time.null_count(), 0, "time column must be non-null");
Defensive patterns

Strategy: validation

Validate before calling

let time = batch.column_by_name("time").ok_or_else(|| anyhow!("no time col"))?;
if time.null_count() > 0 { return Err(anyhow!("null time values")); }

Prevention

When it happens

Trigger: Calling derive_min_max_time on summaries where the time column has no min statistic — typically a time column that is entirely NULL or a file written with statistics disabled.

Common situations: Batches where the time column was never populated (bug in ingestion code), files written with statistics off, empty row-group pages.

Understand the failure class

Background: "missing required argument" and "the following required arguments were not provided": what required-argument errors mean and how to fix them — this error's family across 20 libraries.

Related errors


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

Appendix: source

Thrown at core/parquet_file/src/metadata.rs:577

/// A [`RecordBatch`] serialized without the embedded metadata found in the
/// IOx [`Schema`] type will cause a statistic resolution failure due to
/// lack of the IOx field type metadata for the time column. Batches
/// produced from the through the IOx write path always include this
/// metadata.
///
/// [`RecordBatch`]: arrow::record_batch::RecordBatch
pub fn derive_min_max_time(stats: Vec<ColumnSummary>) -> TimestampRange {
    let time_summary = stats
        .into_iter()
        .find(|v| v.name == TIME_COLUMN_NAME)
        .expect("no time column in metadata statistics");

    assert_eq!(time_summary.influxdb_type, InfluxDbType::Timestamp);

    // Extract the min/max timestamps.
    match time_summary.stats {
        Statistics::I64(stats) => {
            let min = Timestamp::new(stats.min.expect("no min time statistic"));
            let max = Timestamp::new(stats.max.expect("no max time statistic"));
            TimestampRange { min, max }
        }
        _ => panic!("unexpected physical type for timestamp column"),
    }
}
/// Parquet metadata with IOx-specific wrapper.
#[derive(Clone, PartialEq, Eq)]
pub struct IoxParquetMetaData {
    /// [Apache Parquet] metadata as freestanding [Apache Thrift]-encoded, and [Zstandard]-compressed bytes.
    ///
    /// This can be used to store metadata separate from the related payload data. The usage of [Apache Thrift] allows the
    /// same stability guarantees as the usage of an ordinary [Apache Parquet] file. To encode a thrift message into bytes
    /// the [Thrift Compact Protocol] is used.
    ///
    /// [Apache Parquet]: https://parquet.apache.org/
    /// [Apache Thrift]: https://thrift.apache.org/
    /// [Thrift Compact Protocol]: https://github.com/apache/thrift/blob/master/doc/specs/thrift-compact-protocol.md

View on GitHub (pinned to 06200ef96b)