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

    https://github.com/apache/spark/pull/19401#discussion_r142031417
  
    --- 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 --
    
    hmm, I see. Both is okay to me and WDYT? cc: @gatorsmile 
    IMHO it might be still okay to set `[0, Int.MaxValue)` as valid range for 
`show` cuz this is a super extreme corner case. 


---

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

Reply via email to