Skip to content

Commit 91344aa

Browse files
Merge branch 'main' of https://github.com/singlestore-labs/singlestoredb-python into users/kaushik/interactive-udfs-changes
2 parents 5a282aa + 430893b commit 91344aa

File tree

21 files changed

+1278
-92
lines changed

21 files changed

+1278
-92
lines changed

coverage-mysql.cov

116 KB
Binary file not shown.

docs/src/api.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -256,11 +256,15 @@ create new ones.
256256
WorkspaceManager
257257
WorkspaceManager.organization
258258
WorkspaceManager.workspace_groups
259+
WorkspaceManager.starter_workspaces
259260
WorkspaceManager.regions
261+
WorkspaceManager.shared_tier_regions
260262
WorkspaceManager.create_workspace_group
261263
WorkspaceManager.create_workspace
264+
WorkspaceManager.create_starter_workspace
262265
WorkspaceManager.get_workspace_group
263266
WorkspaceManager.get_workspace
267+
WorkspaceManager.get_starter_workspace
264268

265269

266270
WorkspaceGroup

singlestoredb/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
DataError, ManagementError,
2626
)
2727
from .management import (
28-
manage_cluster, manage_workspaces, manage_files,
28+
manage_cluster, manage_workspaces, manage_files, manage_regions,
2929
)
3030
from .types import (
3131
Date, Time, Timestamp, DateFromTicks, TimeFromTicks, TimestampFromTicks,

singlestoredb/config.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -438,6 +438,11 @@
438438
environ=['SINGLESTOREDB_EXT_FUNC_PORT'],
439439
)
440440

441+
register_option(
442+
'external_function.timeout', 'int', check_int, 24*60*60,
443+
'Specifies the timeout in seconds for processing a batch of rows.',
444+
environ=['SINGLESTOREDB_EXT_FUNC_TIMEOUT'],
445+
)
441446

442447
#
443448
# Debugging options

singlestoredb/functions/decorator.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,7 @@ def _func(
111111
name=name,
112112
args=expand_types(args),
113113
returns=expand_types(returns),
114+
timeout=timeout,
114115
).items() if v is not None
115116
}
116117

@@ -181,6 +182,9 @@ def udf(
181182
Specifies the return data type of the function. This parameter
182183
works the same way as `args`. If the function is a table-valued
183184
function, the return type should be a `Table` object.
185+
timeout : int, optional
186+
The timeout in seconds for the UDF execution. If not specified,
187+
the global default timeout is used.
184188
185189
Returns
186190
-------
@@ -192,4 +196,5 @@ def udf(
192196
name=name,
193197
args=args,
194198
returns=returns,
199+
timeout=timeout,
195200
)

0 commit comments

Comments
 (0)