mihaibudiu commented on code in PR #4147:
URL: https://github.com/apache/calcite/pull/4147#discussion_r1917207656
##########
core/src/main/java/org/apache/calcite/rel/rules/SubQueryRemoveRule.java:
##########
@@ -696,16 +696,15 @@ private static RexNode rewriteIn(RexSubQuery e,
Set<CorrelationId> variablesSet,
if (variablesSet.isEmpty()) {
builder.aggregate(builder.groupKey(builder.field("cs")),
builder.count(false, "c"));
-
- // sorts input with desc order since we are interested
- // only in the case when one of the values is true.
- // When true value is absent then we are interested
- // only in false value.
- builder.sortLimit(0, 1,
- ImmutableList.of(builder.desc(builder.field("cs"))));
} else {
builder.distinct();
}
+ // sorts input with desc order since we are interested
+ // only in the case when one of the values is true.
+ // When true value is absent then we are interested
+ // only in false value.
+ builder.sortLimit(0, 1,
Review Comment:
It looks like this was written by @vvysotskyi about 6 years ago, it would be
great if he could comment.
--
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]