Skip to content

Fix BE unit tests#887

Merged
chaoyli merged 2 commits into
apache:be_refactorfrom
kangpinghuang:be_refactor_new_fix_unit_tests_new
Apr 8, 2019
Merged

Fix BE unit tests#887
chaoyli merged 2 commits into
apache:be_refactorfrom
kangpinghuang:be_refactor_new_fix_unit_tests_new

Conversation

@kangpinghuang
Copy link
Copy Markdown
Contributor

  1. fix BE unit tests compile problems
  2. fix some bugs
  3. fix some format problems

Comment thread be/src/olap/row_block.cpp Outdated
_schema(schema) {
_schema(schema),
_columns(nullptr) {
if (_schema != nullptr) {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if _schema is nullptr, all following operations is no-sense.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK

Comment thread be/src/olap/row_block.h Outdated
RowBlockInfo _info;
const TabletSchema* _schema; // 内部保存的schema句柄

const std::vector<TabletColumn>* _columns;
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do you need _columns?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK

Comment thread be/src/olap/row_cursor.h Outdated
OLAPStatus init_scan_key(const TabletSchema& schema,
const std::vector<std::string>& keys);

OLAPStatus init_scan_key(const std::vector<TabletColumn>& schema,
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you call this function, you will need all columns of schema. There is no necessary to overload with std::vector& schema parameter.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK

Comment thread be/src/olap/row_cursor.h Outdated
OLAPStatus allocate_memory_for_string_type(const TabletSchema& schema,
MemPool* mem_pool = nullptr);


Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The same question

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK

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()) {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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());
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not SharedPtr is not ok?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

because save api just use pointer, no need to manage the object

Comment thread be/src/runtime/vectorized_row_batch.h Outdated

private:
const TabletSchema* _schema;
const std::vector<TabletColumn>* _schema;
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK

field_info.unique_id = 0; \
field_info.is_bf_column = false; \
void SetTabletColumn(std::string name, \
std::string type, std::string aggregation, \
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

const std::string&

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK

@chaoyli chaoyli merged commit 14be2f6 into apache:be_refactor Apr 8, 2019
@kangpinghuang kangpinghuang deleted the be_refactor_new_fix_unit_tests_new branch August 20, 2019 06:54
platoneko pushed a commit to platoneko/doris that referenced this pull request Oct 27, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants