ygo 1.0.6b0__py3-none-any.whl → 1.0.7__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.

Potentially problematic release.


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

qdf/qdf.py CHANGED
@@ -157,10 +157,24 @@ class QDF:
157
157
  ylog.warning(f"QDF.sql 失败:{len(self.failed)}/{len(exprs)}: \n {self.failed}")
158
158
  for expr in exprs_to_add:
159
159
  data = data.with_columns(expr).fill_nan(None)
160
+ new_expr_cache = dict()
160
161
  try:
161
162
  self.data = data.collect()
162
163
  final_df = self.data.select(*self.index, *exprs_to_add)
164
+ current_cols = set(self.data.columns)
165
+ # 缓存整理:只保留当前表达式的缓存
163
166
  self._expr_cache.update(self._cur_expr_cache)
167
+ for k, v in self._expr_cache.items():
168
+ if v in current_cols:
169
+ new_expr_cache[k] = v
170
+ self._expr_cache = new_expr_cache
164
171
  return final_df
165
172
  except Exception as e:
173
+ current_cols = set(self.data.columns)
174
+ # 缓存整理:只保留当前表达式的缓存
175
+ for k, v in self._expr_cache.items():
176
+ if v in current_cols:
177
+ new_expr_cache[k] = v
178
+ self._expr_cache = new_expr_cache
166
179
  raise PolarsError(message=f"LazyFrame.collect() 阶段出错\n{e}") from e
180
+
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: ygo
3
- Version: 1.0.6b0
3
+ Version: 1.0.7
4
4
  Project-URL: homepage, https://github.com/link-yundi/ygo
5
5
  Project-URL: repository, https://github.com/link-yundi/ygo
6
6
  Requires-Python: >=3.8
@@ -1,7 +1,7 @@
1
1
  qdf/__init__.py,sha256=XwH17ae6kX5Grhb_odgDqkNf6N-ambTVi3LoGzq1Fmc,7519
2
2
  qdf/errors.py,sha256=lJhhjDRdQOOKUFGlLQ9ELK4AexXBwYQSYus_V-kc5K8,1180
3
3
  qdf/expr.py,sha256=ck_BHMCV29Q8-szci1_v4ud964QI7JoRRcmA0ppupsc,8454
4
- qdf/qdf.py,sha256=mMNr6fn6oak1R2_LBGKcWvPdbmM6avxFHXI9lJmzXNU,6641
4
+ qdf/qdf.py,sha256=3ytyt_x4OvoAiMlpjePUpOkj7xr6MxTpefgWqkUu3QA,7252
5
5
  qdf/udf/__init__.py,sha256=DdrSGaCB__5C1YL0vd_5rjIB3KLrAKn3h3k9k50L0jA,313
6
6
  qdf/udf/base_udf.py,sha256=6VDaCIGNLJxZ7UsoIDWtTH6PzUDj89b8FiwN-TEat2g,3437
7
7
  qdf/udf/cs_udf.py,sha256=HT3EKBwAhOxOFDQnpfwb4YcMTT3-lqFXkdysdn5_FI4,3179
@@ -16,10 +16,10 @@ ycat/yck.py,sha256=FlGMBuKEngB4TwFXMp4P3dLg9IfFmUg3eDqXzQ0kQoI,2738
16
16
  ygo/__init__.py,sha256=FMN06Tfa8_oV26eklBZCtGTyHZ6MghHxHj4PS_FSXCA,222
17
17
  ygo/exceptions.py,sha256=4Kd92kpwpsXHJJkSv4OqcN--PEEvIGGvDDgOOsk68gg,385
18
18
  ygo/ygo.py,sha256=vCMUur_41yY0QB4gj8K5wBZHql_cbmANhI8QwPRCTmo,11613
19
- ygo-1.0.6b0.dist-info/licenses/LICENSE,sha256=6AKUWQ1xe-jwPSFv_H6FMQLNNWb7AYqzuEUTwlP2S8M,1067
19
+ ygo-1.0.7.dist-info/licenses/LICENSE,sha256=6AKUWQ1xe-jwPSFv_H6FMQLNNWb7AYqzuEUTwlP2S8M,1067
20
20
  ylog/__init__.py,sha256=2sIp4PHNoQMCi0QtIarTI4raACd7SdRHNY7fY5hKYwc,397
21
21
  ylog/core.py,sha256=jmz9JhklbVCQz-zahEXV6P-LEHnqU6opnY4CUEyo8Ss,7924
22
- ygo-1.0.6b0.dist-info/METADATA,sha256=1aSVsl0EZMP7YzHEW1omgNvKY6TE3QbW_rOhnNqBIFU,2078
23
- ygo-1.0.6b0.dist-info/WHEEL,sha256=Nw36Djuh_5VDukK0H78QzOX-_FQEo6V37m3nkm96gtU,91
24
- ygo-1.0.6b0.dist-info/top_level.txt,sha256=FGbsOtsHgqWzZ9mGRSTCg0pLZEErR1lq5TFQSy2TL1w,18
25
- ygo-1.0.6b0.dist-info/RECORD,,
22
+ ygo-1.0.7.dist-info/METADATA,sha256=H51qnRW-1SqUmbFA_chW7JODCGGdKj-wig2fSlQbv4U,2076
23
+ ygo-1.0.7.dist-info/WHEEL,sha256=Nw36Djuh_5VDukK0H78QzOX-_FQEo6V37m3nkm96gtU,91
24
+ ygo-1.0.7.dist-info/top_level.txt,sha256=FGbsOtsHgqWzZ9mGRSTCg0pLZEErR1lq5TFQSy2TL1w,18
25
+ ygo-1.0.7.dist-info/RECORD,,
File without changes