Skip to content

ORC-442: [C++] Code improvements in Statistics and Writer.#343

Closed
fangzheng wants to merge 1 commit intoapache:masterfrom
fangzheng:orc-442
Closed

ORC-442: [C++] Code improvements in Statistics and Writer.#343
fangzheng wants to merge 1 commit intoapache:masterfrom
fangzheng:orc-442

Conversation

@fangzheng
Copy link
Copy Markdown
Contributor

A few code changes in Statistics and Writer classes:

  1. Change StatisticsImpl to use vector instead of list for storing ColumnStatistics. Because the required operations are push_back() in ctor, iteration in dtor, and random element access in getColumnStatistics(), and list does not support random access in constant time, vector would be more appropriate than list.

  2. InternalBooleanStatistics is currently typedef-ed as InternalStatisticsImpl<uint64_t>. Since min/max/sum does not apply to BooleanColumnStatistics, we should define InternalBooleanStatistics to be InternalStatisticsImpl to save 21 bytes per instance.

  3. Misc. changes to ColumnWriter.hh, Writer.cc, Compression.hh, and Statistics.hh to fix typos in Doxygen and reduce object copies.

Copy link
Copy Markdown
Member

@wgtmac wgtmac left a comment

Choose a reason for hiding this comment

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

LGTM +1

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.

3 participants