{"record":{"id":"752b0a29b7bce462","repo":"pola-rs/polars","slug":"integer-752b0a","errorCode":null,"errorMessage":"integer","messagePattern":"integer","errorType":"panic","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/polars-stream/src/nodes/io_sources/parquet/mod.rs","lineNumber":380,"sourceCode":"            });\n\n            return Ok((rx, handle));\n        }\n\n        // Prepare parameters for dispatch\n        let projected_arrow_fields = projected_arrow_fields()?.clone();\n        let memory_prefetch_func = get_memory_prefetch_func(verbose);\n        let row_group_prefetch_size = self\n            .row_group_prefetch_sync\n            .pipeline_budget\n            .count_limit()\n            .min(file_metadata.row_groups.len())\n            .max(1);\n\n        // This can be set to 1 to force column-per-thread parallelism, e.g. for bug reproduction.\n        let target_values_per_thread =\n            std::env::var(\"POLARS_PARQUET_DECODE_TARGET_VALUES_PER_THREAD\")\n                .map(|x| x.parse::<usize>().expect(\"integer\").max(1))\n                .unwrap_or(16_777_216);\n\n        let is_full_projection = projected_arrow_fields.len() == file_schema.len();\n\n        let (output_recv, handle) = ParquetReadImpl {\n            projected_arrow_fields,\n            is_full_projection,\n            predicate,\n            // TODO: Refactor to avoid full clone\n            options: Arc::unwrap_or_clone(self.config.clone()),\n            byte_source,\n            normalized_pre_slice: normalized_pre_slice.map(|x| match x {\n                Slice::Positive { offset, len } => (offset, len),\n                Slice::Negative { .. } => unreachable!(),\n            }),\n            metadata: file_metadata,\n            config: io_sources::parquet::Config {\n                num_pipelines,","sourceCodeStart":362,"sourceCodeEnd":398,"githubUrl":"https://github.com/pola-rs/polars/blob/fe841f959ef4d2ceefc05a310d33ed7b1ab24e5e/crates/polars-stream/src/nodes/io_sources/parquet/mod.rs#L362-L398","documentation":"Polars panics with the bare message 'integer' when POLARS_PARQUET_DECODE_TARGET_VALUES_PER_THREAD is set but not parseable as a usize. This variable controls the target number of decoded values per thread during Parquet decoding, defaulting to 16,777,216 (16 Mi values). The expect('integer') panic occurs in begin_read of the Parquet source.","triggerScenarios":"Setting POLARS_PARQUET_DECODE_TARGET_VALUES_PER_THREAD to a non-integer string ('16.5', 'auto', empty string), a negative number, or a value exceeding usize::MAX, then scanning a Parquet file with the streaming engine.","commonSituations":"Users copy values with thousands separators ('16,777,216') or float formatting; dotenv tooling injects 'null'/'undefined' strings from scripting languages.","solutions":["Unset POLARS_PARQUET_DECODE_TARGET_VALUES_PER_THREAD to use the 16,777,216 default","Set it to a plain positive decimal integer, e.g. export POLARS_PARQUET_DECODE_TARGET_VALUES_PER_THREAD=16777216","Remove thousands separators, decimals, and surrounding whitespace/quotes from the value"],"exampleFix":"// before\nexport POLARS_PARQUET_DECODE_TARGET_VALUES_PER_THREAD=16,777,216\n// after\nexport POLARS_PARQUET_DECODE_TARGET_VALUES_PER_THREAD=16777216","handlingStrategy":"validation","validationCode":"// Rust: validate before scanning\nif let Ok(v) = std::env::var(\"POLARS_PARQUET_DECODE_TARGET_VALUES_PER_THREAD\") {\n    assert!(v.parse::<usize>().is_ok(), \"POLARS_PARQUET_DECODE_TARGET_VALUES_PER_THREAD must be a usize integer, got: {v}\");\n}","typeGuard":"fn valid_target_values(v: &str) -> bool { v.parse::<usize>().is_ok() }","tryCatchPattern":null,"preventionTips":["Avoid thousands separators and decimal points in the value","Leave unset for the 16,777,216 default","Validate numeric POLARS_* vars once at process startup"],"tags":["rust","environment-variable","configuration","parquet"],"backgroundTag":"invalid-env-var-value","analyzedSha":"fe841f959ef4d2ceefc05a310d33ed7b1ab24e5e","analyzedAt":"2026-09-18T22:14:11.667Z","contentChangedAt":"2026-09-18T22:14:11.667Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}