HuaHuaY commented on code in PR #373:
URL: https://github.com/apache/iceberg-cpp/pull/373#discussion_r2593477122
##########
src/iceberg/expression/aggregate.cc:
##########
@@ -152,6 +285,11 @@ Result<Literal> CountAggregate::Evaluate(const StructLike&
data) const {
return CountFor(data).transform([](int64_t count) { return
Literal::Long(count); });
}
+Result<Literal> CountAggregate::Evaluate(const DataFile& file) const {
+ ICEBERG_ASSIGN_OR_RAISE(auto count, CountFor(file));
+ return Literal::Long(count);
Review Comment:
```suggestion
return CountFor(file).transform(Literal::Long);
```
Please also help simplify `CountAggregate::Evaluate(const StructLike& data)
const` above.
--
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]