Hive 配置单元中的ParseException

Hive 配置单元中的ParseException,hive,Hive,我正在尝试在蜂箱中使用UDF。但是,当我尝试使用userdate作为“unixtimeToDate”创建一个临时函数时,我得到了这个异常 hive> create temporary function userdate1 as 'unixtimeToDate'; FAILED: ParseException line 1:25 character ' ' not supported here line 1:35 character ' ' not supported here 我不知道为

我正在尝试在蜂箱中使用UDF。但是,当我尝试使用userdate作为“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中有一个全宽空间。更多关于


下面是在配置单元中添加jar的语法

ADD JAR absolute_path_of_jar_file;
CREATE TEMPORARY FUNCTION function_name AS 'packagename.ClassName';
org.apache.spark.sql.AnalysisException:行。。此处不支持字符“”


在我的情况下,这是因为“”不是正常的空格。我把它们全部替换了,没关系。

我在DbVis中面临这个问题,您是如何用空格替换空格的?
ADD JAR absolute_path_of_jar_file;
CREATE TEMPORARY FUNCTION function_name AS 'packagename.ClassName';