Drop the unnecessary *Agg suffix from non-colliding aggregates#133
Drop the unnecessary *Agg suffix from non-colliding aggregates#133estebanzimanyi wants to merge 1 commit into
Conversation
6d36d04 to
ebd5ede
Compare
Reviewer's quickstart — ~2-3 minutesWhat this PR does: Drop the *Agg suffix from all aggregate names. Risk: focused, single-purpose. Spot-check the source diff + matching tests; CI confirms. Cross-link: Linux arm64 CI here needs #161 for the orthogonal |
ff0817a to
e0363d6
Compare
|
Aggregates whose bare name collides with a scalar must keep a disambiguating suffix: DuckDB maps a function name to a single catalog entry kind, so registering an aggregate over the existing scalar time-min/max accessors (Tmin/Tmax on tbox/stbox) fails extension load with 'GetAlterInfo not implemented'. The aggregate surface registers TminAgg/TmaxAgg (and the rest of the *Agg set) for this reason. |
|
Reopening: the *Agg suffix is a binding-surface workaround that breaks the ecosystem auto-codegen (all bindings are mechanical remaps of the canonical MEOS name). The tmin/tmax scalar-accessor vs temporal-aggregate name collision is resolved at the MEOS/canonical level so every binding inherits the same distinct names, not by suffixing in DuckDB alone. |
|
Superseded by MobilityDB #828 (green): the scalar/aggregate name collisions are resolved canonically at the MEOS surface by suffixing the aggregate form (mergeAgg/appendInstantAgg/appendSequenceAgg/minDistanceAgg/tminAgg/tmaxAgg), which every binding inherits via codegen. MobilityDuck already registers TminAgg/TmaxAgg, so it conforms; dropping the suffix would re-introduce the load collision. |
e0363d6 to
d003ef2
Compare
fa2de57 to
17588c0
Compare
d003ef2 to
2779530
Compare
40bf218 to
45df2ad
Compare
2779530 to
e0f1a3b
Compare
45df2ad to
2067f2a
Compare
e0f1a3b to
13f7a38
Compare
2067f2a to
74ea89f
Compare
13f7a38 to
26fda1f
Compare
74ea89f to
e12394e
Compare
eeefcdd to
ba3e7f6
Compare
3e8da05 to
e5d0464
Compare
Keep the Agg suffix only on aggregates whose name collides with a scalar of the same name (TminAgg/TmaxAgg vs the box time-bound accessors; MergeAgg, AppendInstantAgg, AppendSequenceAgg vs their scalar forms). The non-colliding aggregates (Tand, Tor, Tcount, Tsum, Tavg, Tcentroid, Wcount, Wsum, Wavg, Wmin, Wmax, SetUnion, SpanUnion) take the bare canonical name.
ba3e7f6 to
f2b2d0d
Compare
DuckDB's catalog dispatches on argument types, so the same-stem collision that previously motivated the *Agg suffix (RFC #827, e.g. aggregate Tmin on tnumber vs scalar Tmin on tbox) is resolved by signature dispatch: the aggregate takes a temporal value, the scalar takes a box, they coexist. The suffix read as ugly and broke the principle that the cross-platform SQL form should match what a Snowflake/Databricks/lakehouse programmer would naturally write. All 21 aggregates and their test references are renamed (TandAgg to Tand, TminAgg to Tmin, MergeAgg to Merge, WavgAgg to Wavg, etc.); doc comments in src/temporal/temporal_aggregates.cpp and the four affected parity test headers replace the *Agg-convention prose with the simpler argument-type-dispatch explanation. Pure rename plus doc cleanup, no semantic change. CI is currently blocked by an unrelated pre-existing vcpkg/MEOS pin issue on origin/main: portfile REF f11b7443e (pre-Apr-28 meosType to MeosType rename) does not match SHA512 ae8589acc8 (which corresponds to 742c1fb5, post-rename), so fresh downloads compile-fail at src/include/tydef.hpp:18 with "MeosType does not name a type"; a separate vcpkg-pin-fix PR is the right vehicle since fully bumping MEOS cascades into per-call signature updates beyond this rename scope.