Skip to content

Feature: add .with_limit() method to AggregateBuilder#369

Merged
dirkkul merged 5 commits intoweaviate:mainfrom
tsmith023:feature/with-limit-on-aggregate
Jul 6, 2023
Merged

Feature: add .with_limit() method to AggregateBuilder#369
dirkkul merged 5 commits intoweaviate:mainfrom
tsmith023:feature/with-limit-on-aggregate

Conversation

@tsmith023
Copy link
Collaborator

This PR adds support for using the limit argument on Aggregate queries through the .with_limit() builder method of the AggregateBuilder class as requested in #361.

Since its function is dependent on the presence of other filters, it is only included when they are also. Unit and integration tests are added to handle the new features. There are no client-side data validation checks so that any user mishap will be reported as as errors from Weaviate itself, as per the rest of the codebase.

@dirkkul, let me know if this is inline with your thoughts on the feature and whether further changes are required!

@weaviate-git-bot
Copy link

To avoid any confusion in the future about your contribution to Weaviate, we work with a Contributor License Agreement. If you agree, you can simply add a comment to this PR that you agree with the CLA so that we can merge.

beep boop - the Weaviate bot 👋🤖

PS:
Are you already a member of the Weaviate Slack channel?

@codecov-commenter
Copy link

codecov-commenter commented Jul 6, 2023

Codecov Report

Patch coverage: 95.66% and project coverage change: -0.34 ⚠️

Comparison is base (2d3dd56) 95.63% compared to head (20c4ffa) 95.30%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #369      +/-   ##
==========================================
- Coverage   95.63%   95.30%   -0.34%     
==========================================
  Files          64       64              
  Lines        7836     8151     +315     
==========================================
+ Hits         7494     7768     +274     
- Misses        342      383      +41     
Impacted Files Coverage Δ
integration/test_grcp.py 98.59% <ø> (ø)
test/batch/test_crud_batch.py 99.22% <ø> (ø)
test/data/test_crud_data.py 99.23% <ø> (ø)
weaviate/schema/validate_schema.py 100.00% <ø> (ø)
weaviate/batch/crud_batch.py 92.57% <60.00%> (+0.03%) ⬆️
weaviate/schema/crud_schema.py 78.15% <71.87%> (-1.28%) ⬇️
weaviate/gql/aggregate.py 75.86% <93.33%> (+3.63%) ⬆️
weaviate/gql/get.py 96.95% <95.23%> (-0.30%) ⬇️
integration/test_graphql.py 93.64% <97.61%> (+2.10%) ⬆️
integration/test_batch.py 97.87% <100.00%> (+2.12%) ⬆️
... and 10 more

... and 11 files with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@tsmith023
Copy link
Collaborator Author

I agree with the Contributor License Agreement (CLA)

@dirkkul dirkkul merged commit 4c988d0 into weaviate:main Jul 6, 2023
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