Skip to content

Commit 9047bad

Browse files
feldera-botmihaibudiu
authored andcommitted
[ci] apply automatic fixes
Signed-off-by: feldera-bot <feldera-bot@feldera.com>
1 parent 44c99a6 commit 9047bad

51 files changed

Lines changed: 1063 additions & 229 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

python/tests/runtime/test_doubles.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
from feldera.runtime_config import RuntimeConfig
77
from feldera.testutils import FELDERA_TEST_NUM_WORKERS, FELDERA_TEST_NUM_HOSTS
88

9+
910
# Test serialization of doubles
1011
class TestDouble(unittest.TestCase):
1112
def test_local(self):
@@ -49,10 +50,11 @@ def test_local(self):
4950
data = list(pipeline.query_arrow_dicts("SELECT * FROM v"))
5051
print(data)
5152
assert len(data) == 1
52-
assert data[0]["one"] == float('inf')
53+
assert data[0]["one"] == float("inf")
5354
assert math.isnan(data[0]["zero"])
5455
pipeline.stop(force=True)
5556
pipeline.delete(True)
5657

58+
5759
if __name__ == "__main__":
5860
unittest.main()

python/tests/runtime_aggtest/aggregate_tests2/test_date_arg_max.py

Lines changed: 25 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,13 @@
11
from tests.runtime_aggtest.aggtst_base import TstView
22
import datetime
33

