pyspiral 0.7.5__cp312-abi3-manylinux_2_28_x86_64.whl → 0.7.6__cp312-abi3-manylinux_2_28_x86_64.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.

Potentially problematic release.


This version of pyspiral might be problematic. Click here for more details.

@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: pyspiral
3
- Version: 0.7.5
3
+ Version: 0.7.6
4
4
  Classifier: Intended Audience :: Science/Research
5
5
  Classifier: Operating System :: OS Independent
6
6
  Classifier: Programming Language :: Python
@@ -1,8 +1,8 @@
1
- pyspiral-0.7.5.dist-info/METADATA,sha256=ZZogea6_l7fIAEwj7iTpS9DEPJbjqHJnIK2QK3eOKBU,1874
2
- pyspiral-0.7.5.dist-info/WHEEL,sha256=ydlpo1_yEJ2g1Axq3LoOd_OfioJa2swc2j5IDCa4uho,107
3
- pyspiral-0.7.5.dist-info/entry_points.txt,sha256=R96Y3FpYX6XbQu9qMPfUTgiCcf4qM9OBQQZTDdBkZwA,74
1
+ pyspiral-0.7.6.dist-info/METADATA,sha256=mBOLr8JlizyBr3w2oyvielfM-EdxU3vOtLG85rQpcHw,1874
2
+ pyspiral-0.7.6.dist-info/WHEEL,sha256=ydlpo1_yEJ2g1Axq3LoOd_OfioJa2swc2j5IDCa4uho,107
3
+ pyspiral-0.7.6.dist-info/entry_points.txt,sha256=R96Y3FpYX6XbQu9qMPfUTgiCcf4qM9OBQQZTDdBkZwA,74
4
4
  spiral/__init__.py,sha256=PwaYBWFBtB7cYi7peMmhk_Lm5XzjRoLwOtLbUhc1ZDo,1449
5
- spiral/_lib.abi3.so,sha256=5a35sIpO3QEMLk71sc0wziRxtU8A7A80FNLCVNAP5iM,67680936
5
+ spiral/_lib.abi3.so,sha256=LOFIeG67nT7ri--VhwUygbn_yiakpSpA6Kf0_YhDRKE,67703640
6
6
  spiral/adbc.py,sha256=7IxfWIeQN-fh0W5OdN_PP2x3pzQYg6ZUOLsHg3jktqw,14842
7
7
  spiral/api/__init__.py,sha256=ULBlVq3PnfNOO6T5naE_ULmmii-83--qTuN2PpAUQN0,2241
8
8
  spiral/api/admin.py,sha256=A1iVR1XYJSObZivPAD5UzmPuMgupXc9kaHNYYa_kwfs,585
@@ -49,7 +49,7 @@ spiral/core/expr/struct_/__init__.pyi,sha256=MXckd98eV_x3X0RhEWvlkA3DcDXRtLs5pNn
49
49
  spiral/core/expr/text/__init__.pyi,sha256=ed83n1xcsGY7_QDhMmJGnSQ20UrJFXcdv1AveSEcS1c,175
50
50
  spiral/core/expr/udf/__init__.pyi,sha256=zsZs081KVhY3-1JidqTkWMW81Qd_ScoTGZvasIhIK-4,358
51
51
  spiral/core/expr/video/__init__.pyi,sha256=nQJEcSsigZuRpMjkI_O4EEtMK_n2zRvorcL_KEeD5vU,95
52
- spiral/core/table/__init__.pyi,sha256=szCtZqZ_L0vF_99x7d3olwazJdEn5LwkgRK-8QEOzrI,3914
52
+ spiral/core/table/__init__.pyi,sha256=BkjzdcY0JL97nDRoY5s2gjfdIn1CZ7TR-uYp8f6cxEw,3940
53
53
  spiral/core/table/manifests/__init__.pyi,sha256=eVfDpmhYSjafIvvALqAkZe5baN3Y1HpKpxYEbjwd4gQ,1043
54
54
  spiral/core/table/metastore/__init__.pyi,sha256=rc3u9MwEKRvL2kxOc8lBorddFRnM8o_o1frqtae86a4,1697
55
55
  spiral/core/table/spec/__init__.pyi,sha256=fVuc2j3uoTdWfYNm720OfUIgrLYw9fRwj44maI5bgdY,5709
@@ -60,7 +60,7 @@ spiral/debug/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
60
60
  spiral/debug/manifests.py,sha256=7f1O3ba9mrA5nXpOF9cEIQuUAteP5wiBkFy_diQJ7No,3216
61
61
  spiral/debug/metrics.py,sha256=XdRDcjggtsLNGCAjam6IxG9072pz_d2C8iLApNRFUtk,2044
