You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by GitBox <gi...@apache.org> on 2022/05/11 11:40:04 UTC

[GitHub] [incubator-doris] xiepengcheng01 opened a new pull request, #9508: [Refactor] add vpre_filter_expr for vectorized to improve performance

xiepengcheng01 opened a new pull request, #9508:
URL: https://github.com/apache/incubator-doris/pull/9508

   # Proposed changes
   1.Simplify code logic of vbroker_scanner
   2.Add vpre_filter_expr for vectorized to improve performance
   
   Issue Number: close #xxx
   
   ## Problem Summary:
   
   Describe the overview of changes.
   
   ## Checklist(Required)
   
   1. Does it affect the original behavior: (Yes/No/I Don't know)
   2. Has unit tests been added: (Yes/No/No Need)
   3. Has document been added or modified: (Yes/No/No Need)
   4. Does it need to update dependencies: (Yes/No)
   5. Are there any changes that cannot be rolled back: (Yes/No)
   
   ## Further comments
   
   If this is a relatively large or complex change, kick off the discussion at [dev@doris.apache.org](mailto:dev@doris.apache.org) by explaining why you chose the solution you did and what alternatives you considered, etc...
   


-- 
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


[GitHub] [incubator-doris] HappenLee commented on a diff in pull request #9508: [Refactor] add vpre_filter_expr for vectorized to improve performance

Posted by GitBox <gi...@apache.org>.
HappenLee commented on code in PR #9508:
URL: https://github.com/apache/incubator-doris/pull/9508#discussion_r870907236


##########
be/src/exec/base_scanner.cpp:
##########
@@ -279,6 +286,54 @@ Status BaseScanner::_fill_dest_tuple(Tuple* dest_tuple, MemPool* mem_pool) {
     return Status::OK();
 }
 
+Status BaseScanner::filter_block(vectorized::Block* input_block, int slot_num) {
+    auto old_rows = input_block->rows();
+    RETURN_IF_ERROR(
+            vectorized::VExprContext::filter_block(_vpre_filter_ctx_ptr, input_block, slot_num));
+    _counter->num_rows_unselected += old_rows - input_block->rows();
+    return Status::OK();
+}
+
+Status BaseScanner::execute_exprs(vectorized::Block* output_block, vectorized::Block* input_block) {
+    // Do vectorized expr here
+    Status status;
+    if (!_dest_vexpr_ctx.empty()) {
+        *output_block = vectorized::VExprContext::get_output_block_after_execute_exprs(
+                _dest_vexpr_ctx, *input_block, status);
+        if (UNLIKELY(output_block->rows() == 0)) {
+            _success = false;
+            return status;
+        }
+    }
+
+    return Status::OK();
+}
+
+Status BaseScanner::fill_dest_block(vectorized::Block* dest_block,
+                                    std::vector<vectorized::MutableColumnPtr>& columns) {
+    if (columns.empty() || columns[0]->size() == 0) {
+        return Status::OK();
+    }
+
+    std::unique_ptr<vectorized::Block> temp_block(new vectorized::Block());

Review Comment:
   use stack blockļ¼Œ not smart ptr



##########
gensrc/thrift/PlanNodes.thrift:
##########
@@ -253,6 +253,7 @@ struct TBrokerScanNode {
     2: optional list<Exprs.TExpr> partition_exprs
     3: optional list<Partitions.TRangePartition> partition_infos
 	4: optional list<Exprs.TExpr> pre_filter_exprs

Review Comment:
   code format



-- 
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


[GitHub] [incubator-doris] HappenLee merged pull request #9508: [Refactor] add vpre_filter_expr for vectorized to improve performance

Posted by GitBox <gi...@apache.org>.
HappenLee merged PR #9508:
URL: https://github.com/apache/incubator-doris/pull/9508


-- 
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


[GitHub] [incubator-doris] github-actions[bot] commented on pull request #9508: [Refactor] add vpre_filter_expr for vectorized to improve performance

Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on PR #9508:
URL: https://github.com/apache/incubator-doris/pull/9508#issuecomment-1133641348

   PR approved by at least one committer and no changes requested.


-- 
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


[GitHub] [incubator-doris] github-actions[bot] commented on pull request #9508: [Refactor] add vpre_filter_expr for vectorized to improve performance

Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on PR #9508:
URL: https://github.com/apache/incubator-doris/pull/9508#issuecomment-1133641353

   PR approved by anyone and no changes requested.


-- 
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