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

[Optimize](parquet-reader) Add has_filter template param in get_next_run() to decrease _has_filter condition checking count in the loop. #19043

Merged
merged 1 commit into from
Apr 27, 2023

Conversation

kaka11chen
Copy link
Contributor

Proposed changes

Problem summary

In XXXDecoder::decode_values():

while (size_t run_length = select_vector.get_next_run<has_filter>(&read_type)) {
 ... 
}

It will call get_next_run(), need to check _has_filter in the loop.

size_t get_next_run(DataReadType* data_read_type) {
    if (_has_filter) {
    
    } else {
  
    }
}

It is unnecessary. So optimize it by adding has_filter template param in get_next_run() to decrease _has_filter condition checking count in the loop.

Checklist(Required)

  • Does it affect the original behavior
  • Has unit tests been added
  • Has document been added or modified
  • Does it need to update dependencies
  • Is this PR support rollback (If NO, please explain WHY)

Further comments

If this is a relatively large or complex change, kick off the discussion at [email protected] by explaining why you chose the solution you did and what alternatives you considered, etc...

…ease `_has_filter` condition checking count in the loop.`
@github-actions
Copy link
Contributor

clang-tidy review says "All clean, LGTM! 👍"

@kaka11chen
Copy link
Contributor Author

run buildall

@hello-stephen
Copy link
Contributor

TeamCity pipeline, clickbench performance test result:
the sum of best hot time: 33.92 seconds
stream load tsv: 429 seconds loaded 74807831229 Bytes, about 166 MB/s
stream load json: 24 seconds loaded 2358488459 Bytes, about 93 MB/s
stream load orc: 58 seconds loaded 1101869774 Bytes, about 18 MB/s
stream load parquet: 31 seconds loaded 861443392 Bytes, about 26 MB/s
https://doris-community-test-1308700295.cos.ap-hongkong.myqcloud.com/tmp/20230425081803_clickbench_pr_134684.html

Copy link
Contributor

@morningman morningman 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 Apr 27, 2023
@github-actions
Copy link
Contributor

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

@github-actions
Copy link
Contributor

PR approved by anyone and no changes requested.

@AshinGau
Copy link
Member

LGTM

Copy link
Contributor

@morningman morningman left a comment

Choose a reason for hiding this comment

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

LGTM

@morningman morningman merged commit 3ed5cf8 into apache:master Apr 27, 2023
Reminiscent pushed a commit to Reminiscent/doris that referenced this pull request May 15, 2023
…ease `_has_filter` condition checking count in the loop.` (apache#19043)
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.

4 participants