morningman commented on code in PR #14264: URL: https://github.com/apache/doris/pull/14264#discussion_r1021653581
########## be/src/exec/text_converter.h: ########## @@ -54,7 +54,8 @@ class TextConverter { const char* data, size_t len, bool copy_string, bool need_escape); bool write_vec_column(const SlotDescriptor* slot_desc, vectorized::IColumn* nullable_col_ptr, - const char* data, size_t len, bool copy_string, bool need_escape); + const char* data, size_t len, bool copy_string, bool need_escape, + size_t rows = 1); Review Comment: add comment in code to explain this magic num ########## be/src/exec/text_converter.hpp: ########## @@ -191,16 +191,18 @@ inline bool TextConverter::write_column(const SlotDescriptor* slot_desc, inline bool TextConverter::write_vec_column(const SlotDescriptor* slot_desc, vectorized::IColumn* nullable_col_ptr, const char* data, - size_t len, bool copy_string, bool need_escape) { + size_t len, bool copy_string, bool need_escape, + size_t rows) { vectorized::IColumn* col_ptr = nullable_col_ptr; // \N means it's NULL if (slot_desc->is_nullable()) { auto* nullable_column = reinterpret_cast<vectorized::ColumnNullable*>(nullable_col_ptr); if ((len == 2 && data[0] == '\\' && data[1] == 'N') || len == SQL_NULL_DATA) { - nullable_column->insert_data(nullptr, 0); + nullable_column->insert_many_defaults(rows); return true; } else { - nullable_column->get_null_map_data().push_back(0); + auto& null_map = nullable_column->get_null_map_data(); + null_map.resize_fill(null_map.size() + rows, 0); Review Comment: You need to modify the `if` code block in L333 ########## be/src/vec/exec/format/generic_reader.h: ########## @@ -43,6 +44,18 @@ class GenericReader { return Status::NotSupported("get_parser_schema is not implemented for this reader."); } virtual ~GenericReader() = default; + + bool fill_all_columns() const { return _fill_all_columns; } Review Comment: Add comment for interface. -- 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