Skip to content

Xarray-specific filter predicate pushdown.#113

Merged
alxmrs merged 6 commits into
mainfrom
better-filter
Mar 2, 2026
Merged

Xarray-specific filter predicate pushdown.#113
alxmrs merged 6 commits into
mainfrom
better-filter

Conversation

@alxmrs

@alxmrs alxmrs commented Feb 9, 2026

Copy link
Copy Markdown
Collaborator

Partition pruning: In the Xarray data model, we can always get statistics for the dataset dims, which function like the "primary keys" of the materialized table. These statistics lend themselves to omit processing data that we know we don't need to. For example,

SELECT * FROM air WHERE time > '2020-02-01'

Will skip loading partitions whose time ranges are entirely before 2020-02-01.

Base automatically changed from fix-106 to main February 9, 2026 21:41
@alxmrs
alxmrs force-pushed the better-filter branch 2 times, most recently from 4d8f9ed to 044958d Compare February 15, 2026 00:48
Partition pruning: we can get statistics for the "primary keys" i.e. the dataset dims.
@alxmrs

alxmrs commented Feb 25, 2026

Copy link
Copy Markdown
Collaborator Author

@claude can you review this PR?

@alxmrs
alxmrs marked this pull request as ready for review February 25, 2026 06:08
@alxmrs
alxmrs requested a review from maximedion2 February 25, 2026 06:09
@maximedion2

Copy link
Copy Markdown
Collaborator

Just for context, so I see that this is to push down filter predicates to avoid reading some data, but what is a partition in this context? Like this is to prune partitions, but how do you define it? Is it related to a zarr group (sort of like a hive style partition) or just chunking up the data? I think in the earlier PR I looked at it was just data chunks, but I see you've been making a few changes and I'm trying to keep track of the overall features and logic.

Also, obviously don't wait on me if you want to merge, I'll take a look either way, this is very interesting, and if I have any comments after you merge I'll still make them here.

@alxmrs

alxmrs commented Mar 2, 2026

Copy link
Copy Markdown
Collaborator Author

I'm happy to get your review when you can provide it, @maximedion2. I probably will go ahead and merge now.

what is a partition in this context?

A partition is one chunk of xarray data across multiple variables. Since the ideal chunks are the underlying physical chunks from the Zarr store, I've called these "blocks", to borrow from the Zarr library parlance.

Happy to talk more about it in the future. Thanks for taking a look.

@alxmrs
alxmrs merged commit f44a73a into main Mar 2, 2026
12 checks passed
@alxmrs
alxmrs deleted the better-filter branch March 2, 2026 00:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants