Here is my code block., I want to pass Column to "calculateCredit" but the following code GlobalLock take value of that column.
object CreditHostory {
def calculateCredit(rows: Row) = {
}
def main(args: Array[String]): Unit = {
sparkSession.udf.register("calcCredit", calculateCredit _)
callUDF("calcCredit", struct(col("credit") , col("amount")))
}
}