You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by maropu <gi...@git.apache.org> on 2017/10/01 01:16:46 UTC
[GitHub] spark pull request #19401: [SPARK-22176][SQL] Fix overflow issue in Dataset....
Github user maropu commented on a diff in the pull request:
https://github.com/apache/spark/pull/19401#discussion_r142018469
--- Diff: sql/core/src/main/scala/org/apache/spark/sql/Dataset.scala ---
@@ -238,7 +238,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 takeResult = toDF().take(numRows + 1)
+ val takeResult = toDF().take(if (numRows == Int.MaxValue) numRows else numRows + 1)
--- End diff --
yea, looks great. I updated.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org