You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues-all@impala.apache.org by "Arnab Karmakar (Jira)" <ji...@apache.org> on 2026/09/25 09:17:00 UTC
[jira] [Created] (IMPALA-15431) Optimize the StringVal Min/Max templates
Arnab Karmakar created IMPALA-15431:
---------------------------------------
Summary: Optimize the StringVal Min/Max templates
Key: IMPALA-15431
URL: https://issues.apache.org/jira/browse/IMPALA-15431
Project: IMPALA
Issue Type: Improvement
Components: Backend
Reporter: Arnab Karmakar
The generic {{{}Min()/Max(){}}} templates for StringVal ([aggregate-functions-ir.cc|https://github.com/apache/impala/blob/6a8a5a52ba77b644e4b8a25f38c4c0a30217431b/be/src/exprs/aggregate-functions-ir.cc#L1301-L1319]) compare values using StringValue ordering. When a new min/max is found and dst is non-null, they call {{{}ctx->Free(dst->ptr){}}} followed by {{{}CopyStringVal(ctx, src, dst){}}}, which allocates a new buffer.
When {{{}src.len == dst->len{}}}, this could instead memcpy src into the existing dst buffer and avoid a free+allocate per update.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-all-unsubscribe@impala.apache.org
For additional commands, e-mail: issues-all-help@impala.apache.org