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

[fix] (inverted index ) fix inverted index queries in AGG and MOR table #38371

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

csun5285
Copy link
Contributor

Proposed changes

On AGG and MOR tables, the key columns are copied first, then the value columns are aggregated.
The result columns from the inverted index computation should be retained.

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.

@csun5285
Copy link
Contributor Author

run buildall

Copy link
Contributor

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

std::string {InvertedIndexDescriptor::get_index_file_path_prefix(
file_writer->path().c_str())},
std::string {
InvertedIndexDescriptor::get_index_file_path_prefix(segment_file_path)},
Copy link
Contributor

Choose a reason for hiding this comment

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

why change it?

@@ -233,7 +233,9 @@ Status BlockReader::init(const ReaderParams& read_params) {
}
return status;
}

if (size_t cols = _next_row.block->columns() - _return_columns_loc.size() > 0; cols > 0) {
Copy link
Contributor

Choose a reason for hiding this comment

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

It not a common style to write multiple statements in if.

@@ -97,6 +97,10 @@ class BlockReader final : public TabletReader {
std::vector<int> _normal_columns_idx; // key column on agg mode, all column on uniq mode
std::vector<int> _agg_columns_idx;
std::vector<int> _return_columns_loc;
// before reading the segment, some expressions will compute results through the index to generate result columns
// retain this result column when calculating the agg value
int _index_result_columns = 0;
Copy link
Contributor

Choose a reason for hiding this comment

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

It seems to be not safe.

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.

4 participants