fix(clickhouse): resolve 21.8 -> 21.9 test issues (again)#8846
Merged
fix(clickhouse): resolve 21.8 -> 21.9 test issues (again)#8846
Conversation
added 4 commits
March 3, 2022 14:53
This is the minimum change to make ee/clickhouse/queries/funnels/test/test_funnel_unordered.py::TestFunnelUnorderedStepsBreakdown::test_funnel_aggregate_by_groups_breakdown_group pass. There may be other tests still failing. The issue was introduced with the [addition of heredocs](ClickHouse/ClickHouse#26671) into the clickhouse syntax. heredocs use `$` as delimiters. We're using `$` for column identifiers in quite a few places, so now we need to ensure that we have quoted these before rendering into SQL.
42324b6 to
1067075
Compare
guidoiaquinti
approved these changes
Mar 3, 2022
Contributor
|
Let's discuss this one tomorrow at standup. We should change rules for column materialization specifically and rename existing columns, it will 100% cause issues |
Contributor
|
Q: Why did this change remove some snapshots? |
Contributor
Author
I assumed that they were stale, but I'll check that out. I also assume that pytest would complain in CI but I'll check of that's true also. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
NOTE: this is https://github.com/PostHog/posthog/pull/8838/files again. I accidentally merged into #8831 but should have waited for that one to be merged into master.
This is the minimum change to make
ee/clickhouse/queries/funnels/test/test_funnel_unordered.py::TestFunnelUnorderedStepsBreakdown::test_funnel_aggregate_by_groups_breakdown_group
pass. There may be other tests still failing.
The issue was introduced with the addition of heredocs into the clickhouse syntax. heredocs use
$as delimiters. We're using$for column identifiers in quite a few places, so now we need to ensure that we have quoted these before rendering into SQL.NOTE: this PR is best viewed commit by commit
NOTE: not all affected queries are highlighted, as there are cases where we have a valid query even with $ not escaped e.g.
e.$session AS $sessionis going to end up beinge.session. I assume that actual test assertions will catch these 🤞NOTE: this does not update all places this quoting is needed, this is just the minimum to get tests passing. I'll follow up separately for the rest, to avoid making this PR too large.
Changes
Please describe. If this affects the frontend, include screenshots.
Stay up-to-date with our coding conventions for a smoother review.
How did you test this code?
Updated existing tests