The work at #141657 added support for geo_shape and cartesian_shape to ST_CENTROID_AGG, however, this was using shapes from source, which is very slow. The doc-values for shapes contain centroid information, so we can optimize this by reading directly from doc-values.
The work at #141657 added support for geo_shape and cartesian_shape to ST_CENTROID_AGG, however, this was using shapes from source, which is very slow. The doc-values for shapes contain centroid information, so we can optimize this by reading directly from doc-values.