62
62
  spiral/debug/scan.py,sha256=UEm_aRnql5pwDPTpZgakMLNjlzkKL4RurBFFqH_BLAQ,9526
63
- spiral/enrichment.py,sha256=iKZn4tLsRQZPtaY-WdJSqPZ3H5UMfVyavcwTKO_3aCw,6980
63
+ spiral/enrichment.py,sha256=OYOvFg98p-ti6HTw6tD6ThMGXUUKQ7JEUnqYKvMjOag,7046
64
64
  spiral/expressions/__init__.py,sha256=ZsD8g7vB0G7xy19GUiH4m79kw7KEkTQRwJl5Gn1cgtw,8049
65
65
  spiral/expressions/base.py,sha256=PvhJkcUSsPSIaxirHVzM9zlqyBXiaiia1HXohXdOmL4,5377
66
66
  spiral/expressions/file.py,sha256=7D9jIENJcoT0KFharBLkzK9dZgO4DYn5K_KCt0twefg,518
@@ -104,6 +104,6 @@ spiral/streaming_/stream.py,sha256=DM1hBDHnWm1ZFKZ-hZ4zxeSXITcUI6kWzwdJZvywI8o,5
104
104
  spiral/substrait_.py,sha256=AKeOD4KIXvz2J4TYxnIneOiHddtBIyOhuNxVO_uH0eg,12592
105
105
  spiral/table.py,sha256=ep8ZYtl6POebkPViR2FrekhFazNmAbOAESoLUODlup8,12242
106
106
  spiral/text_index.py,sha256=FQ9rgIEGLSJryS9lFdMhKtPFey18BXoWbPXyvZPJJ04,442
107
- spiral/transaction.py,sha256=KQhx3DvQyxG2C8md-YGsF_PgBRfayI0r_7ebMItDHdI,3938
107
+ spiral/transaction.py,sha256=bI5oqBAmPMSF0yOOYcPfGbV37Xc1-_V-wQNKw1xOlTA,4136
108
108
  spiral/types_.py,sha256=W_jyO7F6rpPiH69jhgSgV7OxQZbOlb1Ho3InpKUP6Eo,155
109
- pyspiral-0.7.5.dist-info/RECORD,,
109
+ pyspiral-0.7.6.dist-info/RECORD,,
spiral/_lib.abi3.so CHANGED
Binary file
@@ -115,7 +115,7 @@ class Transaction:
115
115
  def ops(self) -> list[Operation]: ...
116
116
  def take(self) -> list[Operation]: ...
117
117
  def include(self, ops: list[Operation]): ...
118
- def commit(self): ...
118
+ def commit(self, *, compact: bool = False): ...
119
119
  def abort(self): ...
120
120
  def is_empty(self) -> bool: ...
121
121
  def metrics(self) -> dict[str, Any]: ...
spiral/enrichment.py CHANGED
@@ -151,7 +151,8 @@ class Enrichment:
151
151
  logger.warning("Transaction not committed. No rows were read for enrichment.")
152
152
  return
153
153
 
154
- tx.commit(tx_dump=tx_dump)
154
+ # Always compact in distributed enrichment.
155
+ tx.commit(compact=True, tx_dump=tx_dump)
155
156
 
156
157
 
157
158
  @dataclasses.dataclass
spiral/transaction.py CHANGED
@@ -1,4 +1,5 @@
1
1
  import logging
2
+ from pathlib import Path
2
3
 
3
4
  from spiral.core.table import KeyRange
4
5
  from spiral.core.table import Transaction as CoreTransaction
@@ -95,18 +96,23 @@ class Transaction:
95
96
  """
96
97
  self._core.include(ops)
97
98
 
98
- def commit(self, *, tx_dump: str | None = None):
99
+ def commit(self, *, compact: bool = False, tx_dump: str | None = None):
99
100
  """Commit the transaction."""
100
- # TODO(marko): We can remove this when I have more trust in large tx commits.
101
101
  if tx_dump is not None:
102
102
  try:
103
- with open(tx_dump, "w") as f:
103
+ # Create parent directories if they don't exist
104
+ dump_path = Path(tx_dump)
105
+ dump_path.parent.mkdir(parents=True, exist_ok=True)
106
+
107
+ # Write operations to file
108
+ with open(dump_path, "w") as f:
104
109
  f.writelines([op.to_json() for op in self._core.ops()])
110
+
105
111
  logger.info(f"Transaction dumped to {tx_dump}")
106
112
  except Exception as e:
107
113
  logger.error(f"Failed to dump transaction to {tx_dump}: {e}")
108
114
 
109
- self._core.commit()
115
+ self._core.commit(compact=compact)
110
116
 
111
117
  def abort(self):
112
118
  """Abort the transaction."""