Fix BE unit tests#887
Merged
chaoyli merged 2 commits intoApr 8, 2019
Merged
Conversation
Contributor
kangpinghuang
commented
Apr 8, 2019
- fix BE unit tests compile problems
- fix some bugs
- fix some format problems
chaoyli
requested changes
Apr 8, 2019
| _schema(schema) { | ||
| _schema(schema), | ||
| _columns(nullptr) { | ||
| if (_schema != nullptr) { |
Contributor
There was a problem hiding this comment.
if _schema is nullptr, all following operations is no-sense.
| RowBlockInfo _info; | ||
| const TabletSchema* _schema; // 内部保存的schema句柄 | ||
|
|
||
| const std::vector<TabletColumn>* _columns; |
| OLAPStatus init_scan_key(const TabletSchema& schema, | ||
| const std::vector<std::string>& keys); | ||
|
|
||
| OLAPStatus init_scan_key(const std::vector<TabletColumn>& schema, |
Contributor
There was a problem hiding this comment.
If you call this function, you will need all columns of schema. There is no necessary to overload with std::vector& schema parameter.
| OLAPStatus allocate_memory_for_string_type(const TabletSchema& schema, | ||
| MemPool* mem_pool = nullptr); | ||
|
|
||
|
|
| for (auto& it : tablet_meta_pb.rs_metas()) { | ||
| RowsetMetaSharedPtr rs_meta(new AlphaRowsetMeta()); | ||
| rs_meta->init_from_pb(it); | ||
| if (rs_meta->has_delete_predicate()) { |
Contributor
There was a problem hiding this comment.
If you remove it, where to add delete predicate?
| rowset_ptr->set_version_and_version_hash(version, version_hash); | ||
| OLAPStatus save_status = RowsetMetaManager::save(meta, | ||
| rowset_ptr->rowset_id(), | ||
| rowset_ptr->rowset_meta()); |
Contributor
There was a problem hiding this comment.
Why not SharedPtr is not ok?
Contributor
Author
There was a problem hiding this comment.
because save api just use pointer, no need to manage the object
|
|
||
| private: | ||
| const TabletSchema* _schema; | ||
| const std::vector<TabletColumn>* _schema; |
Contributor
There was a problem hiding this comment.
Only in RowCursor, I must to use std::vector. Because there exists a situation it only partial TabletColumn. Otherwise, TabletSchema is only parameter can be imported.
| field_info.unique_id = 0; \ | ||
| field_info.is_bf_column = false; \ | ||
| void SetTabletColumn(std::string name, \ | ||
| std::string type, std::string aggregation, \ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.