cfmcgrady commented on code in PR #4662:
URL: https://github.com/apache/kyuubi/pull/4662#discussion_r1160390474
##########
externals/kyuubi-spark-sql-engine/src/test/scala/org/apache/kyuubi/engine/spark/operation/SparkArrowbasedOperationSuite.scala:
##########
@@ -138,6 +148,159 @@ class SparkArrowbasedOperationSuite extends
WithSparkSQLEngine with SparkDataTyp
assert(metrics("numOutputRows").value === 1)
}
+ test("SparkDatasetHelper.executeArrowBatchCollect should return expect row
count") {
+ val returnSize = Seq(
+ 7, // less than one partition
+ 10, // equal to one partition
+ 13, // between one and two partitions, run two jobs
+ 20, // equal to two partitions
+ 29, // between two and three partitions
+ 1000, // all partitions
+ 1001) // more than total row count
+// -1) // all
Review Comment:
the build-in `CheckAnalysis` has check rule `limit >= 0`, the
AnalysisException will be thrown if `limit < 0`
https://github.com/apache/spark/blob/fa6e55bba4d62cdad66e5f425d8a261fe1050134/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/CheckAnalysis.scala#L85-L112
```
The limit expression must be equal to or greater than 0, but got -1.; line 1
pos 24;
GlobalLimit -1
+- LocalLimit -1
+- Project [id#16L]
+- SubqueryAlias t_1
+- View (`t_1`, [id#16L])
+- RepartitionByExpression [id#16L ASC NULLS FIRST], 100
+- Range (0, 1000, step=1, splits=Some(1))
org.apache.spark.sql.AnalysisException: The limit expression must be equal
to or greater than 0, but got -1.; line 1 pos 24;
GlobalLimit -1
+- LocalLimit -1
+- Project [id#16L]
+- SubqueryAlias t_1
+- View (`t_1`, [id#16L])
+- RepartitionByExpression [id#16L ASC NULLS FIRST], 100
+- Range (0, 1000, step=1, splits=Some(1))
```
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]