amaliujia commented on a change in pull request #1807: [CALCITE-3796] Support
Array operator <, <=, >, >=
URL: https://github.com/apache/calcite/pull/1807#discussion_r380847764
##########
File path: core/src/main/java/org/apache/calcite/runtime/SqlFunctions.java
##########
@@ -693,6 +693,22 @@ public static boolean lt(BigDecimal b0, BigDecimal b1) {
return b0.compareTo(b1) < 0;
}
+ /** SQL <code><</code> operator applied to List<Comparable> values. */
+ public static <T extends Comparable> boolean lt(List<T> b0, List<T> b1) {
+ for (int i = 0; i < b0.size(); i++) {
+ // b0 is greater because b0 is longer than b1.
Review comment:
Yep!
----------------------------------------------------------------
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