kangpinghuang commented on a change in pull request #764: Convert next_row 
interface to next_block
URL: https://github.com/apache/incubator-doris/pull/764#discussion_r267608214
 
 

 ##########
 File path: be/src/olap/schema_change.cpp
 ##########
 @@ -736,13 +736,9 @@ bool SchemaChangeDirectly::process(RowsetReaderSharedPtr 
rowset_reader, RowsetWr
     reset_merged_rows();
     reset_filtered_rows();
 
-    std::shared_ptr<RowBlock> ref_row_block(new 
RowBlock(&(base_tablet->tablet_schema())));
-    RowBlockInfo block_info;
-    block_info.row_num = base_tablet->tablet_schema().num_rows_per_row_block();
-    block_info.null_supported = true;
-    ref_row_block->init(block_info);
-    rowset_reader->next_block(ref_row_block);
-    while (ref_row_block->has_remaining()) {
+    RowBlock* ref_row_block = nullptr;
+    rowset_reader->next_block(&ref_row_block);
+    while (ref_row_block != nullptr && ref_row_block->has_remaining()) {
         // 注意这里强制分配和旧块等大的块(小了可能会存不下)
         if (nullptr == new_row_block
 
 Review comment:
   new_row_block == nullptr

----------------------------------------------------------------
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:
[email protected]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to