HIVE内置函数map_keys
所在的全类名
org.apache.hadoop.hive.ql.udf.generic.GenericUDFMapKeys
一、initialize方法
@Override
public ObjectInspector initialize(ObjectInspector[] arguments)
throws UDFArgumentException {
// 传入的参数为1个
if (arguments.length != 1) {
throw new UDFArgumentLengthException("The function MAP_KEYS only accepts one argument.");
} else if (!(arguments[0] instanceof MapObjectInspector)) {
// 参数类型应该是MAP类型
throw new UDFArgumentTypeException(0, "\""
+ Category.MAP.toString().toLowerCase()
+ "\" is expected at function MAP_KEYS, " + "but \""

本文详细解析了HIVE内置函数map_keys的源码,包括initialize方法和evaluate方法,探讨了列表的生成过程,并介绍了getDisplayString和getStandardDisplayString的相关功能。
最低0.47元/天 解锁文章
7782

被折叠的 条评论
为什么被折叠?



