1
저는 스 카라에 초보자이며 하이브에 정수 배열을 가진 열을 처리하기 위해 사용자 정의 함수를 작성해야합니다 (유형 array<int>
).스칼라에서 정수 배열을 처리하기위한 하이브 UDF
나는 시도했다 :
import org.apache.hadoop.hive.ql.exec.UDF
class testUDF extends UDF {
def evaluate(arr: Array[Int], txt: String): Boolean = {
return false
}
}
을하지만 시도 할 때 SQL에 전화를 내가 가지고 오류 : 나는 배열 열의와 함께 작동하도록 스칼라에서 사용할 필요가 어떤 종류의
No matching method for class ... with (array<int>, string). Possible choices: _FUNC_(struct<>, string)
하이브?
당신이 (writable'') 하둡 데이터 유형을 사용해야합니다 - http://hadooptutorial.info/hadoop-data-types/ –