Skip to content

Commit e59deaa

Browse files
committed
fix(physical-expr): stack overflow protection
Add the recursive annotation to create_physical_expr to protect from a stack overflow occuring due to some pathalogical query expressions.
1 parent dfdd855 commit e59deaa

6 files changed

Lines changed: 6 additions & 3 deletions

File tree

Cargo.lock

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

datafusion-testing

Submodule datafusion-testing updated 87 files

datafusion/physical-expr/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ itertools = { workspace = true, features = ["use_std"] }
5555
parking_lot = { workspace = true }
5656
paste = "^1.0"
5757
petgraph = "0.8.3"
58+
recursive = { workspace = true }
5859

5960
[dev-dependencies]
6061
arrow = { workspace = true, features = ["test_utils"] }

datafusion/physical-expr/src/planner.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,7 @@ use datafusion_expr::{
105105
/// * `e` - The logical expression
106106
/// * `input_dfschema` - The DataFusion schema for the input, used to resolve `Column` references
107107
/// to qualified or unqualified fields by name.
108+
#[recursive::recursive]
108109
pub fn create_physical_expr(
109110
e: &Expr,
110111
input_dfschema: &DFSchema,

parquet-testing

Submodule parquet-testing updated 292 files

testing

Submodule testing updated 131 files

0 commit comments

Comments
 (0)