-
-
Notifications
You must be signed in to change notification settings - Fork 63
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
cleanup(smart_autocomplete): only remove dist table and mv #6922
Merged
Conversation
This file contains 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
phacops
approved these changes
Feb 27, 2025
This PR has a migration; here is the generated SQL for -- start migrations
-- forward migration events_analytics_platform : 0029_remove_smart_autocomplete_experimental
Local op: DROP TABLE IF EXISTS eap_trace_item_attrs_mv;
Distributed op: DROP TABLE IF EXISTS eap_trace_item_attrs_dist;
-- end forward migration events_analytics_platform : 0029_remove_smart_autocomplete_experimental
-- backward migration events_analytics_platform : 0029_remove_smart_autocomplete_experimental
Distributed op: CREATE TABLE IF NOT EXISTS eap_trace_item_attrs_dist (project_id UInt64, item_type String, date Date CODEC (DoubleDelta, ZSTD(1)), retention_days UInt16, attrs_string Map(String, String), attrs_bool Array(String), attrs_int64 Array(String), attrs_float64 Array(String), key_val_hash UInt64) ENGINE Distributed(`cluster_one_sh`, default, eap_trace_item_attrs_local);
Local op: CREATE MATERIALIZED VIEW IF NOT EXISTS eap_trace_item_attrs_mv TO eap_trace_item_attrs_local (project_id UInt64, item_type String, date Date CODEC (DoubleDelta, ZSTD(1)), retention_days UInt16, attrs_string Map(String, String), attrs_bool Array(String), attrs_int64 Array(String), attrs_float64 Array(String), key_val_hash UInt64) AS
SELECT
project_id,
'span',
toDate(_sort_timestamp) AS date,
retention_days as retention_days,
mapConcat(attr_str_0, attr_str_1, attr_str_2, attr_str_3, attr_str_4, attr_str_5, attr_str_6, attr_str_7, attr_str_8, attr_str_9, attr_str_10, attr_str_11, attr_str_12, attr_str_13, attr_str_14, attr_str_15, attr_str_16, attr_str_17, attr_str_18, attr_str_19) AS attrs_string, -- `attrs_string` Map(String, String),
array() AS attrs_bool, -- bool
array() AS attrs_int64, -- int64
arrayConcat(mapKeys(attr_num_0), mapKeys(attr_num_1), mapKeys(attr_num_2), mapKeys(attr_num_3), mapKeys(attr_num_4), mapKeys(attr_num_5), mapKeys(attr_num_6), mapKeys(attr_num_7), mapKeys(attr_num_8), mapKeys(attr_num_9), mapKeys(attr_num_10), mapKeys(attr_num_11), mapKeys(attr_num_12), mapKeys(attr_num_13), mapKeys(attr_num_14), mapKeys(attr_num_15), mapKeys(attr_num_16), mapKeys(attr_num_17), mapKeys(attr_num_18), mapKeys(attr_num_19)) AS attrs_float64, -- float
-- a hash of all the attribute key,val pairs of the item in sorted order
-- this lets us deduplicate rows with merges
cityHash64(mapSort(
mapConcat(
mapApply((k, v) -> (k, ''), attr_num_0),
mapApply((k, v) -> (k, ''), attr_num_1),
mapApply((k, v) -> (k, ''), attr_num_2),
mapApply((k, v) -> (k, ''), attr_num_3),
mapApply((k, v) -> (k, ''), attr_num_4),
mapApply((k, v) -> (k, ''), attr_num_5),
mapApply((k, v) -> (k, ''), attr_num_6),
mapApply((k, v) -> (k, ''), attr_num_7),
mapApply((k, v) -> (k, ''), attr_num_8),
mapApply((k, v) -> (k, ''), attr_num_9),
mapApply((k, v) -> (k, ''), attr_num_10),
mapApply((k, v) -> (k, ''), attr_num_11),
mapApply((k, v) -> (k, ''), attr_num_12),
mapApply((k, v) -> (k, ''), attr_num_13),
mapApply((k, v) -> (k, ''), attr_num_14),
mapApply((k, v) -> (k, ''), attr_num_15),
mapApply((k, v) -> (k, ''), attr_num_16),
mapApply((k, v) -> (k, ''), attr_num_17),
mapApply((k, v) -> (k, ''), attr_num_18),
mapApply((k, v) -> (k, ''), attr_num_19),
attr_str_0,
attr_str_1,
attr_str_2,
attr_str_3,
attr_str_4,
attr_str_5,
attr_str_6,
attr_str_7,
attr_str_8,
attr_str_9,
attr_str_10,
attr_str_11,
attr_str_12,
attr_str_13,
attr_str_14,
attr_str_15,
attr_str_16,
attr_str_17,
attr_str_18,
attr_str_19
)
)) AS key_val_hash
FROM eap_spans_2_local
;
-- end backward migration events_analytics_platform : 0029_remove_smart_autocomplete_experimental |
❌ 1 Tests Failed:
View the top 1 failed test(s) by shortest run time
To view more test analytics, go to the Test Analytics Dashboard |
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.
we can't truncate a table this large so we'll just let TTL take care of it and stop populating it