amorynan commented on code in PR #53591:
URL: https://github.com/apache/doris/pull/53591#discussion_r2246771341
##########
be/src/vec/functions/array/function_array_cum_sum.cpp:
##########
@@ -262,17 +260,19 @@ class FunctionArrayCumSum : public IFunction {
const NullMapType& src_null_map, auto& res_datas)
const {
size_t prev_offset = 0;
for (auto cur_offset : src_offsets) {
- // [1, null, 2, 3] -> [1, null, 3, 6]
- // [null, null, 1, 2, 3] -> [null, null, 1, 3, 6]
+ // [1, null, 2, 3] -> [1, 1, 3, 6]
+ // [null, null, 1, 2, 3] -> [0, 0, 1, 3, 6]
typename PrimitiveTypeTraits<Result>::ColumnItemType accumulated
{};
for (size_t pos = prev_offset; pos < cur_offset; ++pos) {
- // skip null value
+ // treat null value as 0
Review Comment:
保持代码对齐啊
--
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]