Skip to content

Document limitRequired and complexityEstimators flags#291

Open
a-alle wants to merge 8 commits into7.xfrom
complexity-estimation
Open

Document limitRequired and complexityEstimators flags#291
a-alle wants to merge 8 commits into7.xfrom
complexity-estimation

Conversation

@a-alle
Copy link
Contributor

@a-alle a-alle commented Feb 11, 2026

No description provided.

@a-alle a-alle marked this pull request as ready for review February 27, 2026 18:35
a-alle and others added 3 commits March 3, 2026 10:55
Co-authored-by: Richard Sill <156673635+rsill-neo4j@users.noreply.github.com>
@a-alle a-alle requested a review from rsill-neo4j March 3, 2026 15:55
Copy link
Contributor

@rsill-neo4j rsill-neo4j left a comment

Choose a reason for hiding this comment

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

some more comments


It is intended for this feature to be used in conjunction with `limitRequired` to provide the most effective protection against unbounded queries.

When `limitRequired` is enabled, the complexity score of a query will be higher due to the multiplication by the provided `limit` arguments, which more accurately reflects the potential cost of executing that query.
Copy link
Contributor

@rsill-neo4j rsill-neo4j Mar 10, 2026

Choose a reason for hiding this comment

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

Suggested change
When `limitRequired` is enabled, the complexity score of a query will be higher due to the multiplication by the provided `limit` arguments, which more accurately reflects the potential cost of executing that query.
When `limitRequired` is enabled, the complexity score of a query is higher because the provided `limit` arguments act as multipliers, which more accurately reflects the potential cost of executing that query.

Copy link
Contributor

Choose a reason for hiding this comment

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

this one has not been applied -
does the wording suggestion not capture the intended meaning?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Hmmm I think it doesn't. It's not the score that's multiplied, the score is a result. It's the equation generating that result that involves multiplication with the limit arguments.

Copy link
Contributor

Choose a reason for hiding this comment

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

ok, updated the suggestion
still wondering though - what could we call the things that get multiplied with the limit arguments? intermediate results or something like that?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

or maybe sth like "the provided limit arguments are multipliers"? And then we don't need a way to refer the intermediate results?

Copy link
Contributor

Choose a reason for hiding this comment

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

updated the wording

Co-authored-by: Richard Sill <156673635+rsill-neo4j@users.noreply.github.com>
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.

3 participants