From 52350a6595bd0aa2d55ffc7a4ceed3ab71bdf5aa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=9Chappyguoxy=E2=80=9D?= <“happy_guoxy@163.com”> Date: Sat, 11 May 2024 13:46:16 +0800 Subject: [PATCH 1/7] add pk cases --- tests/parallel_test/cases.task | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/tests/parallel_test/cases.task b/tests/parallel_test/cases.task index d9d16d1f57..3f8e3abac7 100644 --- a/tests/parallel_test/cases.task +++ b/tests/parallel_test/cases.task @@ -489,11 +489,11 @@ ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/last+last_row.py -Q 2 ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/last+last_row.py -Q 3 ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/last+last_row.py -Q 4 -#,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/primary_ts_base_1.py -#,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/primary_ts_base_1.py -R -#,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/primary_ts_base_1.py -Q 2 -#,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/primary_ts_base_1.py -Q 3 -#,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/primary_ts_base_1.py -Q 4 +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/primary_ts_base_1.py +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/primary_ts_base_1.py -R +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/primary_ts_base_1.py -Q 2 +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/primary_ts_base_1.py -Q 3 +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/primary_ts_base_1.py -Q 4 ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/primary_ts_base_2.py ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/primary_ts_base_2.py -R ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/primary_ts_base_2.py -Q 2 From bce036fe91b378c1f5448d04c81861dfb4eb79d3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=9Chappyguoxy=E2=80=9D?= <“happy_guoxy@163.com”> Date: Mon, 13 May 2024 10:31:33 +0800 Subject: [PATCH 2/7] add pk cases --- tests/parallel_test/cases.task | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tests/parallel_test/cases.task b/tests/parallel_test/cases.task index 3f8e3abac7..e3e1291c47 100644 --- a/tests/parallel_test/cases.task +++ b/tests/parallel_test/cases.task @@ -509,6 +509,11 @@ ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/primary_ts_base_4.py -Q 2 ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/primary_ts_base_4.py -Q 3 ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/primary_ts_base_4.py -Q 4 +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/primary_ts_base_5.py +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/primary_ts_base_5.py -R +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/primary_ts_base_5.py -Q 2 +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/primary_ts_base_5.py -Q 3 +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/primary_ts_base_5.py -Q 4 ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/leastsquares.py ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/leastsquares.py -R ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/length.py From 3930cef9ac1c63c279ed1ba068afecf10cbc60f6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=9Chappyguoxy=E2=80=9D?= <“happy_guoxy@163.com”> Date: Mon, 13 May 2024 10:32:01 +0800 Subject: [PATCH 3/7] add pk cases --- .../system-test/2-query/primary_ts_base_5.py | 52 +++++++++++++++++++ 1 file changed, 52 insertions(+) create mode 100644 tests/system-test/2-query/primary_ts_base_5.py diff --git a/tests/system-test/2-query/primary_ts_base_5.py b/tests/system-test/2-query/primary_ts_base_5.py new file mode 100644 index 0000000000..9246385157 --- /dev/null +++ b/tests/system-test/2-query/primary_ts_base_5.py @@ -0,0 +1,52 @@ +################################################################### +# Copyright (c) 2016 by TAOS Technologies, Inc. +# All rights reserved. +# +# This file is proprietary and confidential to TAOS Technologies. +# No part of this file may be reproduced, stored, transmitted, +# disclosed or used in any form or by any means other than as +# expressly provided by the written permission from Jianhui Tao +# +################################################################### + +# -*- coding: utf-8 -*- +from util.cases import tdCases +from .primary_ts_base import * +from faker import Faker +import random + +class TDTestCase(TDTestCase): + + def run(self): + startTime = time.time() + self.dropandcreateDB_primary_key(self.database, 1 , 1 ,'yes','yes','no') + + # self.fun_pk_interp(self.database,'interp','') + # self.multiple_agg_groupby(self.database,1) + # self.fun_pk_diff(self.database,'diff','') + # self.fun_pk_twa(self.database,'derivative',',1s,0') + # self.fun_pk_twa(self.database,'derivative',',1s,1') + # self.fun_pk_unique(self.database,'unique','') + # self.fun_pk_last_init(self.database,'last','') + # self.fun_pk_last(self.database,'last','') + # self.fun_pk_last(self.database,'last_row','') + # self.fun_pk_first(self.database,'first','') + + # self.query_pk_fun(self.database,'') + + # self.touying_pk_1(self.database,1) + # self.touying_pk_where(self.database,'') + self.touying_pk_where(self.database,'tags') + # self.touying_pk_where(self.database,'distinct') + self.count_pk(self.database,1) + + endTime = time.time() + print("total time %ds" % (endTime - startTime)) + + def stop(self): + tdSql.close() + tdLog.success("%s successfully executed" % __file__) + + +tdCases.addWindows(__file__, TDTestCase()) +tdCases.addLinux(__file__, TDTestCase()) From 8fcf35783ac7989482baf47763d8bc52ba31d503 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=9Chappyguoxy=E2=80=9D?= <“happy_guoxy@163.com”> Date: Mon, 13 May 2024 10:32:05 +0800 Subject: [PATCH 4/7] add pk cases --- tests/system-test/2-query/primary_ts_base_4.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/system-test/2-query/primary_ts_base_4.py b/tests/system-test/2-query/primary_ts_base_4.py index 85e825df96..7e446ff442 100644 --- a/tests/system-test/2-query/primary_ts_base_4.py +++ b/tests/system-test/2-query/primary_ts_base_4.py @@ -36,9 +36,9 @@ class TDTestCase(TDTestCase): # self.touying_pk_1(self.database,1) # self.touying_pk_where(self.database,'') - self.touying_pk_where(self.database,'tags') + # self.touying_pk_where(self.database,'tags') self.touying_pk_where(self.database,'distinct') - self.count_pk(self.database,1) + # self.count_pk(self.database,1) endTime = time.time() print("total time %ds" % (endTime - startTime)) From ddb694a57edd6784e9903329bdbf1ef81a0f2154 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=9Chappyguoxy=E2=80=9D?= <“happy_guoxy@163.com”> Date: Mon, 13 May 2024 11:51:12 +0800 Subject: [PATCH 5/7] add pk cases --- tests/system-test/2-query/primary_ts_base_1.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/system-test/2-query/primary_ts_base_1.py b/tests/system-test/2-query/primary_ts_base_1.py index 05e42155cf..739afcb1ab 100644 --- a/tests/system-test/2-query/primary_ts_base_1.py +++ b/tests/system-test/2-query/primary_ts_base_1.py @@ -27,8 +27,8 @@ class TDTestCase(TDTestCase): self.fun_pk_twa(self.database,'derivative',',1s,0') self.fun_pk_twa(self.database,'derivative',',1s,1') self.fun_pk_unique(self.database,'unique','') - # self.fun_pk_last_init(self.database,'last','') - # self.fun_pk_last(self.database,'last','') + self.fun_pk_last_init(self.database,'last','') + self.fun_pk_last(self.database,'last','') # self.fun_pk_last(self.database,'last_row','') # self.fun_pk_first(self.database,'first','') From 82b60a0bbf433eb299aabb122aff0825d2fedceb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=9Chappyguoxy=E2=80=9D?= <“happy_guoxy@163.com”> Date: Mon, 13 May 2024 11:51:16 +0800 Subject: [PATCH 6/7] add pk cases --- tests/system-test/2-query/primary_ts_base_2.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/system-test/2-query/primary_ts_base_2.py b/tests/system-test/2-query/primary_ts_base_2.py index e12166bf1f..7aed595c60 100644 --- a/tests/system-test/2-query/primary_ts_base_2.py +++ b/tests/system-test/2-query/primary_ts_base_2.py @@ -27,14 +27,14 @@ class TDTestCase(TDTestCase): # self.fun_pk_twa(self.database,'derivative',',1s,0') # self.fun_pk_twa(self.database,'derivative',',1s,1') # self.fun_pk_unique(self.database,'unique','') - self.fun_pk_last_init(self.database,'last','') - self.fun_pk_last(self.database,'last','') + # self.fun_pk_last_init(self.database,'last','') + # self.fun_pk_last(self.database,'last','') self.fun_pk_last(self.database,'last_row','') self.fun_pk_first(self.database,'first','') self.query_pk_fun(self.database,'') - # self.touying_pk_1(self.database,1) + self.touying_pk_1(self.database,1) # self.touying_pk_where(self.database,'') # self.touying_pk_where(self.database,'tags') # self.touying_pk_where(self.database,'distinct') From 7d4ebd88e763e998e72cb429b39a2de885e6fa4d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=9Chappyguoxy=E2=80=9D?= <“happy_guoxy@163.com”> Date: Mon, 13 May 2024 11:51:19 +0800 Subject: [PATCH 7/7] add pk cases --- tests/system-test/2-query/primary_ts_base_3.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/system-test/2-query/primary_ts_base_3.py b/tests/system-test/2-query/primary_ts_base_3.py index a20d24378e..eb94deb719 100644 --- a/tests/system-test/2-query/primary_ts_base_3.py +++ b/tests/system-test/2-query/primary_ts_base_3.py @@ -34,7 +34,7 @@ class TDTestCase(TDTestCase): # self.query_pk_fun(self.database,'') - self.touying_pk_1(self.database,1) + # self.touying_pk_1(self.database,1) self.touying_pk_where(self.database,'') # self.touying_pk_where(self.database,'tags') # self.touying_pk_where(self.database,'distinct')