{"record":{"id":"47675eee13716f6b","repo":"quickwit-oss/quickwit","slug":"input-input-idx-rg-rg-idx-col-col-name-has","errorCode":null,"errorMessage":"input {input_idx} rg {rg_idx} col '{col_name}' has no min in stats — cannot determine prefix alignment","messagePattern":"input (.+?) rg (.+?) col '(.+?)' has no min in stats — cannot determine prefix alignment","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"quickwit/quickwit-parquet-engine/src/merge/streaming/region_grouping.rs","lineNumber":331,"sourceCode":"/// them either) and so are rejected up front.\nfn encode_prefix_col_value(\n    stats: &parquet::file::statistics::Statistics,\n    col: &PrefixColumn,\n    rg_idx: usize,\n    input_idx: usize,\n    key: &mut Vec<u8>,\n) -> Result<()> {\n    use parquet::file::statistics::Statistics;\n\n    fn require_eq<T: PartialEq + std::fmt::Debug>(\n        min: Option<T>,\n        max: Option<T>,\n        col_name: &str,\n        rg_idx: usize,\n        input_idx: usize,\n    ) -> Result<T> {\n        let min = min.ok_or_else(|| {\n            anyhow!(\n                \"input {input_idx} rg {rg_idx} col '{col_name}' has no min in stats — cannot \\\n                 determine prefix alignment\"\n            )\n        })?;\n        let max = max.ok_or_else(|| {\n            anyhow!(\n                \"input {input_idx} rg {rg_idx} col '{col_name}' has no max in stats — cannot \\\n                 determine prefix alignment\"\n            )\n        })?;\n        if min != max {\n            bail!(\n                \"input {input_idx} rg {rg_idx} is NOT prefix-aligned on col '{col_name}': min \\\n                 ({:?}) != max ({:?}). Multi-RG inputs declaring `rg_partition_prefix_len >= 1` \\\n                 must carry one prefix-value per RG.\",\n                min,\n                max,\n            );","sourceCodeStart":313,"sourceCodeEnd":349,"githubUrl":"https://github.com/quickwit-oss/quickwit/blob/a39730c5cdcd1a4fe798403737ae293999ea21f8/quickwit/quickwit-parquet-engine/src/merge/streaming/region_grouping.rs#L313-L349","documentation":"require_eq verifies that a row-group prefix column has min == max (a single constant value) using parquet statistics. When the statistics object reports no min (Option::None — possible for some parquet types/writers that omit min), the function cannot determine prefix alignment and errors out.","triggerScenarios":"encode_prefix_col_value → require_eq called on a column chunk whose parquet Statistics variant carries a None min (writer omitted min, or stats order/variant unexpected), during extract_regions_from_metadata.","commonSituations":"Parquet files written by tools that only record max, or stats truncated/legacy format where min is signed-min-max ordering only; corrupted stats metadata.","solutions":["Rewrite input parquet files with a writer that records both min and max statistics.","Check the parquet-rs version: very old files or nonstandard stats can yield None min; re-encode with the current writer.","Verify the Statistics variant dispatch in encode_prefix_col_value matches the column's physical type (Boolean vs Int vs ByteArray)."],"exampleFix":null,"handlingStrategy":"validation","validationCode":"let stats = chunk.statistics().ok_or_else(|| anyhow!(\"no stats\"))?;\nif stats.min_bytes_opt().is_none() || stats.min_is_none() {\n    return Err(anyhow!(\"chunk stats lack min\"));\n}\n","typeGuard":null,"tryCatchPattern":"match err {\n    e if e.to_string().contains(\"has no min in stats\") => {\n        // re-encode the input file with full statistics, then retry once\n        rewrite_with_full_stats(input)?;\n        retry_merge(input)?;\n    }\n    e => return Err(e),\n}\n","preventionTips":["Write parquet with a current parquet-rs version that records both min and max.","Scan file metadata for missing min/max at job setup and rewrite offending files up front.","Avoid feeding legacy/foreign-writer files directly into the streaming merge."],"tags":["parquet","statistics","merge","metadata"],"backgroundTag":"missing-required-config-field","analyzedSha":"a39730c5cdcd1a4fe798403737ae293999ea21f8","analyzedAt":"2026-09-08T13:19:37.784Z","contentChangedAt":"2026-09-08T13:19:37.784Z","schemaVersion":2},"datasetVersion":"2026-09-17T15:17:12.973Z"}