When a dataframe or SQL query does its work#

An area-of-interest filter can appear at different points in a workflow. Its position determines what has already been read when the filter is applied.

When does the file read happen?#

Route

Timeline

Eager dataframe

read_file discovers the selected columns and active geometry, executes the requested projection, and retains it in a GeoDataFrame → apply the filter to that frame.

Deferred dataframe

scan_file takes a logical geometry selector → compose the filter → collect binds the sources and executes the relation.

SQL

table_from_file captures reader options without file I/O → SELECT expresses the projection and restrictions → query execution demands the source data.

Which geometry can this filter skip?#

Imagine covered and uncovered GeoParquet twins queried with the same spatial restriction. Both yield the same selected rows. Where the declared covering lets the plan exclude a region, the read can skip decoding its geometry.

Now put a malformed WKB value in that excluded region. The selective read can succeed, while a later query that demands that value can raise an error. The earlier success establishes that the selected rows were produced. Equivalent selections can therefore require different work.

What does a result chunk tell you?#

collect_chunked sits on the output side of the timeline: its pages describe how the consumer receives rows. The plan and runtime determine the sizes of input scan pieces separately from those result pages. Result page size alone cannot establish peak device memory or whether the scan can rewind.

For the practical consumption workflow, see Process a result that strains GPU memory.