ParseException in Hive



我试图在hive中使用UDF。但是当我尝试使用userdate as 'unixtimeToDate'创建临时函数时,我得到了这个异常

hive> create temporary function userdate1 as 'unixtimeToDate';
FAILED: ParseException line 1:25 character ' ' not supported here
line 1:35 character ' ' not supported here

我不确定为什么不支持这个字符。

这里的异常非常清楚,您的SQL中有一个错误。在SQL中有一个全宽度空间。关于Halfwidth_and_fullwidth_forms的更多信息

hive> create temporary function userdate1 as 'unixtimeToDate';
                                        ^^^here, you have a full width space

org.apache.spark.sql。analyisexception: line ..此处不支持字符' '

在我的情况下,这是因为' '不是正常的space

下面是在hive

中添加jar的语法
ADD JAR absolute_path_of_jar_file;
CREATE TEMPORARY FUNCTION function_name AS 'packagename.ClassName';

最新更新