NGA-TRAN commented on a change in pull request #1047:
URL: https://github.com/apache/arrow-datafusion/pull/1047#discussion_r715700618
##########
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:
🎉
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]