From 6609a4afa19f57c6c2190e195f579e98eca7f9f3 Mon Sep 17 00:00:00 2001 From: cpwu Date: Mon, 16 May 2022 18:15:33 +0800 Subject: [PATCH] fix case --- tests/system-test/2-query/union.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tests/system-test/2-query/union.py b/tests/system-test/2-query/union.py index a03a114ced..5b3e27affa 100644 --- a/tests/system-test/2-query/union.py +++ b/tests/system-test/2-query/union.py @@ -46,6 +46,8 @@ class TDTestCase: f"rtrim( {tbname}.{char_col} )", f"substr( {tbname}.{char_col}, 1 )", f"count( {tbname}.{char_col} )", + f"cast( {tbname}.{char_col} as nchar(3) )", + f"cast( {tbname}.{char_col} as nchar(8) )", ) ) query_condition.extend( f"cast( {tbname}.{un_char_col} as binary(16) ) " for un_char_col in NUM_COL) @@ -128,6 +130,8 @@ class TDTestCase: 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=""): + if "on" not in from_clause and select_clause.split(".")[0] != from_clause.split(".")[0]: + return return f"select {select_clause} from {from_clause} {where_condition} {group_condition}"