You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by GitBox <gi...@apache.org> on 2022/10/19 07:30:44 UTC

[GitHub] [doris] cambyzju commented on a diff in pull request #13428: [feature-wip](array) remove array config and check array nested depth

cambyzju commented on code in PR #13428:
URL: https://github.com/apache/doris/pull/13428#discussion_r999042887


##########
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:
   will overflow if rb is empty



-- 
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-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org