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

    https://github.com/apache/spark/pull/21370#discussion_r191595442
  
    --- Diff: sql/core/src/main/scala/org/apache/spark/sql/Dataset.scala ---
    @@ -231,16 +234,17 @@ class Dataset[T] private[sql](
       }
     
       /**
    -   * Compose the string representing rows for output
    +   * Get rows represented in Sequence by specific truncate and vertical 
requirement.
        *
    -   * @param _numRows Number of rows to show
    +   * @param numRows Number of rows to return
        * @param truncate If set to more than 0, truncates strings to 
`truncate` characters and
        *                   all cells will be aligned right.
    -   * @param vertical If set to true, prints output rows vertically (one 
line per column value).
    +   * @param vertical If set to true, the rows to return don't need 
truncate.
        */
    -  private[sql] def showString(
    -      _numRows: Int, truncate: Int = 20, vertical: Boolean = false): 
String = {
    -    val numRows = _numRows.max(0).min(Int.MaxValue - 1)
    --- End diff --
    
    Don't we need to check the `numRows` range when called from 
`getRowsToPython`?


---

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

Reply via email to