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

[feature] (vec) instead of converting line to src tuple for stream load in vectorized. #9314

Merged
merged 4 commits into from
May 9, 2022

Conversation

xiepengcheng01
Copy link
Contributor

Proposed changes

Support stream load in vectorized instead of converting line to src tuple for vbroker scanner.

Issue Number: close #xxx

Problem Summary:

Describe the overview of changes.

Checklist(Required)

  1. Does it affect the original behavior: (Yes/No/I Don't know)
  2. Has unit tests been added: (Yes/No/No Need)
  3. Has document been added or modified: (Yes/No/No Need)
  4. Does it need to update dependencies: (Yes/No)
  5. Are there any changes that cannot be rolled back: (Yes/No)

Further comments

If this is a relatively large or complex change, kick off the discussion at dev@doris.apache.org by explaining why you chose the solution you did and what alternatives you considered, etc...

RETURN_IF_ERROR(ctx->prepare(_state, *_row_desc.get(), _mem_tracker));
RETURN_IF_ERROR(ctx->open(_state));
_dest_vexpr_ctx.emplace_back(ctx);
}
Copy link
Contributor

Choose a reason for hiding this comment

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

else {}

if (range.__isset.num_of_columns_from_file) {
fill_slots_of_columns_from_path(range.num_of_columns_from_file, columns_from_path);
fill_slots_of_columns_from_path(range.num_of_columns_from_file, range.columns_from_path);
}

_success = true;
Copy link
Contributor

Choose a reason for hiding this comment

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

in function line_split_to_values have set the _success,not need set here.


RETURN_IF_ERROR(VExprContext::filter_block(_vconjunct_ctx_ptr, block.get(),
_tuple_desc->slots().size()));
_mutable_block->add_rows(block.get(), begin, row_add);
Copy link
Contributor

Choose a reason for hiding this comment

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

here must have a copy here. should opt to skip the copy operation. if _mutable_block.size() + block.size() < batch_size to do merge. else directly return the block, do not copy here

}
auto output_block = _mutable_block->to_block();
std::shared_ptr<vectorized::Block> block_ptr(new vectorized::Block());
block_ptr->swap(std::move(output_block));
Copy link
Contributor

Choose a reason for hiding this comment

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

block_ptr->swap(_mutable_block->to_block());

if (_scan_finished.load()) {
return Status::OK();
}
std::shared_ptr<vectorized::Block> block(new vectorized::Block());
Copy link
Contributor

Choose a reason for hiding this comment

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

why here is shared_ptr ? not the unique_ptr?

SCOPED_TIMER(_read_timer);

const int batch_size = _state->batch_size();
std::shared_ptr<vectorized::Block> tmp_block(std::make_shared<Block>());
Copy link
Contributor

Choose a reason for hiding this comment

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

why define tmp_block here ? should in _fill_dest_block.

@xiepengcheng01 xiepengcheng01 force-pushed the vec-load branch 2 times, most recently from cacbcbe to 7190796 Compare May 6, 2022 02:40
_queue_writer_cond.notify_all();

// All scanner has been finished, and all cached batch has been read
if (scanner_block == nullptr || scanner_block.get() == nullptr) {
Copy link
Contributor

Choose a reason for hiding this comment

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

scanner_block == nullptr || scanner_block.get() == nullptr only need one

// notify one scanner
_queue_writer_cond.notify_one();

if (_mutable_block.get() == nullptr) {
Copy link
Contributor

Choose a reason for hiding this comment

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

unlikely, should move the line to up

HappenLee
HappenLee previously approved these changes May 6, 2022
Copy link
Contributor

@HappenLee HappenLee left a comment

Choose a reason for hiding this comment

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

LGTM

@github-actions github-actions bot added the approved Indicates a PR has been approved by one committer. label May 6, 2022
@github-actions
Copy link
Contributor

github-actions bot commented May 6, 2022

PR approved by at least one committer and no changes requested.

@github-actions
Copy link
Contributor

github-actions bot commented May 6, 2022

PR approved by anyone and no changes requested.

@github-actions github-actions bot removed the approved Indicates a PR has been approved by one committer. label May 7, 2022
Copy link
Contributor

@HappenLee HappenLee left a comment

Choose a reason for hiding this comment

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

LGTM

@github-actions
Copy link
Contributor

github-actions bot commented May 7, 2022

PR approved by at least one committer and no changes requested.

@github-actions github-actions bot added the approved Indicates a PR has been approved by one committer. label May 7, 2022
@HappenLee HappenLee merged commit eec1dfd into apache:master May 9, 2022
zhengshiJ pushed a commit to zhengshiJ/incubator-doris that referenced this pull request May 9, 2022
…ad in vectorized. (apache#9314)

Co-authored-by: xiepengcheng01 <xiepengcheng01@xafj-palo-rpm64.xafj.baidu.com>
zhengshiJ pushed a commit to zhengshiJ/incubator-doris that referenced this pull request May 13, 2022
…ad in vectorized. (apache#9314)

Co-authored-by: xiepengcheng01 <xiepengcheng01@xafj-palo-rpm64.xafj.baidu.com>
starocean999 pushed a commit to starocean999/incubator-doris that referenced this pull request May 19, 2022
…ad in vectorized. (apache#9314)

Co-authored-by: xiepengcheng01 <xiepengcheng01@xafj-palo-rpm64.xafj.baidu.com>
englefly pushed a commit to englefly/incubator-doris that referenced this pull request May 23, 2022
…ad in vectorized. (apache#9314)

Co-authored-by: xiepengcheng01 <xiepengcheng01@xafj-palo-rpm64.xafj.baidu.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by one committer. area/vectorization reviewed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants