morningman commented on code in PR #13428: URL: https://github.com/apache/doris/pull/13428#discussion_r999528721
########## be/src/vec/data_types/data_type_array.cpp: ########## @@ -180,10 +181,15 @@ Status DataTypeArray::from_string(ReadBuffer& rb, IColumn* column) const { auto& offsets = array_column->get_offsets(); IColumn& nested_column = array_column->get_data(); + DCHECK(nested_column.is_nullable()); if (*rb.position() != '[') { return Status::InvalidArgument("Array does not start with '[' character, found '{}'", *rb.position()); } + if (*(rb.end() - 1) != ']') { Review Comment: This is checked in `ConvertImplGenericFromString` in `function_cast.h`: ``` 332 if (val.size == 0) { 333 col_to->insert_default(); 334 continue; 335 } 336 ReadBuffer read_buffer((char*)(val.data), val.size); 337 Status st = data_type_to->from_string(read_buffer, col_to); 338 // if parsing failed, will return null 339 (*vec_null_map_to)[i] = !st.ok(); 340 if (!st.ok()) { 341 col_to->insert_default(); 342 } ``` I will add a DCHECK here -- 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