Copilot commented on code in PR #4908: URL: https://github.com/apache/texera/pull/4908#discussion_r3179996510
########## common/workflow-operator/src/test/scala/org/apache/texera/amber/operator/aggregate/AggregationOperationSpec.scala: ########## @@ -0,0 +1,182 @@ +/* + * 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. + */ + +package org.apache.texera.amber.operator.aggregate + +import org.apache.texera.amber.core.tuple.{Attribute, AttributeType, Schema, Tuple} +import org.scalatest.flatspec.AnyFlatSpec + +/** + * Coverage notes: + * `AggregateOpSpec` (in this same package) already exercises the happy paths for + * `getAggregationAttribute`, the per-kind `init/iterate/merge/finalAgg` semantics + * (SUM/COUNT/AVERAGE/MIN/MAX/CONCAT, including null-handling and AVERAGE-of-empty), + * and the `getFinal` rewrite. This spec deliberately does NOT duplicate those. + * + * What this spec adds: + * - `getAggFunc` validation errors (non-numeric types, null aggFunction). + * - The CONCAT-specific `merge` partial-combination behavior (no per-tuple + * iterate test in `AggregateOpSpec` calls `merge` directly). + * - A two-stage worker→final pipeline that runs a real partial aggregation + * on each "worker", emits a partial tuple, then applies `getFinal` and + * re-aggregates the partials end-to-end. + * - `AveragePartialObj` value-class exposure. + */ Review Comment: The coverage-notes header is slightly inaccurate: `AggregateOpSpec` does not exercise `DistributedAggregation.merge` at all (no `merge` calls in that suite), and `AveragePartialObj` is a case class rather than a value class. Consider adjusting the wording (e.g., drop `merge` from the first bullet and rename “value-class exposure” to “case-class field exposure”) to avoid misleading future readers about what’s actually covered. -- 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]
