github-actions[bot] commented on code in PR #66305:
URL: https://github.com/apache/doris/pull/66305#discussion_r3684401224
##########
be/src/exprs/function/cast/function_cast.cpp:
##########
@@ -228,6 +228,13 @@ WrapperType prepare_remove_nullable(FunctionContext*
context, const DataTypePtr&
// NOLINTNEXTLINE(readability-function-size)
WrapperType prepare_impl(FunctionContext* context, const DataTypePtr&
origin_from_type,
const DataTypePtr& origin_to_type) {
+ if (check_and_get_data_type<DataTypeAggState>(origin_to_type.get()) !=
nullptr &&
Review Comment:
[P2] Preserve the identity fast path for String-backed states
This branch runs before the serialized-type equality check below, so a
String source cast to a variable AggState whose serialized column is already
ColumnString (for example HLL or group_concat) now allocates a new column and
copies every state payload row-by-row. Raw Parquet BYTE_ARRAY maps to
DataTypeString by default, so the normal OUTFILE-to-stream-load path regresses
from O(1) column reuse to O(total state bytes). Let the existing
serialized-type equality/identity check run before this specialization;
fixed-state and VARBINARY sources would still take the checked byte-copy path.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]