cambyzju commented on code in PR #15669: URL: https://github.com/apache/doris/pull/15669#discussion_r1069067462
########## be/src/vec/data_types/data_type_struct.cpp: ########## @@ -91,6 +80,94 @@ std::string DataTypeStruct::do_get_name() const { return s.str(); } +Status DataTypeStruct::from_string(ReadBuffer& rb, IColumn* column) const { + DCHECK(!rb.eof()); + auto* struct_column = assert_cast<ColumnStruct*>(column); + + if (*rb.position() != '{') { + return Status::InvalidArgument("Struct does not start with '{' character, found '{}'", + *rb.position()); + } + if (*(rb.end() - 1) != '}' && rb.count() > 1) { Review Comment: ```suggestion if (rb.count() < 2 || *(rb.end() - 1) != '}' && ) { ``` -- 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