PaulJackson123 commented on code in PR #3495:
URL: https://github.com/apache/calcite/pull/3495#discussion_r1399622580
##########
core/src/main/java/org/apache/calcite/rel/metadata/RelMdColumnUniqueness.java:
##########
@@ -67,6 +70,9 @@ public class RelMdColumnUniqueness
public static final RelMetadataProvider SOURCE =
ReflectiveRelMetadataProvider.reflectiveSource(
new RelMdColumnUniqueness(),
BuiltInMetadata.ColumnUniqueness.Handler.class);
+ static final Set<SqlKind> PASSTHROUGH_AGGREGATIONS =
Review Comment:
> Also consider making this an interface, similar to `SqlStaticAggFunction`,
`SqlSingletonAggFunction`. That way, user-defined aggregate functions can have
this property.
I looked into this. The challenge is `MIN` and `MAX` are implemented with
`SqlMinMaxAggFunction`, but that function also supports `SOME`, `EVERY` and
their Postgres/Bigquery equivalents, `BOOL_AND`, `BOOL_OR`, `LOGICAL_AND`, and
`LOGICAL_OR`, which return a boolean rather than pass through a value from the
column.
Let me know if I should proceed with that. I don't understand how `SOME` and
`EVERY` relate to `MIN` or `MAX`, so I'd need some guidance.
--
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]