ygg 0.1.38__py3-none-any.whl → 0.1.39__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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: ygg
3
- Version: 0.1.38
3
+ Version: 0.1.39
4
4
  Summary: Type-friendly utilities for moving data between Python objects, Arrow, Polars, Pandas, Spark, and Databricks
5
5
  Author: Yggdrasil contributors
6
6
  License: Apache License
@@ -1,6 +1,6 @@
1
- ygg-0.1.38.dist-info/licenses/LICENSE,sha256=HrhfyXIkWY2tGFK11kg7vPCqhgh5DcxleloqdhrpyMY,11558
1
+ ygg-0.1.39.dist-info/licenses/LICENSE,sha256=HrhfyXIkWY2tGFK11kg7vPCqhgh5DcxleloqdhrpyMY,11558
2
2
  yggdrasil/__init__.py,sha256=PfH7Xwt6uue6oqe6S5V8NhDJcVQClkKrBE1KXhdelZc,117
3
- yggdrasil/version.py,sha256=pPo3-5ffVm5NbQms9PN259Sjq7R-Q9UY4HYJ8M2iom4,22
3
+ yggdrasil/version.py,sha256=CJmriEgb-Ey3LByW34C3xKdLEpasYF_SIpGuURosS7U,22
4
4
  yggdrasil/databricks/__init__.py,sha256=skctY2c8W-hI81upx9F_PWRe5ishL3hrdiTuizgDjdw,152
5
5
  yggdrasil/databricks/compute/__init__.py,sha256=NvdzmaJSNYY1uJthv1hHdBuNu3bD_-Z65DWnaJt9yXg,289
6
6
  yggdrasil/databricks/compute/cluster.py,sha256=mnNzjCx7X3iK22oZ7K3pqot0AXq9JTdg97kT61j2_UU,40729
@@ -11,7 +11,7 @@ yggdrasil/databricks/jobs/config.py,sha256=9LGeHD04hbfy0xt8_6oobC4moKJh4_DTjZiK4
11
11
  yggdrasil/databricks/sql/__init__.py,sha256=y1n5yg-drZ8QVZbEgznsRG24kdJSnFis9l2YfYCsaCM,234
12
12
  yggdrasil/databricks/sql/engine.py,sha256=Azx3gKtWOMy3D9I2FhkLmpthZPWAJZ9iZkaDivmt_0s,41002
13
13
  yggdrasil/databricks/sql/exceptions.py,sha256=Jqd_gT_VyPL8klJEHYEzpv5eHtmdY43WiQ7HZBaEqSk,53
14
- yggdrasil/databricks/sql/statement_result.py,sha256=tik53oB7Eq6nA4Unv8qH6fe9RJJO9HcumI5BAkW3omA,16684
14
+ yggdrasil/databricks/sql/statement_result.py,sha256=_mBolHae0AASfe1Tlld1KTXs-K4-oy9dniHDyR2ILYc,16736
15
15
  yggdrasil/databricks/sql/types.py,sha256=5G-BM9_eOsRKEMzeDTWUsWW5g4Idvs-czVCpOCrMhdA,6412
16
16
  yggdrasil/databricks/workspaces/__init__.py,sha256=Ti1I99JTC3koYJaCy8WYvkAox4KdcuMRk8b2rHroWCY,133
17
17
  yggdrasil/databricks/workspaces/filesytem.py,sha256=Z8JXU7_XUEbw9fpTQT1avRQKi-IAP2KemXBMPkUoY4w,9805
@@ -55,8 +55,8 @@ yggdrasil/types/cast/registry.py,sha256=_zdFGmUBB7P-e_LIcJlOxMcxAkXoA-UXB6HqLMgT
55
55
  yggdrasil/types/cast/spark_cast.py,sha256=_KAsl1DqmKMSfWxqhVE7gosjYdgiL1C5bDQv6eP3HtA,24926
