【发布时间】:2020-08-25 19:08:34
【问题描述】:
我尝试用谷歌搜索它,但我不太了解文档。谁能解释一下这行代码的作用。
它是 Hive UDF 的一部分。我不完全理解 LongWritable 或 1L 的含义。
public class CustomUDF extends UDF {
public LongWritable evaluate(Text schema) { // what is Text schema??
if (schema == null) {
return null;
}
try {
return new LongWritable(1l); // what does this do??
} catch (Exception ex) {
// catch error
}
}
}
我是 Hive UDF 的新手,我无法理解这种方法。谢谢!!
【问题讨论】:
标签: java hive schema user-defined-functions