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

[Opt](orc-reader) Optimize orc reader by merging tiny stripes. #42062

Closed

Conversation

kaka11chen
Copy link
Contributor

Proposed changes

Issue Number: close #xxx

@doris-robot
Copy link

Thank you for your contribution to Apache Doris.
Don't know what should be done next? See How to process your PR

Since 2024-03-18, the Document has been moved to doris-website.
See Doris Document.

Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

clang-tidy made some suggestions

DiskRange span(const DiskRange& other) const {
int64_t newOffset = std::min(offset, other.offset);
int64_t newEnd = std::max(getEnd(), other.getEnd());
return DiskRange(newOffset, newEnd - newOffset);
Copy link
Contributor

Choose a reason for hiding this comment

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

warning: avoid repeating the return type from the declaration; use a braced initializer list instead [modernize-return-braced-init-list]

Suggested change
return DiskRange(newOffset, newEnd - newOffset);
return {newOffset, newEnd - newOffset};

_size = _reader->size();
}

~CachingFileReader() override {}
Copy link
Contributor

Choose a reason for hiding this comment

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

warning: use '= default' to define a trivial destructor [modernize-use-equals-default]

Suggested change
~CachingFileReader() override {}
~CachingFileReader() override = default;

RuntimeProfile* _profile = nullptr;
io::FileReaderSPtr _reader;
std::shared_ptr<RegionFinder> _region_finder;
int64_t _cache_position;
Copy link
Contributor

Choose a reason for hiding this comment

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

warning: use default member initializer for '_cache_position' [modernize-use-default-member-init]

be/src/io/fs/buffered_reader.h:593:

-               _cache_position(0),
+               ,
Suggested change
int64_t _cache_position;
int64_t _cache_position{0};

io::FileReaderSPtr _reader;
std::shared_ptr<RegionFinder> _region_finder;
int64_t _cache_position;
int _cache_length;
Copy link
Contributor

Choose a reason for hiding this comment

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

warning: use default member initializer for '_cache_length' [modernize-use-default-member-init]

be/src/io/fs/buffered_reader.h:594:

-               _cache_length(0),
+               ,
Suggested change
int _cache_length;
int _cache_length{0};


private:
std::vector<io::DiskRange> diskRanges;
size_t index;
Copy link
Contributor

Choose a reason for hiding this comment

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

warning: use default member initializer for 'index' [modernize-use-default-member-init]

be/src/vec/exec/format/orc/vorc_reader.h:693:

- )
+ )

be/src/vec/exec/format/orc/vorc_reader.h:730:

- ;
+ {0};

@kaka11chen kaka11chen closed this Nov 13, 2024
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