1
私はスカラーの初心者です。ハイブに整数の配列を持つ列を処理するためのユーザー定義関数を書く必要があります(タイプarray<int>
)。Scalaの整数配列を処理するためのHive 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)
私は配列の列で動作するようにScalaで使用する必要がどのようなタイプハイブ?
は、あなたが(writable' ')Hadoopのデータ型を使用する必要があります - http://hadooptutorial.info/hadoop-data-types/ –