add union case
This commit is contained in:
parent
507318f423
commit
ed76cad078
|
@ -36,40 +36,40 @@ class TDTestCase:
|
|||
query_condition.extend(
|
||||
(
|
||||
f"{tbname}.{char_col}",
|
||||
f"upper( {tbname}.{char_col} )",
|
||||
f"char_length( {tbname}.{char_col} )",
|
||||
f"concat( {tbname}.{char_col}, {tbname}.{char_col} )",
|
||||
f"concat_ws( '_', {tbname}.{char_col}, {tbname}.{char_col} )",
|
||||
f"length( {tbname}.{char_col} )",
|
||||
f"lower( {tbname}.{char_col} )",
|
||||
f"ltrim( {tbname}.{char_col} )",
|
||||
f"rtrim( {tbname}.{char_col} )",
|
||||
f"substr( {tbname}.{char_col}, 1 )",
|
||||
f"count( {tbname}.{char_col} )",
|
||||
# f"upper( {tbname}.{char_col} )",
|
||||
# f"char_length( {tbname}.{char_col} )",
|
||||
# f"concat( {tbname}.{char_col}, {tbname}.{char_col} )",
|
||||
# f"concat_ws( '_', {tbname}.{char_col}, {tbname}.{char_col} )",
|
||||
# f"length( {tbname}.{char_col} )",
|
||||
# f"lower( {tbname}.{char_col} )",
|
||||
# f"ltrim( {tbname}.{char_col} )",
|
||||
# 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)
|
||||
query_condition.extend( f"cast( {tbname}.{char_col} + {tbname}.{char_col_2} as binary(32) ) " for char_col_2 in CHAR_COL )
|
||||
query_condition.extend( f"cast( {tbname}.{char_col} + {tbname}.{un_char_col} as binary(32) ) " for un_char_col in NUM_COL )
|
||||
# query_condition.extend( f"cast( {tbname}.{un_char_col} as binary(16) ) " for un_char_col in NUM_COL)
|
||||
# query_condition.extend( f"cast( {tbname}.{char_col} + {tbname}.{char_col_2} as binary(32) ) " for char_col_2 in CHAR_COL )
|
||||
# query_condition.extend( f"cast( {tbname}.{char_col} + {tbname}.{un_char_col} as binary(32) ) " for un_char_col in NUM_COL )
|
||||
|
||||
for num_col in NUM_COL:
|
||||
query_condition.extend(
|
||||
(
|
||||
f"{tbname}.{num_col}",
|
||||
f"ceil( {tbname}.{num_col} )",
|
||||
f"abs( {tbname}.{num_col} )",
|
||||
f"acos( {tbname}.{num_col} )",
|
||||
f"asin( {tbname}.{num_col} )",
|
||||
f"atan( {tbname}.{num_col} )",
|
||||
f"cos( {tbname}.{num_col} )",
|
||||
f"floor( {tbname}.{num_col} )",
|
||||
f"log( {tbname}.{num_col}, {tbname}.{num_col})",
|
||||
f"sin( {tbname}.{num_col} )",
|
||||
f"sqrt( {tbname}.{num_col} )",
|
||||
f"tan( {tbname}.{num_col} )",
|
||||
f"round( {tbname}.{num_col} )",
|
||||
# f"ceil( {tbname}.{num_col} )",
|
||||
# f"abs( {tbname}.{num_col} )",
|
||||
# f"acos( {tbname}.{num_col} )",
|
||||
# f"asin( {tbname}.{num_col} )",
|
||||
# f"atan( {tbname}.{num_col} )",
|
||||
# f"cos( {tbname}.{num_col} )",
|
||||
# f"floor( {tbname}.{num_col} )",
|
||||
# f"log( {tbname}.{num_col}, {tbname}.{num_col})",
|
||||
# f"sin( {tbname}.{num_col} )",
|
||||
# f"sqrt( {tbname}.{num_col} )",
|
||||
# f"tan( {tbname}.{num_col} )",
|
||||
# f"round( {tbname}.{num_col} )",
|
||||
f"max( {tbname}.{num_col} )",
|
||||
f"sum( {tbname}.{num_col} )",
|
||||
f"count( {tbname}.{num_col} )",
|
||||
|
@ -79,7 +79,13 @@ class TDTestCase:
|
|||
query_condition.extend( f"{tbname}.{num_col} + {tbname}.{num_col_2}" for num_col_2 in NUM_COL )
|
||||
query_condition.extend( f"{tbname}.{num_col} + {tbname}.{char_col} " for char_col in CHAR_COL )
|
||||
|
||||
query_condition.append(''' "test1234!@#$%^&*():'><?/.,][}{" ''')
|
||||
query_condition.extend(
|
||||
(
|
||||
# ''' "test1234!@#$%^&*():'><?/.,][}{" ''',
|
||||
''' "test12" ''',
|
||||
1010
|
||||
)
|
||||
)
|
||||
|
||||
return query_condition
|
||||
|
||||
|
@ -144,11 +150,11 @@ class TDTestCase:
|
|||
["ct2", "ct4"],
|
||||
["ct2", "t1"],
|
||||
["ct4", "t1"],
|
||||
["ct1", "ct2", "ct4"],
|
||||
["ct1", "ct2", "t1"],
|
||||
["ct1", "ct4", "t1"],
|
||||
["ct2", "ct4", "t1"],
|
||||
["ct1", "ct2", "ct4", "t1"],
|
||||
# ["ct1", "ct2", "ct4"],
|
||||
# ["ct1", "ct2", "t1"],
|
||||
# ["ct1", "ct4", "t1"],
|
||||
# ["ct2", "ct4", "t1"],
|
||||
# ["ct1", "ct2", "ct4", "t1"],
|
||||
]
|
||||
|
||||
@property
|
||||
|
@ -201,7 +207,8 @@ class TDTestCase:
|
|||
)
|
||||
)
|
||||
|
||||
return filter(None, sqls)
|
||||
# return filter(None, sqls)
|
||||
return list(filter(None, sqls))
|
||||
|
||||
def __get_type(self, col):
|
||||
if tdSql.cursor.istype(col, "BOOL"):
|
||||
|
|
Loading…
Reference in New Issue