Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[SPARK-30339][SQL][2.4] Avoid to fail twice in function lookup
### What changes were proposed in this pull request? Backported from [pr#26994](#26994). Currently if function lookup fails, spark will give it a second chance by casting decimal type to double type. But for cases where decimal type doesn't exist, it's meaningless to lookup again and cause extra cost like unnecessary metastore access. We should throw exceptions directly in these cases. ### Does this PR introduce any user-facing change? No. ### How was this patch tested? Covered by existing tests. Closes #27054 from wzhfy/avoid_udf_fail_twice-2.4. Authored-by: Zhenhua Wang <wzh_zju@163.com> Signed-off-by: Zhenhua Wang <wzh_zju@163.com>
- Loading branch information