cecemei commented on code in PR #18539:
URL: https://github.com/apache/druid/pull/18539#discussion_r2373243123
##########
processing/src/main/java/org/apache/druid/segment/CursorBuildSpec.java:
##########
@@ -234,8 +237,18 @@ public boolean isCompatibleOrdering(List<OrderBy> ordering)
if (ordering.size() < preferredOrdering.size()) {
return false;
}
- for (int i = 0; i < preferredOrdering.size(); i++) {
- if (!ordering.get(i).equals(preferredOrdering.get(i))) {
+
+ boolean exactMatch = ordering.get(0).equals(preferredOrdering.get(0));
+ if (!exactMatch &&
!ordering.get(0).equals(preferredOrdering.get(0).reverse())) {
Review Comment:
updated to a `isExactReverse` method instead of creating additional objects
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]