Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
None
Description
This one took me some time to understand, but I finally have a reproducible example: when two udfs are called, one after the other, we cause a deadlock when creating the physical plan.
Example test
#[test] fn csv_query_sqrt_sqrt() -> Result<()> { let mut ctx = create_ctx()?; register_aggregate_csv(&mut ctx)?; let sql = "SELECT sqrt(sqrt(c12)) FROM aggregate_test_100 LIMIT 1"; let actual = execute(&mut ctx, sql); // sqrt(sqrt(c12=0.9294097332465232)) = 0.9818650561397431 let expected = "0.9818650561397431".to_string(); assert_eq!(actual.join("\n"), expected); Ok(()) }
I believe that this is due to the recursive nature of the physical planner, that locks scalar_functions within a match, which blocks the whole thing.