Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[PYG-350] Aggregate when filter return empty #2124

Open
wants to merge 8 commits into
base: master
Choose a base branch
from

Conversation

doctrino
Copy link
Contributor

@doctrino doctrino commented Mar 1, 2025

Description

If you add a filter to your aggregates which filters out all results the value will not be in the response:
image

Checklist:

  • Tests added/updated.
  • Documentation updated. Documentation is generated from docstrings - these must be updated according to your change.
    If a new method has been added it should be referenced in cognite.rst in order to generate docs based on its docstring.
  • Changelog updated in CHANGELOG.md.
  • Version bumped. If triggering a new release is desired, bump the version number in _version.py and pyproject.toml per semantic versioning.

@doctrino doctrino requested review from a team as code owners March 1, 2025 14:05
Copy link

codecov bot commented Mar 1, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 90.37%. Comparing base (11cf2b4) to head (11a03f7).

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2124      +/-   ##
==========================================
- Coverage   90.38%   90.37%   -0.01%     
==========================================
  Files         152      152              
  Lines       23127    23125       -2     
==========================================
- Hits        20903    20900       -3     
- Misses       2224     2225       +1     
Files with missing lines Coverage Δ
cognite/client/_version.py 100.00% <100.00%> (ø)
cognite/client/data_classes/aggregations.py 89.84% <100.00%> (-0.08%) ⬇️

... and 1 file with indirect coverage changes

🚀 New features to boost your workflow:
  • Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copy link
Collaborator

@erlendvollset erlendvollset left a comment

Choose a reason for hiding this comment

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

LGTM

@doctrino doctrino requested review from a team and rbtcollins and removed request for a team March 6, 2025 16:18
if camel_case:
output = convert_all_keys_recursive(output)
return output
return {"aggregate": self._aggregate, "property": self.property}

Choose a reason for hiding this comment

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

This change isn't described by your PR description. Is it accidental, or deliberately but undocumented?

Copy link

@rbtcollins rbtcollins left a comment

Choose a reason for hiding this comment

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

one small question

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