SteNicholas commented on code in PR #2678:
URL: https://github.com/apache/incubator-kyuubi/pull/2678#discussion_r878965619


##########
externals/kyuubi-trino-engine/src/main/scala/org/apache/kyuubi/engine/trino/operation/ExecuteStatement.scala:
##########
@@ -77,6 +81,24 @@ class ExecuteStatement(
     }
   }
 
+  override def getNextRowSet(order: FetchOrientation, rowSetSize: Int): 
TRowSet = {
+    validateDefaultFetchOrientation(order)
+    assertState(OperationState.FINISHED)
+    setHasResultSet(true)
+    (order, incrementalCollect) match {
+      case (FETCH_NEXT, _) => iter.fetchNext()
+      case (FETCH_PRIOR, false) => iter.fetchPrior(rowSetSize)
+      case (FETCH_FIRST, false) => iter.fetchAbsolute(0)
+      case _ =>
+        val mode = if (incrementalCollect) "incremental collect" else "full 
collect"
+        throw KyuubiSQLException(s"Fetch orientation[$order] is not supported 
in $mode mode")

Review Comment:
   `FeatureNotSupportedException`?



-- 
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]

Reply via email to