Seaven commented on a change in pull request #2979: Incomplete support Array type (#2871) URL: https://github.com/apache/incubator-doris/pull/2979#discussion_r387475124
########## File path: be/src/util/mysql_row_buffer.h ########## @@ -57,13 +57,44 @@ class MysqlRowBuffer { int length() const { return _pos - _buf; } + + /** + * Why? + * Because the Nested-Type's data need pushed multiple times, but mysql protocal don't support nested type and each + * push will decide a column data. + * + * How? + * Dynamic mode allow we can push data in a column multiple times, and allow recursive push. + * NOTE:Need to ensure the open() and close() appear in pairs + * + * the code: + * mrb.push_smallint(120); + * mrb.push_int(-30000); + * mrb.push_bigint(900000); + * + * In normal mode, the buffer contains three column: + * 1-'5'-3-'120'-6-'-30000' Review comment: Em......Mysql protocol like this: ``` | flag | (length) | value | flag | (length) | value | ...... ^-------A column------^ The flag means value's length or null value: If value is NULL, flag is 251 If value's length < 250, flag is the value's length If 250 < value's length < 65536, flag is 252 and the next two byte is length If 65536 < value's length < 16777216 , flag is 253 and the next three byte is length If 16777216 < value's length, flag is 254 and the next eighth byte is length ``` I will update the comment. ---------------------------------------------------------------- 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org