attilapiros commented on PR #50260: URL: https://github.com/apache/spark/pull/50260#issuecomment-2719656434
Fixed. It was a difference between Scala 2.12 vs 2.13. The `Option#zip` gives back an `Iterable` on Scala 2.12 instead of an `Option`: ``` # scala Welcome to Scala 2.12.8 (OpenJDK 64-Bit Server VM, Java 1.8.0_442). Type in expressions for evaluation. Or try :help. scala> val option = Some(1) option: Some[Int] = Some(1) scala> option.zip(option) res1: Iterable[(Int, Int)] = List((1,1)) scala> None.zip(None) res2: Iterable[(Nothing, Nothing)] = List() scala> res1.headOption res3: Option[(Int, Int)] = Some((1,1)) scala> res2.headOption res4: Option[(Nothing, Nothing)] = None ``` Although the documentation does not says differently: https://www.scala-lang.org/api/2.12.8/scala/Option.html#zip[B](that:scala.collection.GenIterable[B]):Option[(A,B)] -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org