pyspiral 0.4.2__cp310-abi3-macosx_11_0_arm64.whl → 0.4.4__cp310-abi3-macosx_11_0_arm64.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.
- {pyspiral-0.4.2.dist-info → pyspiral-0.4.4.dist-info}/METADATA +1 -1
- {pyspiral-0.4.2.dist-info → pyspiral-0.4.4.dist-info}/RECORD +13 -13
- spiral/_lib.abi3.so +0 -0
- spiral/api/filesystems.py +13 -1
- spiral/core/client/__init__.pyi +2 -1
- spiral/core/table/__init__.pyi +1 -0
- spiral/expressions/__init__.py +6 -15
- spiral/expressions/mp4.py +7 -7
- spiral/expressions/refs.py +3 -3
- spiral/substrait_.py +0 -5
- spiral/tables/table.py +1 -13
- {pyspiral-0.4.2.dist-info → pyspiral-0.4.4.dist-info}/WHEEL +0 -0
- {pyspiral-0.4.2.dist-info → pyspiral-0.4.4.dist-info}/entry_points.txt +0 -0
@@ -1,13 +1,13 @@
|
|
1
|
-
pyspiral-0.4.
|
2
|
-
pyspiral-0.4.
|
3
|
-
pyspiral-0.4.
|
1
|
+
pyspiral-0.4.4.dist-info/METADATA,sha256=lVusDQ4LmIf3tRllkl2_hUNn1y0P_yMfNKhkRbpNLW0,1610
|
2
|
+
pyspiral-0.4.4.dist-info/WHEEL,sha256=Mdosfxua6Dx1zYgObRH97e3wyiELqBbLtoRJj4RUSQE,103
|
3
|
+
pyspiral-0.4.4.dist-info/entry_points.txt,sha256=uft7u-a6g40NLt4Q6BleWbK4NY0M8nZuYPpP8DV0EOk,45
|
4
4
|
spiral/__init__.py,sha256=Jv1vbcnnmcTsBLN5mSNjnX3ae4C_mgojXDSBFaqIhN0,208
|
5
|
-
spiral/_lib.abi3.so,sha256=
|
5
|
+
spiral/_lib.abi3.so,sha256=5-2gLMM7XOEgX6lXbIBu-_ucQsC5zUZWqZaH7oXkdSE,59883120
|
6
6
|
spiral/adbc.py,sha256=HcvR60uQeEK2oggSAK6y5VYtIrACIiCQ-85MEf18EZc,14199
|
7
7
|
spiral/api/__init__.py,sha256=_7BS1RhqEFjnt3XwFWZNCHVEQeSKpezPevAiGCsvDbE,1776
|
8
8
|
spiral/api/admin.py,sha256=A1iVR1XYJSObZivPAD5UzmPuMgupXc9kaHNYYa_kwfs,585
|
9
9
|
spiral/api/client.py,sha256=9-L6T8niQAXo90jRxllJD4hXXmcGfHj7CW9X3XTYa5Q,4551
|
10
|
-
spiral/api/filesystems.py,sha256=
|
10
|
+
spiral/api/filesystems.py,sha256=EA4iqhTeaIlvObvEUxHmZl0pQ24IOxUVWM3GPhFLw8o,4969
|
11
11
|
spiral/api/organizations.py,sha256=B-8zZ7lFJANGK7dUNbo_aU-cgI959JBP9VcWb6wdgi0,1895
|
12
12
|
spiral/api/projects.py,sha256=JBGof9A2Ivasu2jrULMjHBwlna0M8WRrTNqU-Es4GJ8,5673
|
13
13
|
spiral/api/telemetry.py,sha256=tfdA3E_EWJwFVxkQfkm8tiYGRubnx2LuE5nbfsk1oG4,474
|
@@ -35,22 +35,22 @@ spiral/cli/types.py,sha256=YG1eHhRLaqlVU_18DQBuF_YMsabhMZLBY0V9CvbSxjY,1369
|
|
35
35
|
spiral/cli/workloads.py,sha256=SbxgwiBlX1AuqpOLV3gs7DFkH-Tbeend7qJTwq0Je84,1994
|
36
36
|
spiral/client.py,sha256=K-OuMOTgYxOA9vef5jSANjmPRBfGrzQ65fg6Fd-rHMY,2683
|
37
37
|
spiral/core/__init__.pyi,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
38
|
-
spiral/core/client/__init__.pyi,sha256=
|
38
|
+
spiral/core/client/__init__.pyi,sha256=Tn1OJmkO1rQUsPE9BtfEyxIjoife6s16qOd8XiyHi2c,3475
|
39
39
|
spiral/core/index/__init__.pyi,sha256=NPOG1ztFO6siBGpmJU3boRzX26xfxw--2TiCydosGvo,314
|
40
|
-
spiral/core/table/__init__.pyi,sha256=
|
40
|
+
spiral/core/table/__init__.pyi,sha256=agrxN1dYx--dte_edQOKgAXT8yPDeh_cHA8dYAOodbE,3290
|
41
41
|
spiral/core/table/manifests/__init__.pyi,sha256=3V59-K1qr1z2dGfgRKXaHSVheK8NNw8Q8PFhfbeQd_4,1065
|
42
42
|
spiral/core/table/metastore/__init__.pyi,sha256=dMqySDnsjPUTBuFU2MaQGyocKEoGkWpeTQmUP2iIKbc,1880
|
43
43
|
spiral/core/table/spec/__init__.pyi,sha256=D4GQp9RWwyLKTlRW7eDXcQE-xA5rF2iBcXZ8y7b48EE,5595
|
44
44
|
spiral/datetime_.py,sha256=1TA1RYIRU22qcUuipIjVhAtGnPDVn2z9WttuhkmfkwY,964
|
45
|
-
spiral/expressions/__init__.py,sha256=
|
45
|
+
spiral/expressions/__init__.py,sha256=T8PIb0_UB9kynK0dpWbUD4No5lKRTG-wKnao8xOcXjY,6381
|
46
46
|
spiral/expressions/base.py,sha256=q_W9XslcdFQtOIE_d1VkEmLickaXKOAoIcFeMoh-nqQ,4751
|
47
47
|
spiral/expressions/http.py,sha256=begUydWoFHEqjeLkATvI_v66Ez6_rR-OQBWO5cHbb9c,2742
|
48
48
|
spiral/expressions/io.py,sha256=gJ2a0FKMmdxarWKENulPRwH7KDvSJTIh_OUxX306xAM,3045
|
49
49
|
spiral/expressions/list_.py,sha256=MMt5lf5H1M3O-x6N_PvqOLGq9NOk6Ukv0fPWwPC_uy4,1809
|
50
|
-
spiral/expressions/mp4.py,sha256=
|
50
|
+
spiral/expressions/mp4.py,sha256=_xGVnkygddzxP9a8OACJ8_KXnejuVbYCVKBCXBQ798Y,2151
|
51
51
|
spiral/expressions/png.py,sha256=KO8X0OmMzUFwpg2I_j0JTyldPzVXDWIMzjWMWDV9vIY,506
|
52
52
|
spiral/expressions/qoi.py,sha256=gvIbb6fXb_Bb080sn9wkpbGGrPs2UEcTXCfuv4-kcYQ,506
|
53
|
-
spiral/expressions/refs.py,sha256=
|
53
|
+
spiral/expressions/refs.py,sha256=omeHBQ5o6N4xgZ3x5Xz7IRrWwYBBtQY8DYK0NNAxeGo,2109
|
54
54
|
spiral/expressions/str_.py,sha256=tY8RXW3JWvr1-bEfCZtk5FAf11wKJnXPuA9EoeJ9tA4,1265
|
55
55
|
spiral/expressions/struct.py,sha256=pGAnCDh6AK0BK1XfZ1qG4ce4ranIQEE1HQsgmzBcfwQ,2038
|
56
56
|
spiral/expressions/text.py,sha256=-02gBWYoyNQ3qQ1--9HTa8IryUDojYQVIp8C7rgnOWQ,1893
|
@@ -81,7 +81,7 @@ spiral/protogen/util.py,sha256=smnvVo6nYH3FfDm9jqhNLaXz4bbTBaQezHQDCTvZyiQ,1486
|
|
81
81
|
spiral/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
82
82
|
spiral/server.py,sha256=ztBmB5lBnUz-smQxR_tC8AI5SOhz17wH0MI3GuzDUdM,600
|
83
83
|
spiral/settings.py,sha256=PIQV2ljtB3pEOWoMRVSRzSGJNrXviO2JBgZ5ZY_Nq2E,2794
|
84
|
-
spiral/substrait_.py,sha256=
|
84
|
+
spiral/substrait_.py,sha256=2BYvwFGcCwJ0JXNhXOLdPuhM1PqFyaeSqFpQCtv-M4E,12581
|
85
85
|
spiral/tables/__init__.py,sha256=iiP7BkHA117em37_e75jtdvoZC10xCXtld18gRnPbTw,430
|
86
86
|
spiral/tables/client.py,sha256=l_wJJRf3BPD5lg4Q1Ll2lAqQIuBCnKwC6JtsAui91Tc,4915
|
87
87
|
spiral/tables/dataset.py,sha256=DuHeKVCJfXLsbxmde9QW6yvesW5uhswG6qAxV5X0ZgA,7890
|
@@ -92,7 +92,7 @@ spiral/tables/debug/scan.py,sha256=-IWX_UjO4QP9Hj7PtZ1rLlbswJcryOin56GT-exqFm4,8
|
|
92
92
|
spiral/tables/maintenance.py,sha256=7Xa2Jdu_OY1Qu6iN1sPVdywVZtk_Mv3EaC3G93cmQvI,305
|
93
93
|
spiral/tables/scan.py,sha256=3lPf5fSyF1fHGdGJ-pvu5HxPWoonf_XL7neWTqzB-0I,7582
|
94
94
|
spiral/tables/snapshot.py,sha256=2NTuVEp2uJ1pV3Q5tLj7FOzPSc9axlfb6uOITwHnj0g,2229
|
95
|
-
spiral/tables/table.py,sha256=
|
95
|
+
spiral/tables/table.py,sha256=VM93Rsm67sJFendI1_VhlkFORIdBGfhCMBUBK4dve9I,4910
|
96
96
|
spiral/tables/transaction.py,sha256=3a64R-mf_cmR54BNn8U-05jmWonp6Ivxhe6u01Dyjzo,1573
|
97
97
|
spiral/types_.py,sha256=W_jyO7F6rpPiH69jhgSgV7OxQZbOlb1Ho3InpKUP6Eo,155
|
98
|
-
pyspiral-0.4.
|
98
|
+
pyspiral-0.4.4.dist-info/RECORD,,
|
spiral/_lib.abi3.so
CHANGED
Binary file
|
spiral/api/filesystems.py
CHANGED
@@ -1,4 +1,5 @@
|
|
1
1
|
from enum import Enum
|
2
|
+
from types import NoneType
|
2
3
|
from typing import Annotated, Literal
|
3
4
|
|
4
5
|
from pydantic import AfterValidator, BaseModel, Field
|
@@ -17,6 +18,7 @@ def _validate_directory_path(path: str) -> str:
|
|
17
18
|
|
18
19
|
DirectoryPath = Annotated[str, AfterValidator(_validate_directory_path)]
|
19
20
|
FilePath = str # Path or directory
|
21
|
+
FsLoc = str
|
20
22
|
|
21
23
|
|
22
24
|
class BuiltinFileSystem(BaseModel):
|
@@ -120,6 +122,12 @@ class CreateMountResponse(BaseModel):
|
|
120
122
|
mount: Mount
|
121
123
|
|
122
124
|
|
125
|
+
class GetMountAndFileSystemResponse(BaseModel):
|
126
|
+
mount: Mount
|
127
|
+
file_system: FileSystem
|
128
|
+
fs_loc: FsLoc
|
129
|
+
|
130
|
+
|
123
131
|
class FileSystemService(ServiceBase):
|
124
132
|
"""Service for file system operations."""
|
125
133
|
|
@@ -148,6 +156,10 @@ class FileSystemService(ServiceBase):
|
|
148
156
|
"""Get a mount."""
|
149
157
|
return self.client.get(f"/v1/mounts/{mount_id}", Mount)
|
150
158
|
|
159
|
+
def get_mount_and_file_system(self, mount_id: str) -> GetMountAndFileSystemResponse:
|
160
|
+
"""Get the mount and its associated file system."""
|
161
|
+
return self.client.get(f"/v1/mounts/{mount_id}/with-filesystem", GetMountAndFileSystemResponse)
|
162
|
+
|
151
163
|
def remove_mount(self, mount_id: str) -> None:
|
152
164
|
"""Remove mount."""
|
153
|
-
return self.client.delete(f"/v1/mounts/{mount_id}",
|
165
|
+
return self.client.delete(f"/v1/mounts/{mount_id}", NoneType)
|
spiral/core/client/__init__.pyi
CHANGED
@@ -110,7 +110,8 @@ class Spiral:
|
|
110
110
|
...
|
111
111
|
|
112
112
|
def _sync_snapshot(self, index_id: str, snapshot: TableSnapshot) -> None:
|
113
|
-
"""
|
113
|
+
"""
|
114
|
+
Synchronize an index with a table snapshot.
|
114
115
|
|
115
116
|
IMPORTANT: This is only exposed for testing purposes and should not be used.
|
116
117
|
"""
|
spiral/core/table/__init__.pyi
CHANGED
spiral/expressions/__init__.py
CHANGED
@@ -47,7 +47,7 @@ __all__ = [
|
|
47
47
|
"not_",
|
48
48
|
"or_",
|
49
49
|
"pack",
|
50
|
-
"
|
50
|
+
"aux",
|
51
51
|
"ref",
|
52
52
|
"refs",
|
53
53
|
"scalar",
|
@@ -116,26 +116,17 @@ def lift(expr: ExprLike) -> Expr:
|
|
116
116
|
return scalar(expr)
|
117
117
|
|
118
118
|
|
119
|
-
def
|
120
|
-
"""Create a variable expression referencing a
|
119
|
+
def aux(name: builtins.str, dtype: pa.DataType) -> Expr:
|
120
|
+
"""Create a variable expression referencing a column in the auxiliary table.
|
121
121
|
|
122
|
-
|
123
|
-
name: variable name
|
124
|
-
"""
|
125
|
-
return Expr(_lib.expr.keyed(name))
|
126
|
-
|
127
|
-
|
128
|
-
def keyed(name: builtins.str, dtype: pa.DataType) -> Expr:
|
129
|
-
"""Create a variable expression referencing a column in the key table.
|
130
|
-
|
131
|
-
Key table is optionally given to `Scan#to_record_batches` function when reading only specific keys
|
122
|
+
Auxiliary table is optionally given to `Scan#to_record_batches` function when reading only specific keys
|
132
123
|
or doing cell pushdown.
|
133
124
|
|
134
125
|
Args:
|
135
126
|
name: variable name
|
136
|
-
dtype: must match dtype of the column in the
|
127
|
+
dtype: must match dtype of the column in the auxiliary table.
|
137
128
|
"""
|
138
|
-
return Expr(_lib.expr.
|
129
|
+
return Expr(_lib.expr.aux(name, dtype))
|
139
130
|
|
140
131
|
|
141
132
|
def scalar(value: Any) -> Expr:
|
spiral/expressions/mp4.py
CHANGED
@@ -20,13 +20,13 @@ def read(expr: ExprLike | str, frames: ExprLike | str, crop: ExprLike | str):
|
|
20
20
|
|
21
21
|
Args:
|
22
22
|
expr: The referenced `Mp4` bytes.
|
23
|
-
A str is assumed to be the `se.
|
23
|
+
A str is assumed to be the `se.aux` expression.
|
24
24
|
frames: The range of frames to read. Each element must be a list of two uint32,
|
25
25
|
frame start and frame end, or null / empty list to read all frames.
|
26
|
-
A str is assumed to be the `se.
|
26
|
+
A str is assumed to be the `se.aux` expression.
|
27
27
|
crop: The crop of the frames to read. Each element must be a list of four uint32,
|
28
28
|
x, y, width, height or null / empty list to read full frames.
|
29
|
-
A str is assumed to be the `se.
|
29
|
+
A str is assumed to be the `se.aux` expression.
|
30
30
|
|
31
31
|
Returns:
|
32
32
|
An array where each element is a decoded cropped video with fields:
|
@@ -36,17 +36,17 @@ def read(expr: ExprLike | str, frames: ExprLike | str, crop: ExprLike | str):
|
|
36
36
|
frames: Number of frames with type `pa.uint32()`.
|
37
37
|
"""
|
38
38
|
from spiral import _lib
|
39
|
-
from spiral.expressions import
|
39
|
+
from spiral.expressions import aux, lift
|
40
40
|
|
41
41
|
if isinstance(expr, str):
|
42
|
-
expr =
|
42
|
+
expr = aux(
|
43
43
|
expr,
|
44
44
|
pa.struct([("__ref__", pa.struct([("id", pa.string()), ("begin", pa.uint64()), ("end", pa.uint64())]))]),
|
45
45
|
)
|
46
46
|
if isinstance(frames, str):
|
47
|
-
frames =
|
47
|
+
frames = aux(frames, pa.list_(pa.uint32()))
|
48
48
|
if isinstance(crop, str):
|
49
|
-
crop =
|
49
|
+
crop = aux(crop, pa.list_(pa.uint32()))
|
50
50
|
|
51
51
|
expr = lift(expr)
|
52
52
|
frames = lift(frames)
|
spiral/expressions/refs.py
CHANGED
@@ -29,15 +29,15 @@ def deref(expr: ExprLike | str, field: str | None = None) -> Expr:
|
|
29
29
|
column back into their original form, e.g. binary.
|
30
30
|
|
31
31
|
Args:
|
32
|
-
expr: The expression to de-reference. A str is assumed to be the `se.
|
32
|
+
expr: The expression to de-reference. A str is assumed to be the `se.aux` expression.
|
33
33
|
field: If the expr evaluates into struct, the field name of that struct that should be de-referenced.
|
34
34
|
If `None`, the expr must evaluate into a reference type.
|
35
35
|
"""
|
36
36
|
from spiral import _lib
|
37
|
-
from spiral.expressions import
|
37
|
+
from spiral.expressions import aux, lift
|
38
38
|
|
39
39
|
if isinstance(expr, str):
|
40
|
-
expr =
|
40
|
+
expr = aux(
|
41
41
|
expr,
|
42
42
|
pa.struct([("__ref__", pa.struct([("id", pa.string()), ("begin", pa.uint64()), ("end", pa.uint64())]))]),
|
43
43
|
)
|
spiral/substrait_.py
CHANGED
@@ -248,11 +248,6 @@ class SubstraitConverter:
|
|
248
248
|
case "struct_field", ref:
|
249
249
|
ref: ExpressionReferenceSegmentStructField
|
250
250
|
field_name = scope_type.field(ref.field).name
|
251
|
-
|
252
|
-
if field_name in self.key_names:
|
253
|
-
# This is a key column, so we need to select it from the scope.
|
254
|
-
return se.key(field_name)
|
255
|
-
|
256
251
|
scope = se.getitem(scope, field_name)
|
257
252
|
scope_type = scope_type.field(ref.field).type
|
258
253
|
if ref.is_set("child"):
|
spiral/tables/table.py
CHANGED
@@ -71,11 +71,6 @@ class Table(Expr):
|
|
71
71
|
return f'Table("{self.identifier}")'
|
72
72
|
|
73
73
|
def __getitem__(self, item: str) -> Expr:
|
74
|
-
from spiral import expressions as se
|
75
|
-
|
76
|
-
if item in self._key_columns:
|
77
|
-
return se.key(name=item)
|
78
|
-
|
79
74
|
return super().__getitem__(item)
|
80
75
|
|
81
76
|
def select(self, *paths: str, exclude: list[str] = None) -> "Expr":
|
@@ -86,14 +81,7 @@ class Table(Expr):
|
|
86
81
|
"Cannot use 'exclude' arg with key columns. Use 'exclude_keys' and an explicit select of keys."
|
87
82
|
)
|
88
83
|
|
89
|
-
|
90
|
-
other_paths = set(paths) - key_paths
|
91
|
-
if not key_paths:
|
92
|
-
return super().select(*paths, exclude=exclude)
|
93
|
-
|
94
|
-
from spiral import expressions as se
|
95
|
-
|
96
|
-
return se.merge(se.pack({key: se.key(key) for key in key_paths}), super().select(*other_paths, exclude=exclude))
|
84
|
+
return super().select(*paths, exclude=exclude)
|
97
85
|
|
98
86
|
@property
|
99
87
|
def key_schema(self) -> Schema:
|
File without changes
|
File without changes
|