You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by "csun5285 (via GitHub)" <gi...@apache.org> on 2024/07/25 08:40:30 UTC

[PR] [fix] (inverted index ) fix inverted index queries in AGG and MOR table [doris]

csun5285 opened a new pull request, #38371:
URL: https://github.com/apache/doris/pull/38371

   ## 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
   
   <!--Describe your changes.-->
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


Re: [PR] [fix] (inverted index ) fix inverted index queries in AGG and MOR table [doris]

Posted by "doris-robot (via GitHub)" <gi...@apache.org>.
doris-robot commented on PR #38371:
URL: https://github.com/apache/doris/pull/38371#issuecomment-2249787474

   Thank you for your contribution to Apache Doris.
   Don't know what should be done next? See [How to process your PR](https://cwiki.apache.org/confluence/display/DORIS/How+to+process+your+PR)
   
   Since 2024-03-18, the Document has been moved to [doris-website](https://github.com/apache/doris-website).
   See [Doris Document](https://cwiki.apache.org/confluence/display/DORIS/Doris+Document).


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


Re: [PR] [fix] (inverted index ) fix inverted index queries in AGG and MOR table [doris]

Posted by "csun5285 (via GitHub)" <gi...@apache.org>.
csun5285 commented on PR #38371:
URL: https://github.com/apache/doris/pull/38371#issuecomment-2249787624

   run buildall


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


Re: [PR] [fix] (inverted index ) fix inverted index queries in AGG and MOR table [doris]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #38371:
URL: https://github.com/apache/doris/pull/38371#issuecomment-2856632967

   We're closing this PR because it hasn't been updated in a while.
   This isn't a judgement on the merit of the PR in any way. It's just a way of keeping the PR queue manageable.
   If you'd like to revive this PR, please reopen it and feel free a maintainer to remove the Stale tag!


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


Re: [PR] [fix] (inverted index ) fix inverted index queries in AGG and MOR table [doris]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] closed pull request #38371: [fix] (inverted index ) fix inverted index queries in AGG and MOR table
URL: https://github.com/apache/doris/pull/38371


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


Re: [PR] [fix] (inverted index ) fix inverted index queries in AGG and MOR table [doris]

Posted by "xiaokang (via GitHub)" <gi...@apache.org>.
xiaokang commented on code in PR #38371:
URL: https://github.com/apache/doris/pull/38371#discussion_r1694234157


##########
be/src/olap/rowset/segment_v2/segment_writer.cpp:
##########
@@ -137,10 +137,15 @@ SegmentWriter::SegmentWriter(io::FileWriter* file_writer, uint32_t segment_id,
         }
     }
     if (_tablet_schema->has_inverted_index()) {
+        std::string segment_file_path = file_writer->path().c_str();
+        // if file_writer is a StreamSinkFileWriter, path is empty
+        if (segment_file_path.empty()) {
+            segment_file_path = _opts.rowset_ctx->segment_path(segment_id);
+        }
         _inverted_index_file_writer = std::make_unique<InvertedIndexFileWriter>(
                 _opts.rowset_ctx->fs(),
-                std::string {InvertedIndexDescriptor::get_index_file_path_prefix(
-                        file_writer->path().c_str())},
+                std::string {
+                        InvertedIndexDescriptor::get_index_file_path_prefix(segment_file_path)},

Review Comment:
   why change it?



##########
be/src/vec/olap/block_reader.h:
##########
@@ -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;

Review Comment:
   It seems to be not safe.



##########
be/src/vec/olap/block_reader.cpp:
##########
@@ -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) {

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



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


Re: [PR] [fix] (inverted index ) fix inverted index queries in AGG and MOR table [doris]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #38371:
URL: https://github.com/apache/doris/pull/38371#issuecomment-2249800651

   clang-tidy review says "All clean, LGTM! :+1:"


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org