HyukjinKwon edited a comment on pull request #29214:
URL: https://github.com/apache/spark/pull/29214#issuecomment-665400947


   Hey, sorry. I missed it. Seems this isn't consistent with Scala side:
   
   ```scala
   scala> spark.range(10).filter("FALSE").head
   java.util.NoSuchElementException: next on empty iterator
     at scala.collection.Iterator$$anon$2.next(Iterator.scala:41)
     at scala.collection.Iterator$$anon$2.next(Iterator.scala:39)
     at scala.collection.IndexedSeqLike$Elements.next(IndexedSeqLike.scala:63)
     at scala.collection.IterableLike.head(IterableLike.scala:109)
     at scala.collection.IterableLike.head$(IterableLike.scala:108)
     at 
scala.collection.mutable.ArrayOps$ofRef.scala$collection$IndexedSeqOptimized$$super$head(ArrayOps.scala:198)
     at scala.collection.IndexedSeqOptimized.head(IndexedSeqOptimized.scala:129)
     at 
scala.collection.IndexedSeqOptimized.head$(IndexedSeqOptimized.scala:129)
     at scala.collection.mutable.ArrayOps$ofRef.head(ArrayOps.scala:198)
     at org.apache.spark.sql.Dataset.head(Dataset.scala:2717)
     ... 47 elided
   
   scala> spark.range(10).filter("FALSE").head(0)
   res1: Array[Long] = Array()
   ```
   


----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to