Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

Upgrade DataFusion for the unparser stack-overflow fix

Aperta Adatta ai principianti
#8,225 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 3 giorni

Nessuno ha ancora preso questa issue.

  • #8228 di @lance-gatefixer — chiusa senza merge

Valutazione

Difficoltà
2/5
Tempo stimato
1-3 ore
Idoneità per principianti
72/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Tranquilla
Stack tecnologico
rust
Ambito
build-system

Direzione di ricerca

Inizia in Cargo.toml, controllando le versioni bloccate della dipendenza DataFusion e la configurazione delle feature, quindi esamina il fix upstream collegato e identifica la prima release che lo contiene. Usa la riproduzione fornita con Cargo.toml e src/main.rs per verificare che l’espressione profondamente annidata non provochi più un abort; il lavoro è completato quando Lance abilita recursive_protection e usa una release corretta di DataFusion.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

Description

Lance main pins the DataFusion crate family to 54.0.0. In that dependency graph, datafusion_sql::unparser::Unparser::expr_to_sql can exhaust the process stack while converting a deeply nested expression to SQL.

DataFusion tracks this as apache/datafusion#23056, and the fix was merged in apache/datafusion#23058 at commit f9c1e9ed. The latest released DataFusion tag, 54.1.0, does not contain that fix, so Lance will need to update to the first release that includes it or temporarily carry an equivalent patch.

The upstream stack protection is gated by DataFusion's recursive_protection feature. DataFusion includes this feature in its default feature set, but Lance disables DataFusion default features and does not currently enable recursive_protection. The dependency update should enable that feature explicitly; changing only the version would not activate the protection.

No direct call from Lance to Unparser was identified in the pinned Lance source. This report requests dependency hardening and does not claim a demonstrated Lance API path to the crash.

Steps to reproduce

Create an empty directory with these two files.

Cargo.toml:

[package]
name = "repro-datafusion-unparser-stack-overflow"
version = "0.1.0"
edition = "2021"

[dependencies]
datafusion-expr = "=54.0.0"
datafusion-sql = "=54.0.0"

src/main.rs:

use datafusion_expr::{col, lit, Expr};
use datafusion_sql::unparser::Unparser;

const DEPTH: usize = 100_000;

fn main() {
    let mut expr: Expr = col("value");
    for _ in 0..DEPTH {
        expr = expr + lit(1_i64);
    }

    let _ = Unparser::default().expr_to_sql(&expr);
}

Run:

cargo run
Expected behavior

Lance should use a DataFusion version containing #23058 and enable recursive_protection, so dependency consumers that unparse deeply nested expressions do not abort the process.

Lance version

v10.1.0-beta.2 (94cca93d13b1c731afd6660d46ad2f8d4b4345c4); Lance main at 51da66d4b21990e3af28a4ea5b8be8166dd529a4 still pins DataFusion 54.0.0.

Language binding

Rust

Environment

Fedora Linux 44, x86_64, rustc 1.97.1

Logs / traceback
thread 'main' has overflowed its stack
fatal runtime error: stack overflow, aborting
Lingua principale
Rust
Stelle
7.2k
Fork
900
Merge medio
5g 2h
PR unite (30g)
405

Preparare l'ambiente

Apri in Codespaces

Avvia il container di sviluppo del progetto nel browser, con il tuo account GitHub.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di lance-format/lance

Tutte le issue di lance-format/lance

Issue simili

Altre issue su Rust

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.