fix: schema command shows correct table comment and networks from all clusters#83
Merged
fix: schema command shows correct table comment and networks from all clusters#83
Conversation
… clusters The table comment regex was matching the first column COMMENT clause instead of the table-level COMMENT that appears after the closing parenthesis. Also, GetTable only returned the first cluster match, so tables present in multiple clusters (e.g. xatu + xatu-experimental) only showed networks from one. Now networks are shown per-cluster so you can see which networks are in which cluster.
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.
Summary
COMMENT 'xxx'regex was matching the first column comment instead of the table-level comment (which lives after the closing paren in ClickHouse DDL). Fixed by searching only the suffix after column definitions.GetTablereturned the first cluster match and stopped, so tables present in multiple clusters (e.g.xatu+xatu-experimental) only showed networks from whichever cluster the map iterator hit first. Replaced withGetTableAllthat returns matches from all clusters.GetTablemethod, consolidated case-insensitive fallback intoGetTableAll, fixed log line that was dumping raw structs.