{"record":{"id":"93e52a44ec3286ed","repo":"pola-rs/polars","slug":"thrift-bool-field","errorCode":null,"errorMessage":"thrift bool field","messagePattern":"thrift bool field","errorType":"panic","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/polars-parquet/src/parquet/handwritten_thrift/file_metadata_thrift.rs","lineNumber":350,"sourceCode":"    // footer; skip the bytes themselves.\n    read_struct_fields!(prot, |f| {\n        1 => prot.skip_binary()?,\n        2 => prot.skip_binary()?,\n        3 => null_count = Some(prot.read_i64()?),\n        4 => distinct_count = Some(prot.read_i64()?),\n        5 => {\n            let len = prot.read_vlq()? as u32;\n            let offset = prot.offset_from(origin_ptr);\n            prot.skip_bytes(len as usize)?;\n            max_value = Some(ByteRange { offset, len });\n        },\n        6 => {\n            let len = prot.read_vlq()? as u32;\n            let offset = prot.offset_from(origin_ptr);\n            prot.skip_bytes(len as usize)?;\n            min_value = Some(ByteRange { offset, len });\n        },\n        7 => is_max_value_exact = Some(f.bool_val.expect(\"thrift bool field\")),\n        8 => is_min_value_exact = Some(f.bool_val.expect(\"thrift bool field\")),\n    });\n\n    Ok(CompactStatistics {\n        null_count,\n        distinct_count,\n        max_value,\n        min_value,\n        is_max_value_exact,\n        is_min_value_exact,\n    })\n}\n\n/// Decode a `KeyValue` (kept as format-crate type, polars exposes it directly).\nfn read_key_value(prot: &mut ThriftSliceInputProtocol<'_>) -> ParquetResult<KeyValue> {\n    let mut key: Option<String> = None;\n    let mut value: Option<String> = None;\n","sourceCodeStart":332,"sourceCodeEnd":368,"githubUrl":"https://github.com/pola-rs/polars/blob/9b5d73fd00236295624374b075d16b1fe6ec6df9/crates/polars-parquet/src/parquet/handwritten_thrift/file_metadata_thrift.rs#L332-L368","documentation":"Internal thrift decode panic in the handwritten parquet file-metadata reader: a field that must decode as a boolean did not, violating the hand-rolled thrift expectations. Indicates malformed parquet metadata rather than user error.","triggerScenarios":"This panic/expect fires when execution reaches an unguarded state described by: \"thrift bool field\". Typical triggers: unsupported dtype or feature-gated code path reached at runtime, invalid user input or environment variable value, calling API methods in the wrong order or on mismatched types, or data (lengths, offsets, ranges) violating the function's preconditions.","commonSituations":"Encountered when input data or configuration does not meet the preconditions of the throwing code path (\"thrift bool field\"). Common cases: missing Cargo feature flags, mismatched dtypes/lengths between arrays or series, out-of-range temporal values, malformed environment variables, or operations on unsupported/complex nested types.","solutions":["The parquet file's thrift metadata contains an unexpected bool field encoding; the file may be corrupt.","Re-write the parquet file with a standards-compliant writer."],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"9b5d73fd00236295624374b075d16b1fe6ec6df9","analyzedAt":"2026-08-19T12:15:06.350Z","contentChangedAt":"2026-08-19T12:15:06.350Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}