tinybird-toolset 2.6.3__tar.gz → 2.6.5__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {tinybird_toolset-2.6.3/src/tinybird_toolset.egg-info → tinybird_toolset-2.6.5}/PKG-INFO +1 -1
- {tinybird_toolset-2.6.3 → tinybird_toolset-2.6.5}/setup.py +1 -1
- {tinybird_toolset-2.6.3 → tinybird_toolset-2.6.5/src/tinybird_toolset.egg-info}/PKG-INFO +1 -1
- tinybird_toolset-2.6.5/tests/test_validate_partition_key.py +222 -0
- tinybird_toolset-2.6.3/tests/test_validate_partition_key.py +0 -150
- {tinybird_toolset-2.6.3 → tinybird_toolset-2.6.5}/LICENSE +0 -0
- {tinybird_toolset-2.6.3 → tinybird_toolset-2.6.5}/MANIFEST.in +0 -0
- {tinybird_toolset-2.6.3 → tinybird_toolset-2.6.5}/README.md +0 -0
- {tinybird_toolset-2.6.3 → tinybird_toolset-2.6.5}/conf.py +0 -0
- {tinybird_toolset-2.6.3 → tinybird_toolset-2.6.5}/setup.cfg +0 -0
- {tinybird_toolset-2.6.3 → tinybird_toolset-2.6.5}/src/chtoolset/__init__.py +0 -0
- {tinybird_toolset-2.6.3 → tinybird_toolset-2.6.5}/src/chtoolset/query.py +0 -0
- {tinybird_toolset-2.6.3 → tinybird_toolset-2.6.5}/src/tinybird_toolset.egg-info/SOURCES.txt +0 -0
- {tinybird_toolset-2.6.3 → tinybird_toolset-2.6.5}/src/tinybird_toolset.egg-info/dependency_links.txt +0 -0
- {tinybird_toolset-2.6.3 → tinybird_toolset-2.6.5}/src/tinybird_toolset.egg-info/requires.txt +0 -0
- {tinybird_toolset-2.6.3 → tinybird_toolset-2.6.5}/src/tinybird_toolset.egg-info/top_level.txt +0 -0
- {tinybird_toolset-2.6.3 → tinybird_toolset-2.6.5}/tests/test_check_compatible_types.py +0 -0
- {tinybird_toolset-2.6.3 → tinybird_toolset-2.6.5}/tests/test_check_ttl_partition_compatibility.py +0 -0
- {tinybird_toolset-2.6.3 → tinybird_toolset-2.6.5}/tests/test_check_write_query.py +0 -0
- {tinybird_toolset-2.6.3 → tinybird_toolset-2.6.5}/tests/test_chquery.py +0 -0
- {tinybird_toolset-2.6.3 → tinybird_toolset-2.6.5}/tests/test_convert_to_row_binary.py +0 -0
- {tinybird_toolset-2.6.3 → tinybird_toolset-2.6.5}/tests/test_explain_ast.py +0 -0
- {tinybird_toolset-2.6.3 → tinybird_toolset-2.6.5}/tests/test_get_columns_from_create_query.py +0 -0
- {tinybird_toolset-2.6.3 → tinybird_toolset-2.6.5}/tests/test_get_left_table.py +0 -0
- {tinybird_toolset-2.6.3 → tinybird_toolset-2.6.5}/tests/test_internal_cache.py +0 -0
- {tinybird_toolset-2.6.3 → tinybird_toolset-2.6.5}/tests/test_normalize_query_keep_names.py +0 -0
- {tinybird_toolset-2.6.3 → tinybird_toolset-2.6.5}/tests/test_normalize_table_column.py +0 -0
- {tinybird_toolset-2.6.3 → tinybird_toolset-2.6.5}/tests/test_parse_create_materialized_view_target_table.py +0 -0
- {tinybird_toolset-2.6.3 → tinybird_toolset-2.6.5}/tests/test_replace_tables.py +0 -0
- {tinybird_toolset-2.6.3 → tinybird_toolset-2.6.5}/tests/test_replace_tables_backward_compat.py +0 -0
- {tinybird_toolset-2.6.3 → tinybird_toolset-2.6.5}/tests/test_rewrite_aggregation_states.py +0 -0
- {tinybird_toolset-2.6.3 → tinybird_toolset-2.6.5}/tests/test_tables.py +0 -0
- {tinybird_toolset-2.6.3 → tinybird_toolset-2.6.5}/tests/test_validate_ttl.py +0 -0
|
@@ -0,0 +1,222 @@
|
|
|
1
|
+
import unittest
|
|
2
|
+
from chtoolset import query as chquery
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
class TestValidatePartitionKey(unittest.TestCase):
|
|
6
|
+
def test_valid_empty_partition_key(self):
|
|
7
|
+
self.assertIsNone(
|
|
8
|
+
chquery.validate_partition_key(
|
|
9
|
+
columns=[{"name": "ts", "type": "DateTime"}],
|
|
10
|
+
partition_key="",
|
|
11
|
+
)
|
|
12
|
+
)
|
|
13
|
+
|
|
14
|
+
def test_valid_hourly_partition_key(self):
|
|
15
|
+
# Hour is the floor - allowed.
|
|
16
|
+
self.assertIsNone(
|
|
17
|
+
chquery.validate_partition_key(
|
|
18
|
+
columns=[{"name": "ts", "type": "DateTime"}],
|
|
19
|
+
partition_key="toStartOfHour(ts)",
|
|
20
|
+
)
|
|
21
|
+
)
|
|
22
|
+
|
|
23
|
+
def test_valid_daily_partition_key(self):
|
|
24
|
+
self.assertIsNone(
|
|
25
|
+
chquery.validate_partition_key(
|
|
26
|
+
columns=[{"name": "ts", "type": "DateTime"}],
|
|
27
|
+
partition_key="toDate(ts)",
|
|
28
|
+
)
|
|
29
|
+
)
|
|
30
|
+
|
|
31
|
+
def test_valid_monthly_partition_key(self):
|
|
32
|
+
self.assertIsNone(
|
|
33
|
+
chquery.validate_partition_key(
|
|
34
|
+
columns=[{"name": "ts", "type": "DateTime"}],
|
|
35
|
+
partition_key="toYYYYMM(ts)",
|
|
36
|
+
)
|
|
37
|
+
)
|
|
38
|
+
|
|
39
|
+
def test_invalid_minute_partition_key(self):
|
|
40
|
+
err = chquery.validate_partition_key(
|
|
41
|
+
columns=[{"name": "ts", "type": "DateTime"}],
|
|
42
|
+
partition_key="toStartOfMinute(ts)",
|
|
43
|
+
)
|
|
44
|
+
self.assertEqual(
|
|
45
|
+
err,
|
|
46
|
+
"Partition key granularity (Minute) on column 'ts' is finer than hourly. This tends to create a very "
|
|
47
|
+
"large number of parts, which makes merges and queries expensive regardless of the table's TTL. Use "
|
|
48
|
+
"an hourly or coarser partition key.",
|
|
49
|
+
)
|
|
50
|
+
|
|
51
|
+
def test_invalid_second_partition_key(self):
|
|
52
|
+
err = chquery.validate_partition_key(
|
|
53
|
+
columns=[{"name": "ts", "type": "DateTime"}],
|
|
54
|
+
partition_key="toStartOfSecond(ts)",
|
|
55
|
+
)
|
|
56
|
+
self.assertEqual(
|
|
57
|
+
err,
|
|
58
|
+
"Partition key granularity (Second) on column 'ts' is finer than hourly. This tends to create a very "
|
|
59
|
+
"large number of parts, which makes merges and queries expensive regardless of the table's TTL. Use "
|
|
60
|
+
"an hourly or coarser partition key.",
|
|
61
|
+
)
|
|
62
|
+
|
|
63
|
+
def test_invalid_five_minute_partition_key(self):
|
|
64
|
+
err = chquery.validate_partition_key(
|
|
65
|
+
columns=[{"name": "ts", "type": "DateTime"}],
|
|
66
|
+
partition_key="toStartOfFiveMinutes(ts)",
|
|
67
|
+
)
|
|
68
|
+
self.assertEqual(
|
|
69
|
+
err,
|
|
70
|
+
"Partition key granularity (Minute) on column 'ts' is finer than hourly. This tends to create a very "
|
|
71
|
+
"large number of parts, which makes merges and queries expensive regardless of the table's TTL. Use "
|
|
72
|
+
"an hourly or coarser partition key.",
|
|
73
|
+
)
|
|
74
|
+
|
|
75
|
+
def test_invalid_ten_minute_partition_key(self):
|
|
76
|
+
err = chquery.validate_partition_key(
|
|
77
|
+
columns=[{"name": "ts", "type": "DateTime"}],
|
|
78
|
+
partition_key="toStartOfTenMinutes(ts)",
|
|
79
|
+
)
|
|
80
|
+
self.assertEqual(
|
|
81
|
+
err,
|
|
82
|
+
"Partition key granularity (Minute) on column 'ts' is finer than hourly. This tends to create a very "
|
|
83
|
+
"large number of parts, which makes merges and queries expensive regardless of the table's TTL. Use "
|
|
84
|
+
"an hourly or coarser partition key.",
|
|
85
|
+
)
|
|
86
|
+
|
|
87
|
+
def test_invalid_fifteen_minute_partition_key(self):
|
|
88
|
+
err = chquery.validate_partition_key(
|
|
89
|
+
columns=[{"name": "ts", "type": "DateTime"}],
|
|
90
|
+
partition_key="toStartOfFifteenMinutes(ts)",
|
|
91
|
+
)
|
|
92
|
+
self.assertEqual(
|
|
93
|
+
err,
|
|
94
|
+
"Partition key granularity (Minute) on column 'ts' is finer than hourly. This tends to create a very "
|
|
95
|
+
"large number of parts, which makes merges and queries expensive regardless of the table's TTL. Use "
|
|
96
|
+
"an hourly or coarser partition key.",
|
|
97
|
+
)
|
|
98
|
+
|
|
99
|
+
def test_invalid_five_minute_singular_alias_partition_key(self):
|
|
100
|
+
# toStartOfFiveMinute (singular) is a registered alias for toStartOfFiveMinutes.
|
|
101
|
+
err = chquery.validate_partition_key(
|
|
102
|
+
columns=[{"name": "ts", "type": "DateTime"}],
|
|
103
|
+
partition_key="toStartOfFiveMinute(ts)",
|
|
104
|
+
)
|
|
105
|
+
self.assertEqual(
|
|
106
|
+
err,
|
|
107
|
+
"Partition key granularity (Minute) on column 'ts' is finer than hourly. This tends to create a very "
|
|
108
|
+
"large number of parts, which makes merges and queries expensive regardless of the table's TTL. Use "
|
|
109
|
+
"an hourly or coarser partition key.",
|
|
110
|
+
)
|
|
111
|
+
|
|
112
|
+
def test_invalid_millisecond_partition_key(self):
|
|
113
|
+
err = chquery.validate_partition_key(
|
|
114
|
+
columns=[{"name": "ts", "type": "DateTime64(3)"}],
|
|
115
|
+
partition_key="toStartOfMillisecond(ts)",
|
|
116
|
+
)
|
|
117
|
+
self.assertEqual(
|
|
118
|
+
err,
|
|
119
|
+
"Partition key granularity (Millisecond) on column 'ts' is finer than hourly. This tends to create a "
|
|
120
|
+
"very large number of parts, which makes merges and queries expensive regardless of the table's TTL. "
|
|
121
|
+
"Use an hourly or coarser partition key.",
|
|
122
|
+
)
|
|
123
|
+
|
|
124
|
+
def test_invalid_microsecond_partition_key(self):
|
|
125
|
+
err = chquery.validate_partition_key(
|
|
126
|
+
columns=[{"name": "ts", "type": "DateTime64(6)"}],
|
|
127
|
+
partition_key="toStartOfMicrosecond(ts)",
|
|
128
|
+
)
|
|
129
|
+
self.assertEqual(
|
|
130
|
+
err,
|
|
131
|
+
"Partition key granularity (Microsecond) on column 'ts' is finer than hourly. This tends to create a "
|
|
132
|
+
"very large number of parts, which makes merges and queries expensive regardless of the table's TTL. "
|
|
133
|
+
"Use an hourly or coarser partition key.",
|
|
134
|
+
)
|
|
135
|
+
|
|
136
|
+
def test_invalid_nanosecond_partition_key(self):
|
|
137
|
+
err = chquery.validate_partition_key(
|
|
138
|
+
columns=[{"name": "ts", "type": "DateTime64(9)"}],
|
|
139
|
+
partition_key="toStartOfNanosecond(ts)",
|
|
140
|
+
)
|
|
141
|
+
self.assertEqual(
|
|
142
|
+
err,
|
|
143
|
+
"Partition key granularity (Nanosecond) on column 'ts' is finer than hourly. This tends to create a "
|
|
144
|
+
"very large number of parts, which makes merges and queries expensive regardless of the table's TTL. "
|
|
145
|
+
"Use an hourly or coarser partition key.",
|
|
146
|
+
)
|
|
147
|
+
|
|
148
|
+
def test_invalid_yyyymmddhhmmss_partition_key(self):
|
|
149
|
+
# Packs the full date+time down to the second - no coarsening at all.
|
|
150
|
+
err = chquery.validate_partition_key(
|
|
151
|
+
columns=[{"name": "ts", "type": "DateTime"}],
|
|
152
|
+
partition_key="toYYYYMMDDhhmmss(ts)",
|
|
153
|
+
)
|
|
154
|
+
self.assertEqual(
|
|
155
|
+
err,
|
|
156
|
+
"Partition key granularity (Second) on column 'ts' is finer than hourly. This tends to create a very "
|
|
157
|
+
"large number of parts, which makes merges and queries expensive regardless of the table's TTL. Use "
|
|
158
|
+
"an hourly or coarser partition key.",
|
|
159
|
+
)
|
|
160
|
+
|
|
161
|
+
def test_valid_skipped_for_composite_partition_key(self):
|
|
162
|
+
self.assertIsNone(
|
|
163
|
+
chquery.validate_partition_key(
|
|
164
|
+
columns=[
|
|
165
|
+
{"name": "ts", "type": "DateTime"},
|
|
166
|
+
{"name": "k", "type": "String"},
|
|
167
|
+
],
|
|
168
|
+
partition_key="toStartOfMinute(ts), k",
|
|
169
|
+
)
|
|
170
|
+
)
|
|
171
|
+
|
|
172
|
+
def test_valid_skipped_for_unrecognized_function(self):
|
|
173
|
+
self.assertIsNone(
|
|
174
|
+
chquery.validate_partition_key(
|
|
175
|
+
columns=[{"name": "ts", "type": "DateTime"}],
|
|
176
|
+
partition_key="intDiv(toUInt32(ts), 60)",
|
|
177
|
+
)
|
|
178
|
+
)
|
|
179
|
+
|
|
180
|
+
def test_valid_skipped_for_bare_column(self):
|
|
181
|
+
self.assertIsNone(
|
|
182
|
+
chquery.validate_partition_key(
|
|
183
|
+
columns=[{"name": "k", "type": "String"}],
|
|
184
|
+
partition_key="k",
|
|
185
|
+
)
|
|
186
|
+
)
|
|
187
|
+
|
|
188
|
+
def test_invalid_bare_datetime_partition_key(self):
|
|
189
|
+
err = chquery.validate_partition_key(
|
|
190
|
+
columns=[{"name": "ts", "type": "DateTime"}],
|
|
191
|
+
partition_key="ts",
|
|
192
|
+
)
|
|
193
|
+
self.assertEqual(
|
|
194
|
+
err,
|
|
195
|
+
"Partition key granularity (Second) on column 'ts' is finer than hourly. This tends to create a very "
|
|
196
|
+
"large number of parts, which makes merges and queries expensive regardless of the table's TTL. Use "
|
|
197
|
+
"an hourly or coarser partition key, e.g. toStartOfHour(ts), toYYYYMMDD(ts), or toYYYYMM(ts).",
|
|
198
|
+
)
|
|
199
|
+
|
|
200
|
+
def test_invalid_bare_datetime64_partition_key(self):
|
|
201
|
+
err = chquery.validate_partition_key(
|
|
202
|
+
columns=[{"name": "ts", "type": "DateTime64(3)"}],
|
|
203
|
+
partition_key="ts",
|
|
204
|
+
)
|
|
205
|
+
self.assertEqual(
|
|
206
|
+
err,
|
|
207
|
+
"Partition key granularity (Millisecond) on column 'ts' is finer than hourly. This tends to create a "
|
|
208
|
+
"very large number of parts, which makes merges and queries expensive regardless of the table's TTL. "
|
|
209
|
+
"Use an hourly or coarser partition key, e.g. toStartOfHour(ts), toYYYYMMDD(ts), or toYYYYMM(ts).",
|
|
210
|
+
)
|
|
211
|
+
|
|
212
|
+
def test_valid_skipped_for_bare_date_column(self):
|
|
213
|
+
self.assertIsNone(
|
|
214
|
+
chquery.validate_partition_key(
|
|
215
|
+
columns=[{"name": "d", "type": "Date"}],
|
|
216
|
+
partition_key="d",
|
|
217
|
+
)
|
|
218
|
+
)
|
|
219
|
+
|
|
220
|
+
|
|
221
|
+
if __name__ == "__main__":
|
|
222
|
+
unittest.main()
|
|
@@ -1,150 +0,0 @@
|
|
|
1
|
-
import unittest
|
|
2
|
-
from chtoolset import query as chquery
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
class TestValidatePartitionKey(unittest.TestCase):
|
|
6
|
-
def test_valid_empty_partition_key(self):
|
|
7
|
-
self.assertIsNone(
|
|
8
|
-
chquery.validate_partition_key(
|
|
9
|
-
columns=[{"name": "ts", "type": "DateTime"}],
|
|
10
|
-
partition_key="",
|
|
11
|
-
)
|
|
12
|
-
)
|
|
13
|
-
|
|
14
|
-
def test_valid_hourly_partition_key(self):
|
|
15
|
-
# Hour is the floor - allowed.
|
|
16
|
-
self.assertIsNone(
|
|
17
|
-
chquery.validate_partition_key(
|
|
18
|
-
columns=[{"name": "ts", "type": "DateTime"}],
|
|
19
|
-
partition_key="toStartOfHour(ts)",
|
|
20
|
-
)
|
|
21
|
-
)
|
|
22
|
-
|
|
23
|
-
def test_valid_daily_partition_key(self):
|
|
24
|
-
self.assertIsNone(
|
|
25
|
-
chquery.validate_partition_key(
|
|
26
|
-
columns=[{"name": "ts", "type": "DateTime"}],
|
|
27
|
-
partition_key="toDate(ts)",
|
|
28
|
-
)
|
|
29
|
-
)
|
|
30
|
-
|
|
31
|
-
def test_valid_monthly_partition_key(self):
|
|
32
|
-
self.assertIsNone(
|
|
33
|
-
chquery.validate_partition_key(
|
|
34
|
-
columns=[{"name": "ts", "type": "DateTime"}],
|
|
35
|
-
partition_key="toYYYYMM(ts)",
|
|
36
|
-
)
|
|
37
|
-
)
|
|
38
|
-
|
|
39
|
-
def test_invalid_minute_partition_key(self):
|
|
40
|
-
err = chquery.validate_partition_key(
|
|
41
|
-
columns=[{"name": "ts", "type": "DateTime"}],
|
|
42
|
-
partition_key="toStartOfMinute(ts)",
|
|
43
|
-
)
|
|
44
|
-
self.assertIsNotNone(err)
|
|
45
|
-
self.assertIn("finer than hourly", err)
|
|
46
|
-
|
|
47
|
-
def test_invalid_second_partition_key(self):
|
|
48
|
-
err = chquery.validate_partition_key(
|
|
49
|
-
columns=[{"name": "ts", "type": "DateTime"}],
|
|
50
|
-
partition_key="toStartOfSecond(ts)",
|
|
51
|
-
)
|
|
52
|
-
self.assertIsNotNone(err)
|
|
53
|
-
self.assertIn("finer than hourly", err)
|
|
54
|
-
|
|
55
|
-
def test_invalid_five_minute_partition_key(self):
|
|
56
|
-
err = chquery.validate_partition_key(
|
|
57
|
-
columns=[{"name": "ts", "type": "DateTime"}],
|
|
58
|
-
partition_key="toStartOfFiveMinutes(ts)",
|
|
59
|
-
)
|
|
60
|
-
self.assertIsNotNone(err)
|
|
61
|
-
self.assertIn("finer than hourly", err)
|
|
62
|
-
|
|
63
|
-
def test_invalid_ten_minute_partition_key(self):
|
|
64
|
-
err = chquery.validate_partition_key(
|
|
65
|
-
columns=[{"name": "ts", "type": "DateTime"}],
|
|
66
|
-
partition_key="toStartOfTenMinutes(ts)",
|
|
67
|
-
)
|
|
68
|
-
self.assertIsNotNone(err)
|
|
69
|
-
self.assertIn("finer than hourly", err)
|
|
70
|
-
|
|
71
|
-
def test_invalid_fifteen_minute_partition_key(self):
|
|
72
|
-
err = chquery.validate_partition_key(
|
|
73
|
-
columns=[{"name": "ts", "type": "DateTime"}],
|
|
74
|
-
partition_key="toStartOfFifteenMinutes(ts)",
|
|
75
|
-
)
|
|
76
|
-
self.assertIsNotNone(err)
|
|
77
|
-
self.assertIn("finer than hourly", err)
|
|
78
|
-
|
|
79
|
-
def test_invalid_five_minute_singular_alias_partition_key(self):
|
|
80
|
-
# toStartOfFiveMinute (singular) is a registered alias for toStartOfFiveMinutes.
|
|
81
|
-
err = chquery.validate_partition_key(
|
|
82
|
-
columns=[{"name": "ts", "type": "DateTime"}],
|
|
83
|
-
partition_key="toStartOfFiveMinute(ts)",
|
|
84
|
-
)
|
|
85
|
-
self.assertIsNotNone(err)
|
|
86
|
-
self.assertIn("finer than hourly", err)
|
|
87
|
-
|
|
88
|
-
def test_invalid_millisecond_partition_key(self):
|
|
89
|
-
err = chquery.validate_partition_key(
|
|
90
|
-
columns=[{"name": "ts", "type": "DateTime64(3)"}],
|
|
91
|
-
partition_key="toStartOfMillisecond(ts)",
|
|
92
|
-
)
|
|
93
|
-
self.assertIsNotNone(err)
|
|
94
|
-
self.assertIn("finer than hourly", err)
|
|
95
|
-
|
|
96
|
-
def test_invalid_microsecond_partition_key(self):
|
|
97
|
-
err = chquery.validate_partition_key(
|
|
98
|
-
columns=[{"name": "ts", "type": "DateTime64(6)"}],
|
|
99
|
-
partition_key="toStartOfMicrosecond(ts)",
|
|
100
|
-
)
|
|
101
|
-
self.assertIsNotNone(err)
|
|
102
|
-
self.assertIn("finer than hourly", err)
|
|
103
|
-
|
|
104
|
-
def test_invalid_nanosecond_partition_key(self):
|
|
105
|
-
err = chquery.validate_partition_key(
|
|
106
|
-
columns=[{"name": "ts", "type": "DateTime64(9)"}],
|
|
107
|
-
partition_key="toStartOfNanosecond(ts)",
|
|
108
|
-
)
|
|
109
|
-
self.assertIsNotNone(err)
|
|
110
|
-
self.assertIn("finer than hourly", err)
|
|
111
|
-
|
|
112
|
-
def test_invalid_yyyymmddhhmmss_partition_key(self):
|
|
113
|
-
# Packs the full date+time down to the second - no coarsening at all.
|
|
114
|
-
err = chquery.validate_partition_key(
|
|
115
|
-
columns=[{"name": "ts", "type": "DateTime"}],
|
|
116
|
-
partition_key="toYYYYMMDDhhmmss(ts)",
|
|
117
|
-
)
|
|
118
|
-
self.assertIsNotNone(err)
|
|
119
|
-
self.assertIn("finer than hourly", err)
|
|
120
|
-
|
|
121
|
-
def test_valid_skipped_for_composite_partition_key(self):
|
|
122
|
-
self.assertIsNone(
|
|
123
|
-
chquery.validate_partition_key(
|
|
124
|
-
columns=[
|
|
125
|
-
{"name": "ts", "type": "DateTime"},
|
|
126
|
-
{"name": "k", "type": "String"},
|
|
127
|
-
],
|
|
128
|
-
partition_key="toStartOfMinute(ts), k",
|
|
129
|
-
)
|
|
130
|
-
)
|
|
131
|
-
|
|
132
|
-
def test_valid_skipped_for_unrecognized_function(self):
|
|
133
|
-
self.assertIsNone(
|
|
134
|
-
chquery.validate_partition_key(
|
|
135
|
-
columns=[{"name": "ts", "type": "DateTime"}],
|
|
136
|
-
partition_key="intDiv(toUInt32(ts), 60)",
|
|
137
|
-
)
|
|
138
|
-
)
|
|
139
|
-
|
|
140
|
-
def test_valid_skipped_for_bare_column(self):
|
|
141
|
-
self.assertIsNone(
|
|
142
|
-
chquery.validate_partition_key(
|
|
143
|
-
columns=[{"name": "k", "type": "String"}],
|
|
144
|
-
partition_key="k",
|
|
145
|
-
)
|
|
146
|
-
)
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
if __name__ == "__main__":
|
|
150
|
-
unittest.main()
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{tinybird_toolset-2.6.3 → tinybird_toolset-2.6.5}/src/tinybird_toolset.egg-info/dependency_links.txt
RENAMED
|
File without changes
|
{tinybird_toolset-2.6.3 → tinybird_toolset-2.6.5}/src/tinybird_toolset.egg-info/requires.txt
RENAMED
|
File without changes
|
{tinybird_toolset-2.6.3 → tinybird_toolset-2.6.5}/src/tinybird_toolset.egg-info/top_level.txt
RENAMED
|
File without changes
|
|
File without changes
|
{tinybird_toolset-2.6.3 → tinybird_toolset-2.6.5}/tests/test_check_ttl_partition_compatibility.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{tinybird_toolset-2.6.3 → tinybird_toolset-2.6.5}/tests/test_get_columns_from_create_query.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{tinybird_toolset-2.6.3 → tinybird_toolset-2.6.5}/tests/test_replace_tables_backward_compat.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|