imay commented on a change in pull request #1590: Implement BetaRowsetWriter
URL: https://github.com/apache/incubator-doris/pull/1590#discussion_r312726120
##########
File path: be/src/olap/schema_change.cpp
##########
@@ -685,22 +680,19 @@ SchemaChangeDirectly::SchemaChangeDirectly(
const RowBlockChanger& row_block_changer) :
_row_block_changer(row_block_changer),
_row_block_allocator(nullptr),
- _src_cursor(nullptr),
- _dst_cursor(nullptr) { }
+ _cursor(nullptr) { }
SchemaChangeDirectly::~SchemaChangeDirectly() {
VLOG(3) << "~SchemaChangeDirectly()";
SAFE_DELETE(_row_block_allocator);
- SAFE_DELETE(_src_cursor);
- SAFE_DELETE(_dst_cursor);
+ SAFE_DELETE(_cursor);
}
-bool SchemaChangeDirectly::_write_row_block(RowsetWriterSharedPtr
rowset_writer, RowBlock* row_block) {
+bool SchemaChangeDirectly::_write_row_block(RowsetWriter* rowset_writer,
RowBlock* row_block) {
for (uint32_t i = 0; i < row_block->row_block_info().row_num; i++) {
- row_block->get_row(i, _src_cursor);
- copy_row(_dst_cursor, *_src_cursor, rowset_writer->mem_pool());
- if (OLAP_SUCCESS != rowset_writer->add_row(*_dst_cursor)) {
- LOG(WARNING) << "fail to attach writer";
+ row_block->get_row(i, _cursor);
Review comment:
There may be some error here. In schema change, origin `src_cursor` and
`dst_cursor` have different schema and have different memory layout. If you use
a dst cursor to attache a row_block whose schema is different, I think it may
cause some problem.
----------------------------------------------------------------
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]