Closed raybellwaves closed 3 years ago
Thanks, @raybellwaves - this has been submitted and will be addressed via the Learning Spark 2nd Edition Errata.
Quick note, the code in question should actually be:
// In Scala
def addOne(values: Seq[Int]): Seq[Int] = {
values.map(value => value + 1)
}
val plusOneInt = spark.udf.register("plusOneInt", addOne(_: Seq[Int]): Seq[Int])
Thanks again!
Under Option 2: User-Defined Function the code is copied from the example above (Option 1: Explode and Collect). I believe it's missing a UDF that uses
map