Skip to content

fix(tutorial): n-th value checks expect the n-th row of the cube - #459

Merged
stbischof merged 1 commit into
mainfrom
fix/nth-checksuite-per-group
Oct 16, 2026
Merged

stbischof merged 1 commit into
mainfrom
fix/nth-checksuite-per-group

Conversation

@stbischof

Copy link
Copy Markdown
Contributor

Follows eclipse-daanse/org.eclipse.daanse.sql#67: the n-th value is now an aggregate over the rows of a group, not a window over the groups.

The checks query the whole cube, one group of 21 facts ordered by VALUE (1, 2, 2, 3, 3, 3, 4, …):

measure before now
NthAgg1 1 1
NthAgg2 empty 2
NthAgg3 empty 2
NthAgg4 empty 3
NthAgg5 empty 3
NthAgg6 empty 3
NthAgg7 empty 4

Checked with the SQL the DuckDB dialect renders (list_extract(list(VALUE ORDER BY VALUE) FILTER (WHERE VALUE IS NOT NULL), n)) on the tutorial's Fact.csv.

The old values came from NTH_VALUE as a window over the groups.

Signed-off-by: Stefan Bischof <stbischof@bipolis.org>
@sonarqubecloud

Copy link
Copy Markdown

@stbischof
stbischof merged commit 9c6ac40 into main Oct 16, 2026
14 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.

1 participant