Github user srowen commented on a diff in the pull request:

    https://github.com/apache/spark/pull/19401#discussion_r142023186
  
    --- Diff: sql/core/src/main/scala/org/apache/spark/sql/Dataset.scala ---
    @@ -237,7 +237,7 @@ class Dataset[T] private[sql](
        */
       private[sql] def showString(
           _numRows: Int, truncate: Int = 20, vertical: Boolean = false): 
String = {
    -    val numRows = _numRows.max(0)
    +    val numRows = _numRows.max(0).min(Int.MaxValue - 1)
    --- End diff --
    
    OK, but now you return one fewer row than expected when it's possible to 
return Int.MaxValue. Granted this is an extreme corner case, but that seems 
less compelling than just skipping the display of "more elements" in this case.


---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org

Reply via email to