rdblue commented on code in PR #6252:
URL: https://github.com/apache/iceberg/pull/6252#discussion_r1033869215
##########
api/src/main/java/org/apache/iceberg/expressions/BoundAggregate.java:
##########
@@ -37,11 +37,34 @@ public BoundReference<?> ref() {
return term().ref();
}
+ public Types.NestedField nestedField(int index) {
+ if (op() == Operation.COUNT_STAR) {
+ return Types.NestedField.required(index, "COUNT(*)",
Types.LongType.get());
+ } else if (op() == Operation.COUNT) {
+ return Types.NestedField.required(
+ index, "COUNT(" + term().ref().name() + ")", Types.LongType.get());
Review Comment:
I would not change the definition. Just catch that case and throw an
exception.
--
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]