Failure to collect operations that join two lazily retrieved Polars lazyframes
- 主要言語
- Python
- スター
- 187
- フォーク
- 112
- 平均マージ
- 13時間 29分
- マージ済み PR(30日)
- 17
説明
### What happens?
I have downstream functions that expect multiple `polars.LazyFrame` objects. In my upstream code, I want to source my data from DuckDB to enable efficient pushdown. However, using `DuckDBPyRelation.pl(lazy=True)` raises a `ComputeError` when operating on multiple `LazyFrame` objects.
### To Reproduce
```python
import duckdb
with duckdb.connect() as con:
con.sql("CREATE TABLE tbl (t1 INTEGER)")
con.sql("CREATE TABLE tbl2 (t1 INTEGER)")
# Retrieve the results
rel = con.table("tbl").pl(lazy=True)
rel2 = con.table("tbl2").pl(lazy=True)
# Compute and raise the error
df = rel.join(rel2, on="t1", how="inner").collect()
```
the block above raises
```
ComputeError: caught exception during execution of a Python source, exception: InvalidInputException: Invalid Input Error: Attempting to execute an unsuccessful or closed pending query result
```
### OS:
Linux - aarch64
### DuckDB Package Version:
1.5.5
### Python Version:
3.12
### Full Name:
Akshay Gupta
### Affiliation:
Capital One
### 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?
Yes
### Did you include all code required to reproduce the issue?
- [x] Yes, I have
### Did you include all relevant configuration to reproduce the issue?
- [x] Yes, I have
コントリビューションガイド
調査の方向性
DuckDBPyRelation.pl(lazy=True) から始め、Polars を介して結合された 2 つのリレーションで失敗を再現し、その後 rel.join(...).collect() まで実行経路を追跡します。提供された例が正常に collect され、ComputeError なしで結合結果を返せば完了です。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- python
- 領域
- databases
- issue の種類
- バグ
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 活発さ
- 静か
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 68/100