4+
45
class aggtst_date_arg_max_value(TstView):
56
def __init__(self):
67
# checked manually
7-
self.data = [{"c1": datetime.date(2014, 11, 5), "c2": datetime.date(2014, 11, 5)}]
8+
self.data = [
9+
{"c1": datetime.date(2014, 11, 5), "c2": datetime.date(2014, 11, 5)}
10+
]
811
self.sql = """CREATE MATERIALIZED VIEW date_arg_max AS SELECT
912
ARG_MAX(c1, c2) AS c1, ARG_MAX(c2, c1) AS c2
1013
FROM date_tbl"""
@@ -15,7 +18,11 @@ def __init__(self):
1518
# checked manually
1619
self.data = [
1720
{"id": 0, "c1": datetime.date(2014, 11, 5), "c2": None},
18-
{"id": 1, "c1": datetime.date(2020, 6, 21), "c2": datetime.date(2014, 11, 5)},
21+
{
22+
"id": 1,
23+
"c1": datetime.date(2020, 6, 21),
24+
"c2": datetime.date(2014, 11, 5),
25+
},
1926
]
2027
self.sql = """CREATE MATERIALIZED VIEW date_arg_max_gby AS SELECT
2128
id, ARG_MAX(c1, c2) AS c1, ARG_MAX(c2, c1) AS c2
@@ -26,7 +33,9 @@ def __init__(self):
2633
class aggtst_date_arg_max_distinct(TstView):
2734
def __init__(self):
2835
# checked manually
29-
self.data = [{"c1": datetime.date(2014, 11, 5), "c2": datetime.date(2014, 11, 5)}]
36+
self.data = [
37+
{"c1": datetime.date(2014, 11, 5), "c2": datetime.date(2014, 11, 5)}
38+
]
3039
self.sql = """CREATE MATERIALIZED VIEW date_arg_max_distinct AS SELECT
3140
ARG_MAX(DISTINCT c1, c2) AS c1, ARG_MAX(DISTINCT c2, c1) AS c2
3241
FROM date_tbl"""
@@ -37,7 +46,11 @@ def __init__(self):
3746
# checked manually
3847
self.data = [
3948
{"id": 0, "c1": datetime.date(2014, 11, 5), "c2": None},
40-
{"id": 1, "c1": datetime.date(2020, 6, 21), "c2": datetime.date(2014, 11, 5)},
49+
{
50+
"id": 1,
51+
"c1": datetime.date(2020, 6, 21),
52+
"c2": datetime.date(2014, 11, 5),
53+
},
4154
]
4255
self.sql = """CREATE MATERIALIZED VIEW date_arg_max_distinct_gby AS SELECT
4356
id, ARG_MAX(DISTINCT c1, c2) AS c1, ARG_MAX(DISTINCT c2, c1) AS c2
@@ -48,7 +61,9 @@ def __init__(self):
4861
class aggtst_date_arg_max_where(TstView):
4962
def __init__(self):
5063
# checked manually
51-
self.data = [{"c1": datetime.date(2020, 6, 21), "c2": datetime.date(2014, 11, 5)}]
64+
self.data = [
65+
{"c1": datetime.date(2020, 6, 21), "c2": datetime.date(2014, 11, 5)}
66+
]
5267
self.sql = """CREATE MATERIALIZED VIEW date_arg_max_where AS SELECT
5368
ARG_MAX(c1, c2) FILTER(WHERE c1 > '2014-11-05') AS c1, ARG_MAX(c2, c1) FILTER(WHERE c1 > '2014-11-05') AS c2
5469
FROM date_tbl"""
@@ -59,7 +74,11 @@ def __init__(self):
5974
# checked manually
6075
self.data = [
6176
{"id": 0, "c1": datetime.date(2020, 6, 21), "c2": None},
62-
{"id": 1, "c1": datetime.date(2020, 6, 21), "c2": datetime.date(2014, 11, 5)},
77+
{
78+
"id": 1,
79+
"c1": datetime.date(2020, 6, 21),
80+
"c2": datetime.date(2014, 11, 5),
81+
},
6382
]
6483
self.sql = """CREATE MATERIALIZED VIEW date_arg_max_where_gby AS SELECT
6584
id, ARG_MAX(c1, c2) FILTER(WHERE c1 > '2014-11-05') AS c1, ARG_MAX(c2, c1) FILTER(WHERE c1 > '2014-11-05') AS c2

python/tests/runtime_aggtest/aggregate_tests2/test_date_arg_min.py

Lines changed: 32 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,13 @@
11
from tests.runtime_aggtest.aggtst_base import TstView
22
import datetime
33

4+
45
class aggtst_date_arg_min_value(TstView):
56
def __init__(self):
67
# checked manually
7-
self.data = [{"c1": datetime.date(2024, 12, 5), "c2": datetime.date(2015, 9, 7)}]
8+
self.data = [
9+
{"c1": datetime.date(2024, 12, 5), "c2": datetime.date(2015, 9, 7)}
10+
]
811
self.sql = """CREATE MATERIALIZED VIEW date_arg_min AS SELECT
912
ARG_MIN(c1, c2) AS c1, ARG_MIN(c2, c1) AS c2
1013
FROM date_tbl"""
@@ -14,8 +17,16 @@ class aggtst_date_arg_min_gby(TstView):
1417
def __init__(self):
1518
# checked manually
1619
self.data = [
17-
{"id": 0, "c1": datetime.date(2014, 11, 5), "c2": datetime.date(2024, 12, 5)},
18-
{"id": 1, "c1": datetime.date(2024, 12, 5), "c2": datetime.date(2015, 9, 7)},
20+
{
21+
"id": 0,
22+
"c1": datetime.date(2014, 11, 5),
23+
"c2": datetime.date(2024, 12, 5),
24+
},
25+
{
26+
"id": 1,
27+
"c1": datetime.date(2024, 12, 5),
28+
"c2": datetime.date(2015, 9, 7),
29+
},
1930
]
2031
self.sql = """CREATE MATERIALIZED VIEW date_arg_min_gby AS SELECT
2132
id, ARG_MIN(c1, c2) AS c1, ARG_MIN(c2, c1) AS c2
@@ -26,7 +37,9 @@ def __init__(self):
2637
class aggtst_date_arg_min_distinct(TstView):
2738
def __init__(self):
2839
# checked manually
29-
self.data = [{"c1": datetime.date(2024, 12, 5), "c2": datetime.date(2015, 9, 7)}]
40+
self.data = [
41+
{"c1": datetime.date(2024, 12, 5), "c2": datetime.date(2015, 9, 7)}
42+
]
3043
self.sql = """CREATE MATERIALIZED VIEW date_arg_min_distinct AS SELECT
3144
ARG_MIN(DISTINCT c1, c2) AS c1, ARG_MIN(DISTINCT c2, c1) AS c2
3245
FROM date_tbl"""
@@ -36,8 +49,16 @@ class aggtst_date_arg_min_distinct_gby(TstView):
3649
def __init__(self):
3750
# checked manually
3851
self.data = [
39-
{"id": 0, "c1": datetime.date(2014, 11, 5), "c2": datetime.date(2024, 12, 5)},
40-
{"id": 1, "c1": datetime.date(2024, 12, 5), "c2": datetime.date(2015, 9, 7)},
52+
{
53+
"id": 0,
54+
"c1": datetime.date(2014, 11, 5),
55+
"c2": datetime.date(2024, 12, 5),
56+
},
57+
{
58+
"id": 1,
59+
"c1": datetime.date(2024, 12, 5),
60+
"c2": datetime.date(2015, 9, 7),
61+
},
4162
]
4263
self.sql = """CREATE MATERIALIZED VIEW date_arg_min_distinct_gby AS SELECT
4364
id, ARG_MIN(DISTINCT c1, c2) AS c1, ARG_MIN(DISTINCT c2, c1) AS c2
@@ -59,7 +80,11 @@ def __init__(self):
5980
# checked manually
6081
self.data = [
6182
{"id": 0, "c1": datetime.date(2020, 6, 21), "c2": None},
62-
{"id": 1, "c1": datetime.date(2024, 12, 5), "c2": datetime.date(2023, 2, 26)},
83+
{
84+
"id": 1,
85+
"c1": datetime.date(2024, 12, 5),
86+
"c2": datetime.date(2023, 2, 26),
87+
},
6388
]
6489
self.sql = """CREATE MATERIALIZED VIEW date_arg_min_where_gby AS SELECT
6590
id, ARG_MIN(c1, c2) FILTER(WHERE c1 > '2014-11-05') AS c1, ARG_MIN(c2, c1) FILTER(WHERE c1 > '2014-11-05') AS c2

