tinybird 5.0.2.dev0__py3-none-any.whl → 5.0.3.dev0__py3-none-any.whl

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.
@@ -195,6 +195,16 @@ class TinybirdDialect(ClickHouse):
195
195
  ),
196
196
  action=partial(actions.add_node_to_buffer, token_type=TokenType.QUOTED_NAME),
197
197
  ),
198
+ Rule(
199
+ name="number",
200
+ priority=700,
201
+ pattern=group(
202
+ r"-?0x[0-9a-f][0-9a-f_]*(\.[0-9a-f_]*)?(p[+-]?\d[\d_]*)?",
203
+ r"-?0b[01][01_]*",
204
+ r"-?(\d[\d_]*\.?[\d_]*|\.\d[\d_]*)(e[+-]?\d[\d_]*)?",
205
+ ),
206
+ action=partial(actions.add_node_to_buffer, token_type=TokenType.NUMBER),
207
+ ),
198
208
  ],
199
209
  "jinja": [
200
210
  Rule(
tinybird/tb/__cli__.py CHANGED
@@ -4,5 +4,5 @@ __description__ = 'Tinybird Command Line Tool'
4
4
  __url__ = 'https://www.tinybird.co/docs/forward/commands'
5
5
  __author__ = 'Tinybird'
6
6
  __author_email__ = 'support@tinybird.co'
7
- __version__ = '5.0.2.dev0'
8
- __revision__ = '44d7abef'
7
+ __version__ = '5.0.3.dev0'
8
+ __revision__ = '74fe6e30'
@@ -20,6 +20,10 @@ from tinybird.tb.modules.common import getenv_bool
20
20
  PIPE_CHECKER_RETRIES: int = 3
21
21
 
22
22
 
23
+ def _escape_single_quote_str(value: str) -> str:
24
+ return "'" + value.replace("\\", "\\\\").replace("'", "''") + "'"
25
+
26
+
23
27
  class PipeChecker(unittest.TestCase):
24
28
  RETRIES_LIMIT = PIPE_CHECKER_RETRIES
25
29
 
@@ -262,6 +266,8 @@ class PipeCheckerRunner:
262
266
  pipe_stats_rt_table: str = "",
263
267
  extra_where_clause: str = "",
264
268
  ):
269
+ limit = int(limit)
270
+ sample_by_params = int(sample_by_params)
265
271
  pipe_stats_rt = pipe_stats_rt_table or "tinybird.pipe_stats_rt"
266
272
  # TODO it may not be needed to extract token, pipe_checker, form or debug. They may be used in next steps
267
273
  # TODO extractURLParameter(assumeNotNull(url), 'from') <> 'ui' should read from request_param_names.
@@ -289,7 +295,7 @@ class PipeCheckerRunner:
289
295
  AND extractURLParameter(assumeNotNull(url), 'debug') <> 'query'
290
296
  AND error = 0
291
297
  AND not mapContains(parameters, '__tb__semver')
292
- {" AND " + " AND ".join([f"mapContains(pipe_request_params, '{match}')" for match in matches]) if matches and len(matches) > 0 else ""}
298
+ {" AND " + " AND ".join([f"mapContains(pipe_request_params, {_escape_single_quote_str(match)})" for match in matches]) if matches and len(matches) > 0 else ""}
293
299
  {extra_where_clause}
294
300
  Limit 5000000 -- Enough to bring data while not processing all requests from highly used pipes
295
301
  )
@@ -318,7 +324,7 @@ class PipeCheckerRunner:
318
324
  AND extractURLParameter(assumeNotNull(url), 'debug') <> 'query'
319
325
  AND error = 0
320
326
  AND not mapContains(parameters, '__tb__semver')
321
- {" AND " + " AND ".join([f"mapContains(pipe_request_params, '{match}')" for match in matches]) if matches and len(matches) > 0 else ""}
327
+ {" AND " + " AND ".join([f"mapContains(pipe_request_params, {_escape_single_quote_str(match)})" for match in matches]) if matches and len(matches) > 0 else ""}
322
328
  {extra_where_clause}
