apache / apache/datafusion-python

Build fails against DataFusion 54.1.0 due to new `schema` field on `RecursiveQuery`

Đang mở Phù hợp với người mới
#1,644 0 bình luận 0 reaction 0 người được giao Xem trên GitHub
bug
Ngôn ngữ chính
Python
Star
604
Fork
174
Merge trung bình
1 ngày 7 giờ
Pull request đã merge (30 ngày)
4

Mô tả

**Describe the bug**

`datafusion-python` does not build against DataFusion 54.1.0. The workspace
dependencies are declared as `version = "54"`, so Cargo is free to resolve them
to 54.1.0, but the crate no longer compiles when it does:

```
error[E0063]: missing field `schema` in initializer of `datafusion::logical_expr::RecursiveQuery`
--> crates/core/src/expr/recursive_query.rs:72:20
|
72 | query: RecursiveQuery {
| ^^^^^^^^^^^^^^ missing `schema`
```

DataFusion 54.1.0 added a `schema: DFSchemaRef` field to
`datafusion_expr::logical_plan::RecursiveQuery` and introduced
`RecursiveQuery::try_new()`, which computes that schema by reconciling the
static and recursive terms. Our `PyRecursiveQuery::new()` builds the struct
with a literal initializer, so the new field breaks it.

**To Reproduce**

With a `Cargo.lock` that resolves DataFusion to 54.1.0 (e.g. a fresh checkout
without the committed lock file, or after `cargo update -p datafusion --precise
54.1.0`):

```sh
cargo check --workspace --all-targets
```

**Expected behavior**

`datafusion-python` builds and tests against DataFusion 54.1.0.

**Additional context**

Because the existing version requirements are `"54"`, this is not limited to
developers who explicitly opt in — any consumer resolving the dependency fresh
picks up 54.1.0 and hits the failure. The fix is to use
`RecursiveQuery::try_new()` and pin the workspace requirements to `"54.1"`.

Hướng dẫn đóng góp

Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này

Hướng nghiên cứu

Start in crates/core/src/expr/recursive_query.rs at the PyRecursiveQuery::new() initializer and inspect the workspace DataFusion dependency requirements. Run cargo check --workspace --all-targets with DataFusion 54.1.0; done means the constructor and dependency requirements support that release and the workspace builds and tests successfully.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Đánh giá

Công nghệ
python, rust
Lĩnh vực
build-system
Loại issue
Lỗi
Độ khó
2/5
Thời gian dự kiến
1-3 giờ
Mức độ hoạt động
Ít trao đổi
Độ rõ ràng
Đặc tả rõ ràng
Mức phù hợp với người mới
78/100

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.