python/tests/runtime_aggtest/aggregate_tests2/test_date_arr_agg.py

Lines changed: 66 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
from tests.runtime_aggtest.aggtst_base import TstView
22
import datetime
33

4+
45
class aggtst_date_array_agg_value(TstView):
56
def __init__(self):
67
# Validated on Postgres
@@ -13,7 +14,13 @@ def __init__(self):
1314
datetime.date(2020, 6, 21),
1415
datetime.date(2024, 12, 5),
1516
],
16-
"c2": [datetime.date(2015, 9, 7), datetime.date(2024, 12, 5), None, datetime.date(2023, 2, 26), datetime.date(2014, 11, 5)],
17+
"c2": [
18+
datetime.date(2015, 9, 7),
19+
datetime.date(2024, 12, 5),
20+
None,
21+
datetime.date(2023, 2, 26),
22+
datetime.date(2014, 11, 5),
23+
],
1724
}
1825
]
1926
self.sql = """CREATE MATERIALIZED VIEW date_array_agg AS SELECT
@@ -25,11 +32,23 @@ class aggtst_date_array_agg_gby(TstView):
2532
def __init__(self):
2633
# Validated on Postgres
2734
self.data = [
28-
{"id": 0, "c1": [datetime.date(2014, 11, 5), datetime.date(2020, 6, 21)], "c2": [datetime.date(2024, 12, 5), None]},
35+
{
36+
"id": 0,
37+
"c1": [datetime.date(2014, 11, 5), datetime.date(2020, 6, 21)],
38+
"c2": [datetime.date(2024, 12, 5), None],
39+
},
2940
{
3041
"id": 1,
31-
"c1": [datetime.date(1969, 3, 17), datetime.date(2020, 6, 21), datetime.date(2024, 12, 5)],
32-
"c2": [datetime.date(2015, 9, 7), datetime.date(2023, 2, 26), datetime.date(2014, 11, 5)],
42+
"c1": [
43+
datetime.date(1969, 3, 17),
44+
datetime.date(2020, 6, 21),
45+
datetime.date(2024, 12, 5),
46+
],
47+
"c2": [
48+
datetime.date(2015, 9, 7),
49+
datetime.date(2023, 2, 26),
50+
datetime.date(2014, 11, 5),
51+
],
3352
},
3453
]
3554
self.sql = """CREATE MATERIALIZED VIEW date_array_agg_gby AS SELECT
@@ -43,8 +62,19 @@ def __init__(self):
4362
# Validated on Postgres
4463
self.data = [
4564
{
46-
"c1": [datetime.date(1969, 3, 17), datetime.date(2014, 11, 5), datetime.date(2020, 6, 21), datetime.date(2024, 12, 5)],
47-
"c2": [None, datetime.date(2014, 11, 5), datetime.date(2015, 9, 7), datetime.date(2023, 2, 26), datetime.date(2024, 12, 5)],
65+
"c1": [
66+
datetime.date(1969, 3, 17),
67+
datetime.date(2014, 11, 5),
68+
datetime.date(2020, 6, 21),
69+
datetime.date(2024, 12, 5),
70+
],
71+
"c2": [
72+
None,
73+
datetime.date(2014, 11, 5),
74+
datetime.date(2015, 9, 7),
75+
datetime.date(2023, 2, 26),
76+
datetime.date(2024, 12, 5),
77+
],
4878
}
4979
]
5080
self.sql = """CREATE MATERIALIZED VIEW date_array_agg_distinct AS SELECT
@@ -56,11 +86,23 @@ class aggtst_date_array_agg_distinct_gby(TstView):
5686
def __init__(self):
5787
# Validated on Postgres
5888
self.data = [
59-
{"id": 0, "c1": [datetime.date(2014, 11, 5), datetime.date(2020, 6, 21)], "c2": [None, datetime.date(2024, 12, 5)]},
89+
{
90+
"id": 0,
91+
"c1": [datetime.date(2014, 11, 5), datetime.date(2020, 6, 21)],
92+
"c2": [None, datetime.date(2024, 12, 5)],
93+
},
6094
{
6195
"id": 1,
62-
"c1": [datetime.date(1969, 3, 17), datetime.date(2020, 6, 21), datetime.date(2024, 12, 5)],
63-
"c2": [datetime.date(2014, 11, 5), datetime.date(2015, 9, 7), datetime.date(2023, 2, 26)],
96+
"c1": [
97+
datetime.date(1969, 3, 17),
98+
datetime.date(2020, 6, 21),
99+
datetime.date(2024, 12, 5),
100+
],
101+
"c2": [
102+
datetime.date(2014, 11, 5),
103+
datetime.date(2015, 9, 7),
104+
datetime.date(2023, 2, 26),
105+
],
64106
},
65107
]
66108
self.sql = """CREATE MATERIALIZED VIEW date_array_agg_distinct_gby AS SELECT
@@ -74,8 +116,16 @@ def __init__(self):
74116
# Validated on Postgres
75117
self.data = [
76118
{
77-
"f_c1": [datetime.date(2020, 6, 21), datetime.date(2020, 6, 21), datetime.date(2024, 12, 5)],
78-
"f_c2": [datetime.date(2015, 9, 7), datetime.date(2024, 12, 5), datetime.date(2023, 2, 26)],
119+
"f_c1": [
120+
datetime.date(2020, 6, 21),
121+
datetime.date(2020, 6, 21),
122+
datetime.date(2024, 12, 5),
123+
],
124+
"f_c2": [
125+
datetime.date(2015, 9, 7),
126+
datetime.date(2024, 12, 5),
127+
datetime.date(2023, 2, 26),
128+
],
79129
}
80130
]
81131
self.sql = """CREATE MATERIALIZED VIEW date_array_where AS SELECT
@@ -87,7 +137,11 @@ class aggtst_date_array_agg_where_gby(TstView):
87137
def __init__(self):
88138
# Validated on Postgres
89139
self.data = [
90-
{"id": 0, "f_c1": [datetime.date(2020, 6, 21)], "f_c2": [datetime.date(2024, 12, 5)]},
140+
{
141+
"id": 0,
142+
"f_c1": [datetime.date(2020, 6, 21)],
143+
"f_c2": [datetime.date(2024, 12, 5)],
144+
},
91145
{
92146
"id": 1,
93147
"f_c1": [datetime.date(2020, 6, 21), datetime.date(2024, 12, 5)],

python/tests/runtime_aggtest/aggregate_tests2/test_date_max.py

Lines changed: 35 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,13 @@
11
from tests.runtime_aggtest.aggtst_base import TstView
22
import datetime
33

4+
45
class aggtst_date_max_value(TstView):
56
def __init__(self):
67
# Validated on Postgres
7-
self.data = [{"c1": datetime.date(2024, 12, 5), "c2": datetime.date(2024, 12, 5)}]
8+
self.data = [
9+
{"c1": datetime.date(2024, 12, 5), "c2": datetime.date(2024, 12, 5)}
10+
]
811
self.sql = """CREATE MATERIALIZED VIEW date_max AS SELECT
912
MAX(c1) AS c1, MAX(c2) AS c2
1013
FROM date_tbl"""
@@ -14,8 +17,16 @@ class aggtst_date_max_gby(TstView):
1417
def __init__(self):
1518
# Validated on Postgres
1619
self.data = [
17-
{"id": 0, "c1": datetime.date(2020, 6, 21), "c2": datetime.date(2024, 12, 5)},
18-
{"id": 1, "c1": datetime.date(2024, 12, 5), "c2": datetime.date(2023, 2, 26)},
20+
{
21+
"id": 0,
22+
"c1": datetime.date(2020, 6, 21),
23+
"c2": datetime.date(2024, 12, 5),
24+
},
25+
{
26+
"id": 1,
27+
"c1": datetime.date(2024, 12, 5),
28+
"c2": datetime.date(2023, 2, 26),
29+
},
1930
]
2031
self.sql = """CREATE MATERIALIZED VIEW date_max_gby AS SELECT
2132
id, MAX(c1) AS c1, MAX(c2) AS c2
@@ -26,7 +37,9 @@ def __init__(self):
2637
class aggtst_date_max_distinct(TstView):
2738
def __init__(self):
2839
# Validated on Postgres
29-
self.data = [{"c1": datetime.date(2024, 12, 5), "c2": datetime.date(2024, 12, 5)}]
40+
self.data = [
41+
{"c1": datetime.date(2024, 12, 5), "c2": datetime.date(2024, 12, 5)}
42+
]
3043
self.sql = """CREATE MATERIALIZED VIEW date_max_distinct AS SELECT
3144
MAX(DISTINCT c1) AS c1, MAX(DISTINCT c2) AS c2
3245
FROM date_tbl"""
@@ -36,8 +49,16 @@ class aggtst_date_max_distinct_gby(TstView):
3649
def __init__(self):
3750
# Validated on Postgres
3851
self.data = [
39-
{"id": 0, "c1": datetime.date(2020, 6, 21), "c2": datetime.date(2024, 12, 5)},
40-
{"id": 1, "c1": datetime.date(2024, 12, 5), "c2": datetime.date(2023, 2, 26)},
52+
{
53+
"id": 0,
54+
"c1": datetime.date(2020, 6, 21),
55+
"c2": datetime.date(2024, 12, 5),
56+
},
57+
{
58+
"id": 1,
59+
"c1": datetime.date(2024, 12, 5),
60+
"c2": datetime.date(2023, 2, 26),
61+
},
4162
]
4263
self.sql = """CREATE MATERIALIZED VIEW date_max_distinct_gby AS SELECT
4364
id, MAX(DISTINCT c1) AS c1, MAX(DISTINCT c2) AS c2
@@ -48,7 +69,9 @@ def __init__(self):
4869
class aggtst_date_max_where(TstView):
4970
def __init__(self):
5071
# Validated on Postgres
51-
self.data = [{"f_c1": datetime.date(2024, 12, 5), "f_c2": datetime.date(2023, 2, 26)}]
72+
self.data = [
73+
{"f_c1": datetime.date(2024, 12, 5), "f_c2": datetime.date(2023, 2, 26)}
74+
]
5275
self.sql = """CREATE MATERIALIZED VIEW date_max_where AS SELECT
5376
MAX(c1) FILTER (WHERE c1 > '2014-11-05') AS f_c1, MAX(c2) FILTER (WHERE c1 > '2014-11-05') AS f_c2
5477
FROM date_tbl"""
@@ -59,7 +82,11 @@ def __init__(self):
5982
# Validated on Postgres
6083
self.data = [
6184
{"id": 0, "f_c1": datetime.date(2020, 6, 21), "f_c2": None},
62-
{"id": 1, "f_c1": datetime.date(2024, 12, 5), "f_c2": datetime.date(2023, 2, 26)},
85+
{
86+
"id": 1,
87+
"f_c1": datetime.date(2024, 12, 5),
88+
"f_c2": datetime.date(2023, 2, 26),
89+
},
6390
]
6491
self.sql = """CREATE MATERIALIZED VIEW date_max_where_gby AS SELECT
6592
id, MAX(c1) FILTER (WHERE c1 > '2014-11-05') AS f_c1, MAX(c2) FILTER (WHERE c1 > '2014-11-05') AS f_c2

0 commit comments

Comments
 (0)