ST_Union_Aggr aggregate.
Attribute columns use validated native Spark aggregate expressions and
therefore remain distributed as well.
Signature
Parameters
Columns defining the groups.
None dissolves all rows into one
group. Arbitrary driver-side grouping vectors are not supported.Aggregation(s) for non-geometry columns.
first, last, and
count support every Spark data type. nunique supports
numeric, boolean, and string columns. min, max, sum,
mean, median, std, and var support numeric and
boolean columns. String sum and every prod aggregation are
not supported.Group by one or more input index levels. When supplied,
level
takes precedence over by, matching pandas.Sort group keys. With
False, groups follow first occurrence.
Preserving that order still requires a distributed sort by each
group’s first source-row position.For categorical groupers,
True returns observed groups.
Materializing unobserved categorical combinations is unsupported.Union algorithm. Sedona currently supports only the robust unary
union for this API.
Returns
Python row UDFs are not used. Callable aliases are limited to built-in
min, max, and sum, plus NumPy amin, amax, min,
max, sum, mean, median, std, and var.
first and last follow source row order and skip null and NaN
values. Numeric and boolean sum use pandas’ zero identity for an
all-null group; boolean sums are returned as integers and boolean
statistical aggregations as floating-point values.GeoPandas flattens multiple aggregation labels into a one-level object
index containing tuples. pandas-on-Spark cannot represent tuple-valued
labels in a one-level column index, so Sedona keeps those results as a
two-level MultiIndex and uses (geometry_name, "") for the
active geometry label.
