You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@livy.apache.org by "askhatri (via GitHub)" <gi...@apache.org> on 2023/03/14 14:21:35 UTC

[GitHub] [incubator-livy] askhatri commented on a diff in pull request #389: [LIVY-970][SERVER] Ordering and pagination support in GET /statement

askhatri commented on code in PR #389:
URL: https://github.com/apache/incubator-livy/pull/389#discussion_r1135627204


##########
server/src/main/scala/org/apache/livy/server/interactive/InteractiveSessionServlet.scala:
##########
@@ -113,7 +113,12 @@ class InteractiveSessionServlet(
 
   get("/:id/statements") {
     withViewAccessSession { session =>
-      val statements = session.statements
+      val order = params.get("order")
+      val statements = if (order.map(_.trim).exists(_.equalsIgnoreCase("latest"))) {
+        session.statements.reverse

Review Comment:
   I discussed with others in my team and found that we are good to use short it in Interactive Session Servlet for now.



-- 
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: commits-unsubscribe@livy.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org