simges commented on code in PR #49553: URL: https://github.com/apache/doris/pull/49553#discussion_r2015120252
########## be/src/vec/data_types/serde/data_type_struct_serde.cpp: ########## @@ -157,7 +157,8 @@ Status DataTypeStructSerDe::deserialize_one_cell_from_json(IColumn& column, Slic } Slice next(slice.data + start_pos, idx - start_pos); next.trim_prefix(); - if (field_pos > elem_size) { + // field_pos should always less than elem_size, if not, we should return error + if (field_pos >= elem_size) { Review Comment: This condition appears to be inconsistent with the comment above, as it's unclear whether field_pos could be equal to elem_size. -- 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: commits-unsubscr...@doris.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org