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

fix: querier show subnet error when subnet filtering #8923

Merged
merged 1 commit into from
Jan 14, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions server/querier/engine/clickhouse/clickhouse_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -544,8 +544,8 @@ var (
}, {
name: "test_show_subnet_vpc_where",
db: "flow_metrics",
input: "SHOW tag subnet values from vtap_flow_port where vpc_id != 1 and vpc !='xx'",
output: []string{"SELECT id AS `value`, name AS `display_name` FROM flow_tag.`subnet_map` WHERE (not(l3_epc_id = 1) AND not(toUInt64(l3_epc_id) GLOBAL IN (SELECT id FROM flow_tag.l3_epc_map WHERE name = 'xx'))) GROUP BY `value`, `display_name` ORDER BY `value` asc LIMIT 10000"},
input: "SHOW tag subnet values from vtap_flow_port where vpc_id != 1 and vpc !='xx' and subnet_id != 1 and subnet !='xx'",
output: []string{"SELECT id AS `value`, name AS `display_name` FROM flow_tag.`subnet_map` WHERE (not(l3_epc_id = 1) AND not(toUInt64(l3_epc_id) GLOBAL IN (SELECT id FROM flow_tag.l3_epc_map WHERE name = 'xx')) AND not(value = 1) AND not(display_name = 'xx')) GROUP BY `value`, `display_name` ORDER BY `value` asc LIMIT 10000"},
}, {
name: "test_application_log_body",
db: "application_log",
Expand Down
2 changes: 1 addition & 1 deletion server/querier/engine/clickhouse/common/const.go
Original file line number Diff line number Diff line change
Expand Up @@ -60,5 +60,5 @@ var SHOW_TAG_VALUE_MAP = map[string][]string{
"gprocess_map": []string{"gprocess", "chost", "l3_epc"},
"pod_ingress_map": []string{"pod_cluster", "pod_ns", "pod_ingress"},
"pod_node_map": []string{"pod_cluster", "pod_node"},
"subnet_map": []string{"l3_epc"},
"subnet_map": []string{"l3_epc", "subnet"},
}
Loading