dbwong commented on a change in pull request #671: PHOENIX-4845 Support using 
Row Value Constructors in OFFSET clause fo…
URL: https://github.com/apache/phoenix/pull/671#discussion_r366089739
 
 

 ##########
 File path: 
phoenix-core/src/main/java/org/apache/phoenix/compile/OrderByCompiler.java
 ##########
 @@ -192,6 +192,15 @@ public static OrderBy compile(StatementContext context,
             }
             compiler.reset();
         }
+
+        //If we are not ordered we shouldn't be using RVC Offset
+        //I think this makes sense for the pagination case but perhaps we can 
relax this for
+        //other use cases.
+        //Note If the table is salted we still mark as row ordered in this 
code path
+        if(offset.getByteOffset().isPresent() && orderByExpressions.isEmpty()){
+            throw new SQLException("Do not allow non ORDER BY with RVC 
OFFSET");
 
 Review comment:
   Order by is empty is not necessarily needed if they specify a row order or 
get one from rowkey order property we should let the query through.  

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to