Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add pk cases #25720

Merged
merged 7 commits into from
May 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 10 additions & 5 deletions tests/parallel_test/cases.task
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
4 changes: 2 additions & 2 deletions tests/system-test/2-query/primary_ts_base_1.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ def run(self):
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','')

Expand Down
6 changes: 3 additions & 3 deletions tests/system-test/2-query/primary_ts_base_2.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,14 @@ def run(self):
# 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')
Expand Down
2 changes: 1 addition & 1 deletion tests/system-test/2-query/primary_ts_base_3.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ def run(self):

# 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')
Expand Down
4 changes: 2 additions & 2 deletions tests/system-test/2-query/primary_ts_base_4.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,9 @@ def run(self):

# 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))
Expand Down
52 changes: 52 additions & 0 deletions tests/system-test/2-query/primary_ts_base_5.py
Original file line number Diff line number Diff line change
@@ -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())