{"record":{"id":"9bf8d3f3cc916900","repo":"influxdata/influxdb","slug":"could-not-find-time-column-statistics","errorCode":null,"errorMessage":"Could not find time column statistics","messagePattern":"Could not find time column statistics","errorType":"error_code","errorClass":"TimestampMinMaxError","httpStatus":null,"severity":"error","filePath":"core/parquet_file/src/metadata.rs","lineNumber":1017,"sourceCode":"        .collect::<Result<Vec<_>, _>>()?;\n    let file_timestamp_min_max = timestamp_min_maxes\n        .into_iter()\n        .reduce(|acc, i| acc.union(&i));\n\n    Ok(file_timestamp_min_max)\n}\n\n/// Errors that may happen while collecting the min and max timestamps\n#[expect(missing_docs)]\n#[derive(Debug, Error)]\npub enum TimestampMinMaxError {\n    #[error(\"Could not convert Parquet schema to Arrow schema: {0}\")]\n    SchemaConversion(#[from] parquet::errors::ParquetError),\n\n    #[error(\"Could not find a time column\")]\n    NoTimeColumnFound,\n\n    #[error(\"Could not find time column statistics\")]\n    NoColumnStatisticsFound,\n\n    #[error(\"Expected time column to have type Int64; instead found {actual:?}\")]\n    IncorrectTimeColumnType { actual: parquet::basic::Type },\n}\n\nfn timestamp_min_max(\n    row_group: &ParquetRowGroupMetaData,\n) -> Result<TimestampMinMax, TimestampMinMaxError> {\n    let statistics = row_group\n        .columns()\n        .iter()\n        .find(|c| c.column_descr().name() == schema::TIME_COLUMN_NAME)\n        .ok_or(TimestampMinMaxError::NoTimeColumnFound)?\n        .statistics()\n        .ok_or(TimestampMinMaxError::NoColumnStatisticsFound)?;\n\n    match statistics {","sourceCodeStart":999,"sourceCodeEnd":1035,"githubUrl":"https://github.com/influxdata/influxdb/blob/06200ef96ba82c5f6727e5038a83af8e722c6875/core/parquet_file/src/metadata.rs#L999-L1035","documentation":"Thrown by TimestampMinMaxError when scanning a Parquet row group's metadata for statistics on the time column and none are found. The library requires per-row-group min/max statistics for the time column to build TimestampMinMax ranges used for query pruning. This indicates the Parquet file was written without statistics for the time column.","triggerScenarios":"Calling timestamp_min_max() on a ParquetRowGroupMetaData whose column chunk metadata has no statistics entry for the time column (statistics None or missing for that column).","commonSituations":"Reading Parquet files produced by writers that disabled statistics (set_statistics_disabled / write_statistics disabled), files written by third-party tools without column stats, or truncated/corrupted metadata.","solutions":["Ensure the writer that produced the Parquet file has column statistics enabled (do not disable statistics when writing)","Verify the file contains statistics for the time column using parquet-tools or the parquet crate metadata inspection","Re-write the offending Parquet file with a writer that emits statistics","If consuming externally-produced files, treat missing statistics as unsupported input and reject before query planning"],"exampleFix":"// before: parquet writer options disabling stats\nlet props = WriterProperties::builder().set_statistics_enabled(Enabled(false)).build();\n// after: keep statistics enabled so timestamp_min_max can find them\nlet props = WriterProperties::builder().set_statistics_enabled(Enabled(true)).build();","handlingStrategy":"validation","validationCode":"let meta = footer_metadata(&file)?;\nlet has_stats = meta.row_groups().iter().all(|rg|\n    rg.column(0).statistics().is_some());\nif !has_stats { return Err(\"time column statistics missing\".into()); }","typeGuard":null,"tryCatchPattern":"match res {\n    Err(TimestampMinMaxError::NoColumnStatisticsFound) => warn!(\"file lacks column stats; skipping pruning\"),\n    other => other?,\n}","preventionTips":["Never disable statistics when writing Parquet files consumed by this library","Validate statistics presence when ingesting externally-produced files","Add a file-format conformance check to your ingestion pipeline"],"tags":["parquet","metadata","statistics","time-column"],"backgroundTag":"resource-not-found","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"}