From bef4a5371185d7f9b94f373a30414e8989548703 Mon Sep 17 00:00:00 2001 From: cpwu Date: Mon, 16 May 2022 16:29:25 +0800 Subject: [PATCH] fix case --- tests/system-test/2-query/union.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/tests/system-test/2-query/union.py b/tests/system-test/2-query/union.py index fa63eda1c6..d5ab5ce315 100644 --- a/tests/system-test/2-query/union.py +++ b/tests/system-test/2-query/union.py @@ -106,6 +106,14 @@ class TDTestCase: def __group_condition(self, col, having = None): + if col.startswith("count"): + col = col.split("count(")[1].split(")") + if col.startswith("max"): + col = col.split("max(")[1].split(")") + if col.startswith("sum"): + col = col.split("sum(")[1].split(")") + if col.startswith("min"): + col = col.split("min(")[1].split(")") return f" group by {col} having {having}" if having else f" group by {col} " def __single_sql(self, select_clause, from_clause, where_condition=None, group_condition=None):