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


##########
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:
   @lmccay thoughts on this shortcut logic? I find shortcuts bad for long term 
because they add burdens:
   1. future devs would have to worry about where such shortcuts exist.
   2. it's non-uniform so testing logic gets distributed to multiple layers.



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

Reply via email to