Skip to content

feat(gooddata-sdk): add dimensionality support to MetricValueFilter#1623

Merged
hkad98 merged 1 commit into
gooddata:masterfrom
hkad98:jkd/metric-value-filter
May 20, 2026
Merged

feat(gooddata-sdk): add dimensionality support to MetricValueFilter#1623
hkad98 merged 1 commit into
gooddata:masterfrom
hkad98:jkd/metric-value-filter

Conversation

@hkad98
Copy link
Copy Markdown
Contributor

@hkad98 hkad98 commented May 20, 2026

Summary

  • Add optional dimensionality argument to MetricValueFilter and CompoundMetricValueFilter, matching the field already exposed by RankingFilter.
  • Update ComputeToSdkConverter to round-trip dimensionality for comparison / range / compound measure value filters; factor out a shared _extract_dimensionality helper (now also used by the existing RankingFilter branch).
  • The OpenAPI-generated API client models for ComparisonMeasureValueFilter, RangeMeasureValueFilter, and CompoundMeasureValueFilter already expose dimensionality, so no client regeneration is required. The dashboard-layer DashboardMeasureValueFilter does not have this field at the API-client level, so the visualization JSON path is intentionally untouched.
  • End-to-end verified against a local GoodData stack: with dimensionality=[region] the same orders > 50 filter that returns 0 rows when applied per (region, customer) cell returns 884 rows when evaluated at the region-aggregation level, confirming the field is honored by the backend.

Test plan

JIRA: PSDK-231
risk: low

Adds the optional `dimensionality` argument to `MetricValueFilter` and
`CompoundMetricValueFilter`, matching the field already available on
`RankingFilter`. The API client models for
`ComparisonMeasureValueFilter`/`RangeMeasureValueFilter`/`CompoundMeasureValueFilter`
already expose this field, so no client regeneration is required.

The compute-to-SDK converter is updated to round-trip the field for all
three measure value filter variants; a shared `_extract_dimensionality`
helper replaces the inline cast previously used by `RankingFilter`.

End-to-end verified against a local GoodData stack: with
`dimensionality=[region]` the same `orders > 50` filter that returns
0 rows when applied per `(region, customer)` cell returns 884 rows
when evaluated at the region-aggregation level, confirming the field
is honored by the backend.

JIRA: PSDK-231
risk: low
@hkad98 hkad98 requested review from jaceksan, lupko and pcerny as code owners May 20, 2026 06:32
@codecov
Copy link
Copy Markdown

codecov Bot commented May 20, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 79.03%. Comparing base (38b0798) to head (4ada650).

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1623      +/-   ##
==========================================
+ Coverage   79.01%   79.03%   +0.02%     
==========================================
  Files         231      231              
  Lines       15619    15634      +15     
==========================================
+ Hits        12341    12357      +16     
+ Misses       3278     3277       -1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@hkad98 hkad98 enabled auto-merge May 20, 2026 06:49
@hkad98 hkad98 merged commit e1d6ad4 into gooddata:master May 20, 2026
12 checks passed
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