datafusion-comet
datafusion-comet copied to clipboard
[EPIC] Support try_* functions which always return NULL instead of runtime errors
Spark adds a lot of try_* functions in the recent two years, which always return NULL instead of runtime errors. The list is as follows:
- [ ] try_add
- [ ] try_divide
- [ ] try_subtract
- [ ] try_multiply
- [ ] try_element_at
- [ ] try_avg
- [ ] try_sum
- [ ] try_to_binary
- [ ] try_to_timestamp
- [ ] try_aes_decrypt
- [x] ~~try_reflect~~ (cannot be supported in Comet?)
- [ ] try_cast (part of https://github.com/apache/datafusion-comet/issues/286)
We should add support to these functions too. It could be implemented in Comet first then contributed back to upstream DataFusion.
Originally posted by @viirya in https://github.com/apache/arrow-datafusion-comet/pull/277#discussion_r1568139442
I added try_cast to the list, with a link to the cast epic