{"record":{"id":"bfb5d44d75d88515","repo":"quickwit-oss/quickwit","slug":"input-input-idx-rg-rg-idx-col-col-name-has-bfb5d4","errorCode":null,"errorMessage":"input {input_idx} rg {rg_idx} col '{col_name}' has no max in stats — cannot determine prefix alignment","messagePattern":"input (.+?) rg (.+?) col '(.+?)' has no max 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":337,"sourceCode":"    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            );\n        }\n        Ok(min)\n    }\n\n    fn encode_byte_array_value(\n        min_bytes: Option<&[u8]>,","sourceCodeStart":319,"sourceCodeEnd":355,"githubUrl":"https://github.com/quickwit-oss/quickwit/blob/a39730c5cdcd1a4fe798403737ae293999ea21f8/quickwit/quickwit-parquet-engine/src/merge/streaming/region_grouping.rs#L319-L355","documentation":"The max-side counterpart of require_eq: the row-group prefix column's statistics carry no max value, so the function cannot confirm that all rows in the row group share one constant prefix value and fails fast rather than producing a misaligned region key.","triggerScenarios":"encode_prefix_col_value → require_eq called on a chunk whose parquet Statistics has max = None, during extract_regions_from_metadata / streaming merge.","commonSituations":"Files written by writers that omit max stats; legacy or truncated statistics; corrupted metadata written by a mismatched parquet-rs version.","solutions":["Rewrite input parquet files with complete min/max statistics enabled.","Confirm the writer version and statistics settings used to produce the inputs.","Check that encode_prefix_col_value matches the right Statistics variant for the column physical type so max is actually read."],"exampleFix":null,"handlingStrategy":"validation","validationCode":"let stats = chunk.statistics().ok_or_else(|| anyhow!(\"no stats\"))?;\nif stats.max_bytes_opt().is_none() {\n    return Err(anyhow!(\"chunk stats lack max\"));\n}\n","typeGuard":null,"tryCatchPattern":"if e.to_string().contains(\"has no max in stats\") {\n    rewrite_with_full_stats(input)?;\n    return retry_merge(input);\n}\n","preventionTips":["Enable complete min/max statistics in all writers producing merge inputs.","Validate parquet metadata (min and max present per prefix column) before merging.","Keep parquet-rs versions aligned between writers and the merge engine."],"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"}