我正在尝试使用具有此签名的配置单元的反射功能:
reflect(class, method[, arg1[, arg2..]])
我想检查一下是否有一个专栏 c
有价值的 hello world !
包含 world
,于是我写道:
with a as
(select "hello world !" as c)
select reflect("java.lang.String",c ,"contains", "world") from a
但它不起作用,因为它不尊重签名,所以我尝试了这个
with a as
(select "hello world !" as c)
select reflect(reflect("java.lang.Object","toString",c) ,"contains", "world") from a
也没用!我想知道如何申请 reflect
给定列上的函数?
1条答案
按热度按时间jobtbby31#
反射2会有帮助。请参阅https://issues.apache.org/jira/browse/hive-20007
但是hashcode()不起作用。看到了吗https://github.com/apache/hive/blob/master/ql/src/java/org/apache/hadoop/hive/ql/udf/generic/genericudfreflect2.java#l86