Github user ueshin commented on a diff in the pull request:
https://github.com/apache/spark/pull/17561#discussion_r110333435
--- Diff:
sql/hive-thriftserver/src/main/scala/org/apache/spark/sql/hive/thriftserver/SparkExecuteStatementOperation.scala
---
@@ -121,7 +121,12 @@ private[hive] class SparkExecuteStatementOperation(
result.toLocalIterator.asScala
} else {
if (resultList.isEmpty) {
- resultList = Some(result.collect())
+ val limited =
sqlContext.getConf(SQLConf.THRIFTSERVER_RESULT_LIMIT.key).toInt
+ resultList = if (limited > 0) {
+
Some(result.take(result.queryExecution.analyzed.maxRows.getOrElse(limited).toInt))
--- End diff --
Looks here is a compile error:
```
[error] /.../SparkExecuteStatementOperation.scala:126: value toInt is not a
member of AnyVal
[error]
Some(result.take(result.queryExecution.analyzed.maxRows.getOrElse(limited).toInt))
[error]
^
```
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]