fix: drop table not materialized view
When running tests with ./bin/tests -vv --lf path_to_tests.py we print lots of errors to the console while migrating
this fixes one of them
User
Code: 62.
DB::Exception: Syntax error: failed at position 6 ('MATERIALISED'): MATERIALISED VIEW IF EXISTS sessions_mv ON CLUSTER 'posthog'. Expected one of: DATABASE, VIEW, DICTIONARY, TEMPORARY, TABLE, FUNCTION, NAMED COLLECTION, INDEX, USER, ROLE, SETTINGS PROFILE, PROFILE, ROW POLICY, POLICY, QUOTA. Stack trace:
(splitting out from https://github.com/PostHog/posthog/pull/21684 to make sure it doesn't also introduce test failures that PR is hiding)
locally you can see this doesn't drop the view with
select session_id from sessions_mv;
DROP MATERIALISED VIEW IF EXISTS sessions_mv;
select session_id from sessions_mv;
you can select from the MV before and after
@robbie-c I'm out on parent ops on monday morning... I'm reading the failures as the tests accidentally relied on the view not having been deleted - but I've also not read the tests or thought about it đ
I'm hoping your familiarity will highlight what's really happening :)
đ¸ UI snapshots have been updated
1 snapshot changes in total. 0 added, 1 modified, 0 deleted:
-
chromium: 0 added, 1 modified, 0 deleted (diff for shard 2) -
webkit: 0 added, 0 modified, 0 deleted
Triggered by this commit.
đ¸ UI snapshots have been updated
1 snapshot changes in total. 0 added, 1 modified, 0 deleted:
-
chromium: 0 added, 1 modified, 0 deleted (diff for shard 2) -
webkit: 0 added, 0 modified, 0 deleted
Triggered by this commit.
đ¸ UI snapshots have been updated
1 snapshot changes in total. 0 added, 1 modified, 0 deleted:
-
chromium: 0 added, 1 modified, 0 deleted (diff for shard 2) -
webkit: 0 added, 0 modified, 0 deleted
Triggered by this commit.
Size Change: +51 B (0%)
Total Size: 1.03 MB
âšī¸ View Unchanged
| Filename | Size | Change |
|---|---|---|
frontend/dist/toolbar.js |
1.03 MB | +51 B (0%) |
đ¸ UI snapshots have been updated
1 snapshot changes in total. 0 added, 1 modified, 0 deleted:
-
chromium: 0 added, 1 modified, 0 deleted (diff for shard 2) -
webkit: 0 added, 0 modified, 0 deleted
Triggered by this commit.
This PR hasn't seen activity in a week! Should it be merged, closed, or further worked on? If you want to keep it open, post a comment or remove the stale label â otherwise this will be closed in another week.
This PR was closed due to lack of activity. Feel free to reopen if it's still relevant.