Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[SPARK-44719][SQL] Fix NoClassDefFoundError when using Hive UDF
### What changes were proposed in this pull request? This PR changes jackson-mapper-asl's scope from `test` to `${hive.deps.scope}`. ### Why are the changes needed? Fix `NoClassDefFoundError` when using Hive UDF: ``` spark-sql (default)> add jar /Users/yumwang/Downloads/HiveUDFs-1.0-SNAPSHOT.jar; Time taken: 0.413 seconds spark-sql (default)> CREATE TEMPORARY FUNCTION long_to_ip as 'net.petrabarus.hiveudfs.LongToIP'; Time taken: 0.038 seconds spark-sql (default)> SELECT long_to_ip(2130706433L) FROM range(10); 23/08/08 20:17:58 ERROR SparkSQLDriver: Failed in [SELECT long_to_ip(2130706433L) FROM range(10)] java.lang.NoClassDefFoundError: org/codehaus/jackson/map/type/TypeFactory at org.apache.hadoop.hive.ql.udf.UDFJson.<clinit>(UDFJson.java:64) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:348) ... ``` ### Does this PR introduce _any_ user-facing change? No. ### How was this patch tested? manual test. Closes #42446 from wangyum/SPARK-44719. Authored-by: Yuming Wang <[email protected]> Signed-off-by: Kent Yao <[email protected]>
- Loading branch information