pola-rs/polars · error

unimplemented: AnonymousScan

Error message

unimplemented: AnonymousScan

What it means

Placeholder in the polars-stream IR lowering: an AnonymousScan node (e.g. a python-defined scan) was encountered for which no streaming physical node exists yet. It signals unimplemented streaming support for that scan source rather than user input error.

Solutions

  1. AnonymousScan is not supported by the new streaming engine; use engine='in-memory' (pl.Config.set_engine_affinity) or materialize the scan with a concrete source like scan_parquet/scan_csv.

Example fix

lf.collect(engine='in-memory')
Defensive patterns

Strategy: fallback

When it happens

Trigger: Lowering an AnonymousScan (Python UDF scan) to the streaming physical plan.

Common situations: See trigger scenarios.


AI-assisted analysis of pola-rs/polars@68506541d2 (2026-08-19). Data as JSON: /api/errors/ff70f2ba994b961e. Report an issue: GitHub.

Appendix: source

Thrown at crates/polars-stream/src/physical_plan/lower_ir.rs:835

                            .expect("python dataset should be resolved")
                            .python_scan()
                            .expect("should be python scan");

                        python_dataset_scan_to_reader_builder(expanded_scan)
                    },

                    #[cfg(feature = "scan_lines")]
                    FileScanIR::Lines { name: _ } => {
                        Arc::new(crate::nodes::io_sources::lines::LineReaderBuilder {
                            prefetch_limit: RelaxedCell::new_usize(0),
                            prefetch_semaphore: std::sync::OnceLock::new(),
                            shared_prefetch_wait_group_slot: Default::default(),
                            io_metrics: std::sync::OnceLock::new(),
                        }) as _
                    },

                    FileScanIR::ExpandedPaths { name: _ } => unreachable!(),

                    FileScanIR::Anonymous { .. } => {
                        return lower_subtree_to_inmem_engine(
                            node,
                            output_schema,
                            ir_arena,
                            expr_arena,
                            phys_sm,
                            ctx,
                        );
                    },
                };

                {
                    let cloud_options = unified_scan_args.cloud_options.clone().map(Arc::new);
                    let file_schema = file_info.schema;

                    let (projected_schema, file_schema) =
                        multi_scan::functions::resolve_projections::resolve_projections(

View on GitHub (pinned to 68506541d2)