HappenLee commented on code in PR #66477:
URL: https://github.com/apache/doris/pull/66477#discussion_r4237066318
##########
be/src/exec/partitioner/partitioner.cpp:
##########
@@ -84,6 +85,23 @@ Status Crc32CHashPartitioner::clone(RuntimeState* state,
return _clone_expr_ctxs(state, new_partitioner->_partition_expr_ctxs);
}
+void IdentityHashPartitioner::_do_hash(const ColumnPtr& column, HashValType*
__restrict result,
+ int idx) const {
+ const PrimitiveType type =
_partition_expr_ctxs[idx]->root()->data_type()->get_primitive_type();
+ for (size_t row = 0; row < column->size(); ++row) {
+ auto val = column->get_data_at(row);
Review Comment:
This loop calls the virtual `column->get_data_at(row)` for every row,
introducing per-row virtual dispatch in the partitioning hot path. Please
follow the CRC32 implementation (`column->update_crcs_with_value(...)`) and add
a corresponding batch identity-hash interface on `IColumn`, implemented by the
concrete column types. This moves virtual dispatch outside the row loop and
lets each column hash its underlying storage directly, avoiding the per-row
virtual calls while preserving the existing canonical-byte, NULL, and
seed-combination semantics.
--
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]