This commit is contained in:
cpwu 2022-05-16 18:46:48 +08:00
parent 26bbdbc757
commit 43a8a55a5b
1 changed files with 1 additions and 1 deletions

View File

@ -137,7 +137,7 @@ class TDTestCase:
return f" group by {col} having {having}" if having else f" group by {col} " return f" group by {col} having {having}" if having else f" group by {col} "
def __single_sql(self, select_clause, from_clause, where_condition="", group_condition=""): def __single_sql(self, select_clause, from_clause, where_condition="", group_condition=""):
if "on" not in from_clause and select_clause.split(".")[0] != from_clause.split(".")[0]: if isinstance(select_clause, str) and "on" not in from_clause and select_clause.split(".")[0] != from_clause.split(".")[0]:
return return
return f"select {select_clause} from {from_clause} {where_condition} {group_condition}" return f"select {select_clause} from {from_clause} {where_condition} {group_condition}"