XuQianJin-Stars commented on a change in pull request #1335: [CALCITE-3159]
Distinct can be removed for MIN/MAX/BIT_OR/BIT_AND agg…
URL: https://github.com/apache/calcite/pull/1335#discussion_r312457826
##########
File path: core/src/main/java/org/apache/calcite/tools/RelBuilder.java
##########
@@ -2577,7 +2578,9 @@ public GroupKey alias(String alias) {
String alias, ImmutableList<RexNode> operands,
ImmutableList<RexNode> orderKeys) {
this.aggFunction = Objects.requireNonNull(aggFunction);
- this.distinct = distinct;
+ // When AggregateCall.distinct is false or getDistinctOptionality() is
IGNORED,
+ // no distinct operation is required. In addition, a distinct operation
is required.
Review comment:
> change the comment to
> `distinct value is honored only when the aggregate function's distinct
optionality is not IGNORED.`
> and in another place.
hi @hsyuan Thank you very much, I've already changed it.
----------------------------------------------------------------
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