{"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":322,"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":304,"sourceCodeEnd":340,"githubUrl":"https://github.com/pola-rs/polars/blob/df599052daf96e7a9cc30a3b0c6bd25d6947e3c0/crates/polars-stream/src/nodes/io_sources/parquet/mod.rs#L304-L340","documentation":"POLARS_PARQUET_DECODE_TARGET_VALUES_PER_THREAD is an escape-hatch env var (default 16_777_216) used when planning the new-streaming parquet decoder. It must parse as usize; a non-integer value panics via this expect while the pipeline is being constructed.","triggerScenarios":"Setting the variable to a non-numeric or negative value (e.g. '1e6', '1M', '-1', '') and then executing a streaming parquet read (engine='streaming') whose plan setup reads the variable.","commonSituations":"Performance-tuning knobs copied from blog posts with units attached; debug configurations left over from bug reproduction (the comment says it is used to force column-per-thread parallelism); CI environments with stale values.","solutions":["Set a plain positive integer: export POLARS_PARQUET_DECODE_TARGET_VALUES_PER_THREAD=16777216","Unset the variable to use the default (16_777_216)","Remove the variable once debugging is finished so normal planning resumes","Audit shell profiles, docker ENV, and CI secrets for stale tuning variables"],"exampleFix":"# before\nexport POLARS_PARQUET_DECODE_TARGET_VALUES_PER_THREAD=1M  # panic: 'integer'\n\n# after\nexport POLARS_PARQUET_DECODE_TARGET_VALUES_PER_THREAD=1048576\n# or: unset POLARS_PARQUET_DECODE_TARGET_VALUES_PER_THREAD","handlingStrategy":"validation","validationCode":"# bootstrap validation for numeric tuning knobs\nimport os\nv = os.environ.get(\"POLARS_PARQUET_DECODE_TARGET_VALUES_PER_THREAD\")\nif v is not None and not v.isdigit():\n    raise ValueError(\"POLARS_PARQUET_DECODE_TARGET_VALUES_PER_THREAD must be a plain integer\")","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Remove debug tuning variables after bug reproduction","Centralize env validation in deploy scripts","Never encode units in POLARS_* numeric variables"],"tags":["environment-variable","parquet","streaming","configuration","panic","rust"],"backgroundTag":null,"analyzedSha":"df599052daf96e7a9cc30a3b0c6bd25d6947e3c0","analyzedAt":"2026-08-16T12:10:03.978Z","schemaVersion":2},"datasetVersion":"2026-08-16T13:17:31.715Z"}