SuKi2cn commented on code in PR #335: URL: https://github.com/apache/iceberg-cpp/pull/335#discussion_r2564214209
########## src/iceberg/test/aggregate_test.cc: ########## @@ -0,0 +1,160 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +#include "iceberg/expression/aggregate.h" + +#include <gtest/gtest.h> + +#include "iceberg/exception.h" +#include "iceberg/expression/binder.h" +#include "iceberg/expression/expressions.h" +#include "iceberg/row/struct_like.h" +#include "iceberg/schema.h" +#include "iceberg/test/matchers.h" +#include "iceberg/type.h" +#include "iceberg/util/macros.h" + +namespace iceberg { + +namespace { Review Comment: > These test cases look insufficient to me. I think we need to covert at least the following: > > * Verify unbound aggregates of different operations are created successfully and invalid inputs are rejected. > * Verify binding unbound to bound aggregates work as expected for different operations. > * Verify ToString and other member functions work. > * Verify bound aggregates evaluation work as expected. > * Verify different evaluators work fine for all operations and single/multiple aggregate inputs. Thank you for your review. I agree the current test coverage is not sufficient. I will expand the test cases to cover the scenarios you listed, including creation and validation of unbound aggregates, binding behavior across different operations, ToString and other member functions, as well as evaluation correctness for both single and multiple aggregates. -- 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]
