influxdata/influxdb · error

no max time statistic

Error message

no max time statistic

What it means

The mirror of the min case: derive_min_max_time expects stats.max to be Some for the I64 time statistics and panics otherwise. Without a max the file's upper time bound cannot be derived, which IOx needs for partition indexing.

Solutions

  1. Guarantee the time column is fully populated (no NULLs) before encoding
  2. Enable column statistics in the Parquet writer properties
  3. Regenerate the file from a validated RecordBatch

Example fix

// before
let batch = /* time column may contain nulls */;
// after
let time = batch.column_by_name("time").unwrap();
assert_eq!(time.null_count(), 0);
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 || time.len() == 0 { return Err(anyhow!("invalid time column")); }

Prevention

When it happens

Trigger: Same as min: calling derive_min_max_time/to_parquet_file where the time column statistics lack a max value — NULL-only time column or statistics disabled at write time.

Common situations: Unpopulated time columns in ingest, writers configured without statistics, truncated statistics blobs.

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/c192a8e0c39dd8b6. Report an issue: GitHub.

Appendix: source

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

/// 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
    /// [Zstandard]: http://facebook.github.io/zstd/

View on GitHub (pinned to 06200ef96b)