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}"