chaoyli commented on a change in pull request #563: Modify schema change to use 
rowset
URL: https://github.com/apache/incubator-doris/pull/563#discussion_r250469872
 
 

 ##########
 File path: be/src/olap/rowset/alpha_rowset_writer.cpp
 ##########
 @@ -70,22 +71,54 @@ OLAPStatus AlphaRowsetWriter::add_row(const char* row, 
Schema* schema) {
     if (status != OLAP_SUCCESS) {
         std::string error_msg = "add row failed";
         LOG(WARNING) << error_msg;
-        return status; 
+        return status;
     }
     _column_data_writer->next(row, schema);
+    _is_pending_rowset++;
+    return OLAP_SUCCESS;
+}
+
+OLAPStatus AlphaRowsetWriter::add_row_block(RowBlock* row_block) {
+    size_t pos = 0;
+    row_block->set_pos(pos);
+    RowCursor row_cursor;
+    row_cursor.init(_rowset_builder_context.tablet_schema);
+    while (pos < row_block->limit()) {
+        row_block->get_row(pos, &row_cursor);
+        add_row(&row_cursor);
+        row_block->pos_inc();
+        pos = row_block->pos();
+        _is_pending_rowset++;
+    }
+    return OLAP_SUCCESS;
+}
+
+OLAPStatus AlphaRowsetWriter::add_rowset(RowsetSharedPtr rowset) {
 
 Review comment:
   This name is confused. add_rowset_for_linked_schema_change

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on 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: dev-unsubscr...@doris.apache.org
For additional commands, e-mail: dev-h...@doris.apache.org

Reply via email to