Skip to content

Added Node Degree Filter#2615

Open
DanielLacina wants to merge 23 commits into
Pometry:db_v4from
DanielLacina:degree_filter_dbv4
Open

Added Node Degree Filter#2615
DanielLacina wants to merge 23 commits into
Pometry:db_v4from
DanielLacina:degree_filter_dbv4

Conversation

@DanielLacina
Copy link
Copy Markdown
Contributor

@DanielLacina DanielLacina commented May 21, 2026

What changes were proposed in this pull request?

I added a Node Degree Filter that can be passed into graph.filter to filter nodes based on if their degrees follow the filter expr represented by the Node Degree Filter. Filter expression include: ge, le, ne, lt, gt, is_in, not_is_in. If any other expression is called, the code panics.

Why are the changes needed?

The whole filtering module is used to provide a more user friendly Python interface when it comes to filtering. We would like to make filtering based on degrees user friendly so that's why I added this feature.

Does this PR introduce any user-facing change? If yes is this documented?

Yes. It is not documented.

How was this patch tested?

Through prop tests and Python tests

Are there any further changes required?

We will definitely need to refactor the Rust filtering module because it's too coupled to certain operations such as property filtering which fails to generalize and make the code reusable ultimately leading to repeated and inflexible code.

@DanielLacina DanielLacina changed the title m Added Node Degree Filter May 22, 2026
Copy link
Copy Markdown
Collaborator

@ljeub-pometry ljeub-pometry left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • make the public api consistent
  • shouldn't comment out the gql apis

Comment thread raphtory/src/db/graph/views/filter/model/node_filter/mod.rs Outdated
Comment thread raphtory/src/db/graph/views/filter/model/degree_filter.rs Outdated
Comment thread raphtory/src/python/filter/node_filter_builders.rs Outdated
Comment thread Cargo.toml
"raphtory-storage",
"raphtory-api-macros",
"raphtory-itertools",
"clam-core",
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you need to put these back

Comment thread raphtory/src/db/graph/views/filter/model/degree_filter.rs Outdated
Comment thread raphtory/src/db/graph/views/filter/model/degree_filter.rs Outdated
Comment thread raphtory/src/db/graph/views/filter/model/degree_filter.rs
Comment thread raphtory-graphql/src/model/graph/filtering.rs Outdated
Comment thread python/tests/test_base_install/test_filters/test_node_filter.py Outdated
Comment thread raphtory/src/db/api/state/ops/filter.rs
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.

4 participants