这是我的代码块。我想将Column传递给“calculateCredit”,但是下面的代码是GlobalLock 获取该列的值。
object CreditHostory {
def calculateCredit(rows: Row) = {
}
def main(args: Array[String]): Unit = {
sparkSession.udf.register("calcCredit", calculateCredit _)
callUDF("calcCredit", struct(col("credit") , col("amount")))
}
}