Problem
functions_aggregate_decimal_output.yaml defines count, count (star), and approx_count_distinct returning decimal<38, 0> instead of the standard i64. These share their names with the standard aggregates in functions_aggregate_generic.yaml, differing only in return type.
Same-named functions living in two extensions force every consumer to disambiguate count at resolution time (which extension? which return type?), and a name-based lookup can silently pick the "wrong" count. The value added over the standard i64 count is only the output type, which the caller can obtain with a cast.
Proposal
Consider removing functions_aggregate_decimal_output.yaml (or at least the count variants). Users who want a decimal-typed count would apply an explicit cast to the standard i64 result:
cast(count(x) AS decimal<38, 0>)
This removes the name collision and keeps a single, unambiguous count.
Context
Encountered while building the function namespace for substrait-python: count appears in both functions_aggregate_generic and functions_aggregate_decimal_output, requiring collision-preference logic to keep the default count returning i64.
Problem
functions_aggregate_decimal_output.yamldefinescount,count(star), andapprox_count_distinctreturningdecimal<38, 0>instead of the standardi64. These share their names with the standard aggregates infunctions_aggregate_generic.yaml, differing only in return type.Same-named functions living in two extensions force every consumer to disambiguate
countat resolution time (which extension? which return type?), and a name-based lookup can silently pick the "wrong"count. The value added over the standardi64countis only the output type, which the caller can obtain with a cast.Proposal
Consider removing
functions_aggregate_decimal_output.yaml(or at least thecountvariants). Users who want a decimal-typed count would apply an explicit cast to the standardi64result:This removes the name collision and keeps a single, unambiguous
count.Context
Encountered while building the function namespace for substrait-python:
countappears in bothfunctions_aggregate_genericandfunctions_aggregate_decimal_output, requiring collision-preference logic to keep the defaultcountreturningi64.