ComputeError: caught exception during execution of a Python source
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
调研方向
首先运行提供的 DuckDB Python 复现代码,其中包含两个 Lazy DataFrames 和 join,然后检查 LazyFrame.explain(optimized=True) 的输出以及 Python .pl(lazy=True) 集成路径。只要 join 和 collect 能够成功完成且不出现 closed pending query result 错误,即视为完成;机密数据集可能会限制验证。
由索引模型根据 Issue 内容生成。
描述
What happens?
First of all nice, feature with the lazy DataFrame. I have a problem with this new feature in duckdb v1.4.1 also tested with 1.4.0 and polars version 1.34.0, but also tested with versions earlier than this.
Mostly the first loading and filtering ... with pl(lazy = True) works but e.g. joins with other tables are not working and results in this Error:
ComputeError: caught exception during execution of a Python source, exception: InvalidInputException: Invalid Input Error: Attempting to execute an unsuccessful or closed pending query result.
Full Trace:
File ~/.venv/lib/python3.9/site-packages/polars/_utils/deprecation.py:97, in deprecate_streaming_parameter.<locals>.decorate.<locals>.wrapper(*args, **kwargs)
93 kwargs["engine"] = "in-memory"
95 del kwargs["streaming"]
---> [97](https://vscode-remote+ssh-002dremote-002b7b22686f73744e616d65223a225468726f6d626f7365227d.vscode-resource.vscode-cdn.net/home/cdsw/notebooks/~/.venv/lib/python3.9/site-packages/polars/_utils/deprecation.py:97) return function(*args, **kwargs)
File ~/.venv/lib/python3.9/site-packages/polars/lazyframe/opt_flags.py:328, in forward_old_opt_flags.<locals>.decorate.<locals>.wrapper(*args, **kwargs)
325 optflags = cb(optflags, kwargs.pop(key)) # type: ignore[no-untyped-call,unused-ignore]
327 kwargs["optimizations"] = optflags
--> [328](https://vscode-remote+ssh-002dremote-002b7b22686f73744e616d65223a225468726f6d626f7365227d.vscode-resource.vscode-cdn.net/home/cdsw/notebooks/~/.venv/lib/python3.9/site-packages/polars/lazyframe/opt_flags.py:328) return function(*args, **kwargs)
File ~/.venv/lib/python3.9/site-packages/polars/lazyframe/frame.py:2415, in LazyFrame.collect(self, type_coercion, predicate_pushdown, projection_pushdown, simplify_expression, slice_pushdown, comm_subplan_elim, comm_subexpr_elim, cluster_with_columns, collapse_joins, no_optimization, engine, background, optimizations, **_kwargs)
2413 # Only for testing purposes
2414 callback = _kwargs.get("post_opt_callback", callback)
-> [2415](https://vscode-remote+ssh-002dremote-002b7b22686f73744e616d65223a225468726f6d626f7365227d.vscode-resource.vscode-cdn.net/home/cdsw/notebooks/~/.venv/lib/python3.9/site-packages/polars/lazyframe/frame.py:2415) return wrap_df(ldf.collect(engine, callback))
To Reproduce
con = duckdb.connect(db.db_path, read_only= True)
df_lab = con.sql("SELECT * FROM data1").pl(lazy = True)
df_main = con.sql("SELECT * FROM data2").pl(lazy = True)
df_lab.join(df_main, on = "account_id").collect()
this would be the LazyFrame:
naive plan: (run LazyFrame.explain(optimized=True) to see the optimized plan)
INNER JOIN:
LEFT PLAN ON: [col("account_id")]
PYTHON SCAN []
PROJECT */10 COLUMNS
RIGHT PLAN ON: [col("account_id")]
PYTHON SCAN []
PROJECT */70 COLUMNS
END INNER JOIN
OS:
linux
DuckDB Version:
1.41.0
DuckDB Client:
Python
Hardware:
No response
Full Name:
Maximilian Zeidler
Affiliation:
Helios
What is the latest build you tested with? If possible, we recommend testing with the latest nightly build.
I have tested with a stable release
Did you include all relevant data sets for reproducing the issue?
No - I cannot share the data sets because they are confidential
Did you include all code required to reproduce the issue?
- Yes, I have
Did you include all relevant configuration (e.g., CPU architecture, Python version, Linux distribution) to reproduce the issue?
- Yes, I have
- 主要语言
- Python
- 星标
- 189
- 派生
- 117
- 平均合并
- 1 天 58 分钟
- 30 天内合并 PR
- 15
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
duckdb/duckdb-python 的其他 Issue
-
`overwrite` parameter in `to_parquet` does nothing可能已有人在做 @00200200 于 6 天前认领。 未关闭needs triage
难度 2/5 1-3 小时 新手友好度 75/100
duckdb/duckdb-python#633 · 1 条评论 ·
维护者通常 1 天内回复
-
Type stubs omit the `connection` keyword on module-level `read_json` and `write_csv`可能已有人在做 @tojacob03 于 6 天前认领。 未关闭
难度 2/5 1-3 小时 新手友好度 90/100
duckdb/duckdb-python#627 · 1 条评论 ·
维护者通常 1 天内回复
-
`read_json` accepts a list of paths at runtime but the type stub only allows a single path.可能已有人在做 @aleks-drozy 于 64 天前认领。 未关闭needs triage
难度 2/5 1-3 小时 新手友好度 78/100
duckdb/duckdb-python#576 · 3 条评论 ·
维护者通常 1 天内回复
-
needs triage
难度 2/5 1-3 小时 新手友好度 76/100
duckdb/duckdb-python#534 ·
维护者通常 1 天内回复
-
Missing ROW_GROUPS_PER_FILE argument in write_parquet function可能已有人在做 关联的 PR 仍在进行中或已合并。 未关闭needs triage
难度 2/5 1-3 小时 新手友好度 68/100
duckdb/duckdb-python#386 ·
维护者通常 1 天内回复
查看 duckdb/duckdb-python 的全部 Issue
相似的 Issue
-
needs-human needs-triage
难度 2/5 1-3 小时 新手友好度 76/100
gke-labs/kube-agents#2400 · 1 条评论 ·
维护者通常 1 天内回复
-
Device Details tables: FS/SF columns contradict each other (nfet_01v8 Vt row, pfet_01v8 Idsat row)未关闭
难度 2/5 1-3 小时 新手友好度 75/100
google/skywater-pdk#450 ·
-
Drained trajectory arrays are overwritten when the sequence buffer is reused可能已有人在做 @sylvesterkaczmarek 今天认领。 未关闭
难度 2/5 1-3 小时 新手友好度 78/100
google-deepmind/bsuite#56 ·
-
难度 2/5 1-3 小时 新手友好度 82/100
LearningCircuit/local-deep-research#7206 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 68/100
chingu-voyages/V62-tier3-team-33#285 ·
维护者通常 1 天内回复