323
329
  LIMIT {limit}
324
330
  )
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: tinybird
3
- Version: 5.0.2.dev0
3
+ Version: 5.0.3.dev0
4
4
  Summary: Tinybird Command Line Tool
5
5
  Home-page: https://www.tinybird.co/docs/forward/commands
6
6
  Author: Tinybird
@@ -52,6 +52,11 @@ The Tinybird command-line tool allows you to use all the Tinybird functionality
52
52
  Changelog
53
53
  ----------
54
54
 
55
+ 5.0.2
56
+ *******
57
+
58
+ - `Fixed` ``tb fmt`` keeps ClickHouse numeric literals such as ``1e9``, ``0x1F``, ``0b101``, ``0x1p4`` and ``1_000_000`` intact instead of splitting them into separate tokens.
59
+
55
60
  5.0.1
56
61
  *******
57
62
 
@@ -6,7 +6,7 @@ tinybird/prompts.py,sha256=FNYpphDYlrXpm5AQM3yfQPbj4gd_TVnwoaoeswtx0OE,32699
6
6
  tinybird/service_datasources.py,sha256=kNTlnSV6dngANVVDhFQsY77mlD5jKExy_YRC4Cw5rsQ,57555
7
7
  tinybird/sql.py,sha256=V807-z7tlZWMowr2ezYhsxjFWm-rWejaQ1mlr0ZXtPU,47173
8
8
  tinybird/sql_template.py,sha256=wxVDNCd0T5vmU4m3zM4HDORr8KVj6zZNnkK0FSF5icg,134046
9
- tinybird/sql_template_fmt.py,sha256=cOhhkA9h_M8II-06Qx5pt3E7IXUgzvrzfWGMtWdtkUM,10525
9
+ tinybird/sql_template_fmt.py,sha256=WtI9GpI3xT6E7MnFKvDyig_wVU2QrhxHAoagEQvlonM,10990
10
10
  tinybird/sql_toolset.py,sha256=ZLJUkqYxrvZOeKAoiItMYDjRat4qs9IH8CenbnglF1U,29926
11
11
  tinybird/syncasync.py,sha256=fFQ5GPPnUlTJ-J3VTw9AZCNXtp5IUiP9Q22sZXcixU4,26352
12
12
  tinybird/tornado_template.py,sha256=mTQMTywuqTfk9xX737mT5Fv_o-PNHJxpgTa4LF-edCE,49079
@@ -19,7 +19,7 @@ tinybird/datafile/parse_datasource.py,sha256=yd58HrUF4yNJXLn6OsvKGpZJpvrcjLGAeJG
19
19
  tinybird/datafile/parse_pipe.py,sha256=StMwF0Y1ny94hQxgPgcyx6-Jr46gCYBuPGpHF4bFiSQ,4956
20
20
  tinybird/iterating/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
21
21
  tinybird/iterating/data_branch_modes.py,sha256=5YuDa-gr8mKwmES8Xro6TRKbQtaOtIw4GbC606Qhu3o,184
22
- tinybird/tb/__cli__.py,sha256=TSs6M-i2pYwhTpbBkwTYj9F79lbFhN2cZtqgjHJ2iaw,246
22
+ tinybird/tb/__cli__.py,sha256=ZrZ9iqYdHovg3Om8T8Ohklv12WM-PqwIKSnx3iTiH84,246
23
23
  tinybird/tb/check_pypi.py,sha256=Gp0HkHHDFMSDL6nxKlOY51z7z1Uv-2LRexNTZSHHGmM,552
24
24
  tinybird/tb/cli.py,sha256=IjiGfNIpxSxi1odK1kMj9s8lEhx3sAUgGA263XdmyR0,1119
25
25
  tinybird/tb/client.py,sha256=feuyhQkCcpNbpBfJPOAIjviwEf7WS-WmLvN5BiQEqvs,59554
