add more tests

This commit is contained in:
wangjiaming0909 2024-12-17 11:35:18 +08:00
parent b297aaaba1
commit 25c345a11b
2 changed files with 13 additions and 0 deletions

View File

@ -2243,6 +2243,7 @@ static bool dataTypeEqual(const SDataType* l, const SDataType* r) {
// 0 means equal, 1 means the left shall prevail, -1 means the right shall prevail // 0 means equal, 1 means the left shall prevail, -1 means the right shall prevail
static int32_t dataTypeComp(const SDataType* l, const SDataType* r) { static int32_t dataTypeComp(const SDataType* l, const SDataType* r) {
if (l->type == TSDB_DATA_TYPE_NULL) return -1;
if (l->type != r->type) { if (l->type != r->type) {
return 1; return 1;
} }

View File

@ -447,6 +447,18 @@ class TDTestCase:
tdSql.checkData(0, 0, None) tdSql.checkData(0, 0, None)
tdSql.checkData(1, 0, None) tdSql.checkData(1, 0, None)
sql = "select null union select 1"
tdSql.query(sql, queryTimes=1)
tdSql.checkRows(2)
tdSql.checkData(0, 0, None)
tdSql.checkData(1, 0, 1)
sql = "select null union select 'asd'"
tdSql.query(sql, queryTimes=1)
tdSql.checkRows(2)
tdSql.checkData(0, 0, None)
tdSql.checkData(1, 0, 'asd')
def stop(self): def stop(self):
tdSql.close() tdSql.close()
tdLog.success(f"{__file__} successfully executed") tdLog.success(f"{__file__} successfully executed")