alamb commented on a change in pull request #1047: URL: https://github.com/apache/arrow-datafusion/pull/1047#discussion_r715677104
########## File path: datafusion/src/physical_plan/expressions/binary.rs ########## @@ -1381,4 +1416,37 @@ mod tests { )) } } + + #[test] + fn relatively_deeply_nested() { + // Reproducer for https://github.com/apache/arrow-datafusion/issues/419 + + // where even relatively shallow binary expressions overflowed + // the stack in debug builds + + let input: Vec<_> = vec![1, 2, 3, 4, 5].into_iter().map(Some).collect(); + let a: Int32Array = input.iter().collect(); + + let batch = RecordBatch::try_from_iter(vec![("a", Arc::new(a) as _)]).unwrap(); + let schema = batch.schema(); + + // build a left deep tree ((((a + a) + a) + a .... + let tree_depth: i32 = 100; Review comment: On master, this test causes a stack overflow with `tree_depth` of `10`. After the changes in this PR it passes successfully with a tree_depth of 100 (I didn't try any bigger) ########## File path: datafusion/src/physical_plan/expressions/binary.rs ########## @@ -543,86 +543,17 @@ impl PhysicalExpr for BinaryExpr { ))); } + // Attempt to use special kernels if one input is scalar and the other is an array Review comment: There are no intended changes to this function's behavior, simply breaking it up into several smaller functions ########## File path: .github/workflows/rust.yml ########## @@ -105,8 +105,6 @@ jobs: run: | export ARROW_TEST_DATA=$(pwd)/testing/data export PARQUET_TEST_DATA=$(pwd)/parquet-testing/data - # run tests on all workspace members with default feature list + avro Review comment: This is the workaround added in #910 -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: github-unsubscr...@arrow.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org