diff --git a/server/querier/engine/clickhouse/clickhouse_test.go b/server/querier/engine/clickhouse/clickhouse_test.go index c7010cf0d22..da0fd7b4750 100644 --- a/server/querier/engine/clickhouse/clickhouse_test.go +++ b/server/querier/engine/clickhouse/clickhouse_test.go @@ -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", diff --git a/server/querier/engine/clickhouse/common/const.go b/server/querier/engine/clickhouse/common/const.go index a293130a6f0..563042a2065 100644 --- a/server/querier/engine/clickhouse/common/const.go +++ b/server/querier/engine/clickhouse/common/const.go @@ -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"}, }