-
Notifications
You must be signed in to change notification settings - Fork 3.4k
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
base: master
Are you sure you want to change the base?
Conversation
Thank you for your contribution to Apache Doris. Since 2024-03-18, the Document has been moved to doris-website. |
run buildall |
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)}, |
There was a problem hiding this comment.
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) { |
There was a problem hiding this comment.
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; |
There was a problem hiding this comment.
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.
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