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

Update aggregated conversion node to only have queried linkable specs #1381

Merged
merged 7 commits into from
Oct 25, 2024

Conversation

WilliamDee
Copy link
Contributor

@WilliamDee WilliamDee commented Aug 22, 2024

Context

When you try to query a conversion metric by supplying a filter with a dimension that exists in the base measure's semantic model without providing it in the group by, the rendering fails. This is because with the logic in the conversion metric builder, it ended up "requiring" all the linkable specs from the query (group by + filter), so the group by provided in the filter gets added to the resulting SELECT even though it was not supplied in the group by. This caused an error with the join as it didn't expect that additional element. This PR updates it so that instead of using all the required linkable specs, we should only use the queried linkable specs when building out the conversion aggregate node.

Resolves #1210
Resolves SL-2777

@cla-bot cla-bot bot added the cla:yes label Aug 22, 2024
Copy link

Thank you for your pull request! We could not find a changelog entry for this change. For details on how to document a change, see the contributing guide.

@courtneyholcomb
Copy link
Contributor

Sweet! Can we add a test?

@WilliamDee
Copy link
Contributor Author

Sweet! Can we add a test?

Oh ya i was just wondering if this looked good first!

@WilliamDee WilliamDee force-pushed the will/fix-extra-linkable-specs branch from a0a64d8 to 3cddd91 Compare August 23, 2024 16:38
@WilliamDee WilliamDee marked this pull request as ready for review August 23, 2024 16:38
@WilliamDee WilliamDee force-pushed the will/fix-extra-linkable-specs branch from 3cddd91 to 961db61 Compare August 23, 2024 17:00
Copy link
Contributor

@tlento tlento left a comment

Choose a reason for hiding this comment

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

The predicate pushdown is failing on snapshots. The other error is a plan conversion failure.

Copy link

linear bot commented Oct 23, 2024

Copy link
Contributor

@courtneyholcomb courtneyholcomb left a comment

Choose a reason for hiding this comment

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

Requested one more test but otherwise looks great!!

@WilliamDee WilliamDee added the Run Tests With Other SQL Engines Runs the test suite against the SQL engines in our target environment label Oct 25, 2024
@github-actions github-actions bot removed the Run Tests With Other SQL Engines Runs the test suite against the SQL engines in our target environment label Oct 25, 2024
@WilliamDee WilliamDee merged commit 8c2e064 into main Oct 25, 2024
29 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[SL-2194] Conversion metrics cannot render queries with filters unless the element is in the group by
3 participants