andygrove commented on pull request #7967: URL: https://github.com/apache/arrow/pull/7967#issuecomment-682598627
Hi @jorgecarleitao and @alamb I've been thinking about this specific change some more, and I am not sure it is such a good idea to have dynamic typing when it comes to the output type of a scalar function. If I have a query that uses `sqrt` for example, I would now have to always check the return type in the plan to know what type to cast to (`f32` or `f64`) because I could get a different type each time I run it, depending on the types in the input data. I think it would be better for scalar functions to have deterministic output types and this would be consistent with how other query engines are designed. In the cast of `sqrt`, I think it would make sense to support a specific `sqrt_32` version though, as I think @alamb suggested at some point. Let me know what you think. ---------------------------------------------------------------- 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. For queries about this service, please contact Infrastructure at: [email protected]
