adriangb commented on PR #16461:
URL: https://github.com/apache/datafusion/pull/16461#issuecomment-3004580959

   > Every invocation in the evaluator will loop over rows to build child 
arrays, then pack them into a StructArray
   
   As far as I know a PhysicalExpr can operate at the array level. For example 
`lit(ScalarValue::Null). into_array(N)` will end up calling `new_null_array` as 
well after a a couple function call hops: 
   
   
https://github.com/apache/datafusion/blob/e3d3302161d382b9219c4536ad5ec0ce93690ba8/datafusion/common/src/scalar/mod.rs#L2672
   
   I think 3-4 function call hops would be an issue if it did happen for every 
row but it's happening at the array level - it's going to be inconsequential 
compared to the IO happening, etc.
   
   > There’s no built-in “struct constructor” expression in DataFusion
   
   Isn't there 
https://datafusion.apache.org/user-guide/sql/scalar_functions.html#struct? I'm 
sure we can call that ourselves without SQL: 
   
   
https://github.com/apache/datafusion/blob/e3d3302161d382b9219c4536ad5ec0ce93690ba8/datafusion/functions/src/core/struct.rs#L53-L71


-- 
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

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