Skip to content

Commit f683ce4

Browse files
committed
py: add suggested changes
Signed-off-by: rivudhk <rivudhkr@gmail.com>
1 parent 9d36560 commit f683ce4

5 files changed

Lines changed: 346 additions & 189 deletions

File tree

python/tests/orderby_tests/main.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,11 @@
33

44
from tests.aggregate_tests.aggtst_base import * # noqa: F403
55
from tests.orderby_tests.sqlite_runner import discover_sqlite_tests # noqa: F403
6+
from tests.orderby_tests.orderby_tbl import * # noqa: F403
67
from tests.orderby_tests.test_check import * # noqa: F403
7-
from tests.orderby_tests.orderby import * # noqa: F403
8+
from tests.orderby_tests.orderby_int import * # noqa: F403
9+
from tests.orderby_tests.orderby_varchar import * # noqa: F403
10+
from tests.orderby_tests.orderby_int_varchar import * # noqa: F403
811

912

1013
def main():

python/tests/orderby_tests/orderby.py

Lines changed: 0 additions & 188 deletions
This file was deleted.
Lines changed: 111 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,111 @@
1+
from tests.aggregate_tests.aggtst_base import TstView
2+
3+
4+
class orderby_asc_int(TstView):
5+
def __init__(self):
6+
# Validated on SQLite
7+
self.data = []
8+
self.sql = """CREATE MATERIALIZED VIEW orderby_asc_int AS
9+
SELECT c1
10+
FROM orderby_tbl_int_varchar
11+
ORDER BY c1 ASC"""
12+
13+
14+
class orderby_asc_limit3_int(TstView):
15+
def __init__(self):
16+
# Validated on SQLite
17+
self.data = []
18+
self.sql = """CREATE MATERIALIZED VIEW orderby_asc_limit3_int AS
19+
SELECT c1
20+
FROM orderby_tbl_int_varchar
21+
ORDER BY c1 ASC
22+
LIMIT 3"""
23+
24+
25+
class orderby_asc_nulls_last_int(TstView):
26+
def __init__(self):
27+
# Validated on SQLite
28+
self.data = []
29+
self.sql = """CREATE MATERIALIZED VIEW orderby_asc_nulls_last_int AS
30+
SELECT c1
31+
FROM orderby_tbl_int_varchar
32+
ORDER BY c1 ASC
33+
NULLS LAST
34+
LIMIT 3"""
35+
36+
37+
class orderby_asc_no_nulls_int(TstView):
38+
def __init__(self):
39+
# Validated on SQLite
40+
self.data = []
41+
self.sql = """CREATE MATERIALIZED VIEW orderby_asc_no_nulls_int AS
42+
SELECT c1
43+
FROM orderby_tbl_int_varchar
44+
WHERE c1 IS NOT NULL
45+
ORDER BY c1 ASC"""
46+
47+
48+
class orderby_desc_int(TstView):
49+
def __init__(self):
50+
# Validated on SQLite
51+
self.data = []
52+
self.sql = """CREATE MATERIALIZED VIEW orderby_desc_int AS
53+
SELECT c1
54+
FROM orderby_tbl_int_varchar
55+
ORDER BY c1 DESC"""
56+
57+
58+
class orderby_desc_limit3_int(TstView):
59+
def __init__(self):
60+
# Validated on SQLite
61+
self.data = []
62+
self.sql = """CREATE MATERIALIZED VIEW orderby_desc_limit3_int AS
63+
SELECT c1
64+
FROM orderby_tbl_int_varchar
65+
ORDER BY c1 DESC
66+
LIMIT 3"""
67+
68+
69+
class orderby_desc_nulls_first_int(TstView):
70+
def __init__(self):
71+
# Validated on SQLite
72+
self.data = []
73+
self.sql = """CREATE MATERIALIZED VIEW orderby_desc_nulls_first_int AS
74+
SELECT c1
75+
FROM orderby_tbl_int_varchar
76+
ORDER BY c1 DESC
77+
NULLS FIRST
78+
LIMIT 3"""
79+
80+
81+
class orderby_nulls_first_int(TstView):
82+
def __init__(self):
83+
# Validated on SQLite
84+
self.data = []
85+
self.sql = """CREATE MATERIALIZED VIEW orderby_nulls_first_int AS
86+
SELECT c1
87+
FROM orderby_tbl_int_varchar
88+
ORDER BY c1 NULLS FIRST
89+
LIMIT 3"""
90+
91+
92+
class orderby_desc_no_nulls_int(TstView):
93+
def __init__(self):
94+
# Validated on SQLite
95+
self.data = []
96+
self.sql = """CREATE MATERIALIZED VIEW orderby_desc_no_nulls_int AS
97+
SELECT c1
98+
FROM orderby_tbl_int_varchar
99+
WHERE c1 IS NOT NULL
100+
ORDER BY c1 DESC"""
101+
102+
103+
class orderby_nulls_last_int(TstView):
104+
def __init__(self):
105+
# Validated on SQLite
106+
self.data = []
107+
self.sql = """CREATE MATERIALIZED VIEW orderby_nulls_last_int AS
108+
SELECT c1
109+
FROM orderby_tbl_int_varchar
110+
ORDER BY c1 NULLS LAST
111+
LIMIT 9"""

0 commit comments

Comments
 (0)