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_r366630326
##########
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:
Will change error message as discussed.
----------------------------------------------------------------
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