56
56
  yggdrasil/types/cast/spark_pandas_cast.py,sha256=BuTiWrdCANZCdD_p2MAytqm74eq-rdRXd-LGojBRrfU,5023
57
57
  yggdrasil/types/cast/spark_polars_cast.py,sha256=btmZNHXn2NSt3fUuB4xg7coaE0RezIBdZD92H8NK0Jw,9073
58
- ygg-0.1.38.dist-info/METADATA,sha256=2G6ZcCvdN5TLyP9Z7z3GHQio7xjzBCd-ZEOO2qnL2Yc,19204
59
- ygg-0.1.38.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
60
- ygg-0.1.38.dist-info/entry_points.txt,sha256=6q-vpWG3kvw2dhctQ0LALdatoeefkN855Ev02I1dKGY,70
61
- ygg-0.1.38.dist-info/top_level.txt,sha256=iBe9Kk4VIVbLpgv_p8OZUIfxgj4dgJ5wBg6vO3rigso,10
62
- ygg-0.1.38.dist-info/RECORD,,
58
+ ygg-0.1.39.dist-info/METADATA,sha256=RfbFhLCQfG6s5EO95X0zwf40BZ3SatH5rF5FfoTdIxE,19204
59
+ ygg-0.1.39.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
60
+ ygg-0.1.39.dist-info/entry_points.txt,sha256=6q-vpWG3kvw2dhctQ0LALdatoeefkN855Ev02I1dKGY,70
61
+ ygg-0.1.39.dist-info/top_level.txt,sha256=iBe9Kk4VIVbLpgv_p8OZUIfxgj4dgJ5wBg6vO3rigso,10
62
+ ygg-0.1.39.dist-info/RECORD,,
@@ -195,6 +195,7 @@ class StatementResult:
195
195
  Returns:
196
196
  The result manifest or None for Spark SQL results.
197
197
  """
198
+ self.wait()
198
199
  return self.response.manifest
199
200
 
200
201
  @property
@@ -204,6 +205,7 @@ class StatementResult:
204
205
  Returns:
205
206
  The statement result payload from the API.
206
207
  """
208
+ self.wait()
207
209
  return self.response.result
208
210
 
209
211
  @property
@@ -253,7 +255,6 @@ class StatementResult:
253
255
  self, self.disposition, Disposition.EXTERNAL_LINKS
254
256
  )
255
257
 
256
- self.wait()
257
258
  result_data = self.result
258
259
  wsdk = self.workspace.sdk()
259
260
 
@@ -320,6 +321,8 @@ class StatementResult:
320
321
  f"Statement {self.statement_id} {self.state}: " + " | ".join(parts)
321
322
  )
322
323
 
324
+ return self
325
+
323
326
  def wait(
324
327
  self,
325
328
  timeout: Optional[int] = None,
@@ -339,20 +342,21 @@ class StatementResult:
339
342
 
340
343
  start = time.time()
341
344
  poll_interval = poll_interval or 1
342
- current = self
343
345
 
344
346
  while not self.done:
345
347
  # still running / queued / pending
346
348
  if timeout is not None and (time.time() - start) > timeout:
347
349
  raise TimeoutError(
348
- f"Statement {current.statement_id} did not finish within {timeout} seconds "
349
- f"(last state={current})"
350
+ f"Statement {self.statement_id} did not finish within {timeout} seconds "
351
+ f"(last state={self.state})"
350
352
  )
351
353
 
352
354
  poll_interval = max(10, poll_interval * 1.2)
353
355
  time.sleep(poll_interval)
354
356
 
355
- return current
357
+ self.raise_for_status()
358
+
359
+ return self
356
360
 
357
361
  def arrow_schema(self):
358
362
  """Return the Arrow schema for the result.
yggdrasil/version.py CHANGED
@@ -1 +1 @@
1
- __version__ = "0.1.38"
1
+ __version__ = "0.1.39"
File without changes