Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix schema change core dump because of null stats #2049

Merged
merged 1 commit into from
Oct 23, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions be/src/olap/schema_change.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1312,6 +1312,7 @@ OLAPStatus SchemaChangeHandler::_do_process_alter_tablet_v2(const TAlterTabletRe
_reader_context.return_columns = &return_columns;
// for schema change, seek_columns is the same to return_columns
_reader_context.seek_columns = &return_columns;
_reader_context.stats = &_stats;

for (auto& rs_reader : rs_readers) {
rs_reader->init(&_reader_context);
Expand Down Expand Up @@ -1428,6 +1429,7 @@ OLAPStatus SchemaChangeHandler::schema_version_convert(
_reader_context.delete_handler = &delete_handler;
_reader_context.return_columns = &return_columns;
_reader_context.seek_columns = &return_columns;
_reader_context.stats = &_stats;

RowsetReaderSharedPtr rowset_reader;
RETURN_NOT_OK((*base_rowset)->create_reader(&rowset_reader));
Expand Down
2 changes: 2 additions & 0 deletions be/src/olap/schema_change.h
Original file line number Diff line number Diff line change
Expand Up @@ -267,6 +267,8 @@ class SchemaChangeHandler {
private:
RowsetReaderContext _reader_context;

OlapReaderStatistics _stats;

DISALLOW_COPY_AND_ASSIGN(SchemaChangeHandler);
};

Expand Down