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

Compute join on expressions immediately, rather than after views have been translated #2085

Merged
merged 2 commits into from
Jan 10, 2025

Conversation

christopherswenson
Copy link
Contributor

@christopherswenson christopherswenson commented Jan 8, 2025

This fixes an issue where views that used joins which had composite field usage in their on expressions would incorrectly not take that composite field into account when resolving a cube.

source: extended is compose(
  base,
  base extend { dimension: composite_field is 1 }
) extend {
  join_xxx: `join` is ... on composite_field = ...
  view: `view` is { group_by: `join`.field }
}
run: extended -> `view`

Previously, we were storing all the joins while computing fields of a source (including views), then computing all the join on expressions after translating all the fields. Now we compute the on expressions immediately after adding each join.

@christopherswenson christopherswenson changed the title Test to see if fixup join ons is necessary any more Compute join on expressions immediately, rather than after views have been translated Jan 8, 2025
@christopherswenson christopherswenson marked this pull request as ready for review January 8, 2025 22:27
@christopherswenson christopherswenson merged commit 56d0ce9 into main Jan 10, 2025
13 checks passed
@christopherswenson christopherswenson deleted the crs-fix-view-with-join-cube branch January 10, 2025 17:46
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