mrhhsg commented on code in PR #68427:
URL: https://github.com/apache/doris/pull/68427#discussion_r4080232908
##########
be/src/exprs/function/function_jsonb.cpp:
##########
@@ -1386,7 +1386,8 @@ struct JsonbLengthUtil {
}
for (size_t i = 0; i < input_rows_count; ++i) {
- if (jsonb_data_column->is_null_at(i) || path_column->is_null_at(i)
||
+ if (jsonb_data_column->is_null_at(i) ||
Review Comment:
Fixed in a66fd4497b4. `json_length` now derives `jsonb_index` with
`index_check_const(i, jsonb_data_const)` and uses it for every access to the
unwrapped JSON column. I also added `JsonLengthConstJsonVaryingPathMultiRows`,
which reproduces the pre-fix out-of-bounds access and covers a constant JSON
value with three varying paths. `FunctionJsonbTEST.*` passes 18/18 under ASAN.
--
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]