@@ -89,7 +89,7 @@ tinybird/tb/modules/datafile/format_common.py,sha256=G7ux7dHRioYNi5RFLUOy0NIaxlE
89
89
  tinybird/tb/modules/datafile/format_connection.py,sha256=9opv2kxizA_05VbBAWGBH10Oyql21XnE3IDB2DoQvCs,5069
90
90
  tinybird/tb/modules/datafile/format_datasource.py,sha256=_w5Y4tgl3Sejf0T8146F_owC1p5tFxXoTaSP5ggT36A,5305
91
91
  tinybird/tb/modules/datafile/format_pipe.py,sha256=Y4XBrJtOlQyDiRTHAfu7jo66Ud52TayNtJ55eevOb8g,7938
92
- tinybird/tb/modules/datafile/pipe_checker.py,sha256=jpHfaql5sjYPKb9jSYMwV0pWSVncTZIokijKZAgWweY,24929
92
+ tinybird/tb/modules/datafile/pipe_checker.py,sha256=z1-nWuVvdAiLaHzkfnZ_DNSnIniKpNPR52lsDcu_a_c,25174
93
93
  tinybird/tb/modules/datafile/playground.py,sha256=LeQj8udkolUZIrSGlwiB0WKk-x4eAyWt15HusV4hxRg,41035
94
94
  tinybird/tb/modules/datafile/pull.py,sha256=OwYsa11uT7s1ALJL6EuF_gOppHR9O8Fr7kh4azVbFsM,9262
95
95
  tinybird/tb/modules/tinyunit/tinyunit.py,sha256=JZhIgyVv-S1H_gu0Tuv1U7U4OzFfVM_r7twzPM_JKeU,11047
@@ -101,8 +101,8 @@ tinybird/tb_cli_modules/regions.py,sha256=QjsL5H6Kg-qr0aYVLrvb1STeJ5Sx_sjvbOYO0L
101
101
  tinybird/tb_cli_modules/telemetry.py,sha256=W098H6jmS4kpE7hN3tadaREBTf7oMocel-lkKWN0pU8,10466
102
102
  tinybird/utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
103
103
  tinybird/utils/bools.py,sha256=Rwuh_R6j62JVkcxKskLQao7DE2Jj6TQzsbgvtCsLHP4,587
104
- tinybird-5.0.2.dev0.dist-info/METADATA,sha256=Pke6yLvwAa2ATk_WA2GF-zc1tEgUUeXRpWN107wMMTU,19365
105
- tinybird-5.0.2.dev0.dist-info/WHEEL,sha256=beeZ86-EfXScwlR_HKu4SllMC9wUEj_8Z_4FJ3egI2w,91
106
- tinybird-5.0.2.dev0.dist-info/entry_points.txt,sha256=LwdHU6TfKx4Qs7BqqtaczEZbImgU7Abe9Lp920zb_fo,43
107
- tinybird-5.0.2.dev0.dist-info/top_level.txt,sha256=ZIQJTPCzMqnfDzM_hEGZrJqDSEcKnIK_49T86DGWpyQ,78
108
- tinybird-5.0.2.dev0.dist-info/RECORD,,
104
+ tinybird-5.0.3.dev0.dist-info/METADATA,sha256=f_nXWWCMe9M9QcB7tYMFNKly0MVOKLGMO_hKofLxmgA,19557
105
+ tinybird-5.0.3.dev0.dist-info/WHEEL,sha256=beeZ86-EfXScwlR_HKu4SllMC9wUEj_8Z_4FJ3egI2w,91
106
+ tinybird-5.0.3.dev0.dist-info/entry_points.txt,sha256=LwdHU6TfKx4Qs7BqqtaczEZbImgU7Abe9Lp920zb_fo,43
107
+ tinybird-5.0.3.dev0.dist-info/top_level.txt,sha256=ZIQJTPCzMqnfDzM_hEGZrJqDSEcKnIK_49T86DGWpyQ,78
108
+ tinybird-5.0.3.dev0.dist-info/RECORD,,