fmonjalet opened a new issue, #16030:
URL: https://github.com/apache/datafusion/issues/16030

   ### Describe the bug
   
   When [translating a substrait scalar function 
call](https://github.com/fmonjalet/datafusion/blob/b7060c143c3eede8f49f8b51d92e184043e3a081/datafusion/substrait/src/logical_plan/consumer/expr/scalar_function.rs#L25)
 to DataFusion logical plan, when the function name [translates to a binary 
operator](https://github.com/fmonjalet/datafusion/blob/b7060c143c3eede8f49f8b51d92e184043e3a081/datafusion/substrait/src/logical_plan/consumer/expr/scalar_function.rs#L78)
 and has a large number of arguments (say 2000), further processing of this 
logical plan result in stack overflow.
   
   ### To Reproduce
   
   [This 
commit](https://github.com/apache/datafusion/commit/fd13db09dd76ea888f7dc43340a4b3b7a316f038)
 contains a reproducer plan and test. The plan is pretty large (because a lot 
of arguments are required to see the stack overflow), but pretty simple: it's 
an `OR(col == a, col ==b, col == c, ..., col == x)`. We could argue that this 
precise example should actually be a substrait `SingularOrList`, but the issue 
can be triggered all the same with other operators and expressions.
   
   ### Expected behavior
   
   No stack overflow or crash. At best, the plan is accepted and executed, at 
worst DataFusion returns a clean error.
   
   ### Additional context
   
   _No response_


-- 
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...@datafusion.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscr...@datafusion.apache.org
For additional commands, e-mail: github-h...@datafusion.apache.org

Reply via email to