0

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")))
    }
}
syv
  • 3,528
  • 7
  • 35
  • 50
  • Could you perhaps provide some sample data and/or an error message? I'm not sure what you mean by GlobalLock taking the value of the column. – hoyland Mar 24 '18 at 11:41
  • you should look at my answer for details https://stackoverflow.com/a/49436338/5880706 – Ramesh Maharjan Mar 24 '18 at 12:31

0 Answers0