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/07/19 06:18:57 UTC

[GitHub] [doris] morningman opened a new pull request, #11000: [feature-wip](multi-catalog) Support runtime filter for file scan node

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

   # Proposed changes
   
   Issue Number: close #xxx
   
   ## Problem Summary:
   
   1. Support runtime filter for file scan node
   2. Refactor some profile of file scan node
   
   ## Checklist(Required)
   
   1. Does it affect the original behavior: (No)
   4. Has unit tests been added: (No)
   5. Has document been added or modified: (No Need)
   6. Does it need to update dependencies: (No)
   7. Are there any changes that cannot be rolled back: (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] [doris] yiguolei merged pull request #11000: [feature-wip](multi-catalog) Support runtime filter for file scan node

Posted by GitBox <gi...@apache.org>.
yiguolei merged PR #11000:
URL: https://github.com/apache/doris/pull/11000


-- 
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] [doris] morningman commented on a diff in pull request #11000: [feature-wip](multi-catalog) Support runtime filter for file scan node

Posted by GitBox <gi...@apache.org>.
morningman commented on code in PR #11000:
URL: https://github.com/apache/doris/pull/11000#discussion_r925101385


##########
be/src/vec/exec/file_scan_node.cpp:
##########
@@ -90,18 +115,102 @@ Status FileScanNode::open(RuntimeState* state) {
     RETURN_IF_ERROR(ExecNode::open(state));
     RETURN_IF_CANCELLED(state);
 
+    RETURN_IF_ERROR(_acquire_and_build_runtime_filter(state));
+
     RETURN_IF_ERROR(start_scanners());
 
     return Status::OK();
 }
 
+Status FileScanNode::_acquire_and_build_runtime_filter(RuntimeState* state) {
+    // acquire runtime filter
+    _runtime_filter_ctxs.resize(_runtime_filter_descs.size());
+    for (size_t i = 0; i < _runtime_filter_descs.size(); ++i) {
+        auto& filter_desc = _runtime_filter_descs[i];
+        IRuntimeFilter* runtime_filter = nullptr;
+        state->runtime_filter_mgr()->get_consume_filter(filter_desc.filter_id, &runtime_filter);
+        DCHECK(runtime_filter != nullptr);

Review Comment:
   No, this only take effect when compiling BE with DEBUG mode



-- 
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] [doris] github-actions[bot] commented on pull request #11000: [feature-wip](multi-catalog) Support runtime filter for file scan node

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

   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


[GitHub] [doris] Jibing-Li commented on a diff in pull request #11000: [feature-wip](multi-catalog) Support runtime filter for file scan node

Posted by GitBox <gi...@apache.org>.
Jibing-Li commented on code in PR #11000:
URL: https://github.com/apache/doris/pull/11000#discussion_r924148547


##########
be/src/vec/exec/file_scan_node.cpp:
##########
@@ -90,18 +115,102 @@ Status FileScanNode::open(RuntimeState* state) {
     RETURN_IF_ERROR(ExecNode::open(state));
     RETURN_IF_CANCELLED(state);
 
+    RETURN_IF_ERROR(_acquire_and_build_runtime_filter(state));
+
     RETURN_IF_ERROR(start_scanners());
 
     return Status::OK();
 }
 
+Status FileScanNode::_acquire_and_build_runtime_filter(RuntimeState* state) {
+    // acquire runtime filter
+    _runtime_filter_ctxs.resize(_runtime_filter_descs.size());
+    for (size_t i = 0; i < _runtime_filter_descs.size(); ++i) {
+        auto& filter_desc = _runtime_filter_descs[i];
+        IRuntimeFilter* runtime_filter = nullptr;
+        state->runtime_filter_mgr()->get_consume_filter(filter_desc.filter_id, &runtime_filter);
+        DCHECK(runtime_filter != nullptr);

Review Comment:
   Will DCHECK(false) throw an exception? I didn't find its definition.



##########
be/src/vec/exec/file_scan_node.cpp:
##########
@@ -90,18 +115,102 @@ Status FileScanNode::open(RuntimeState* state) {
     RETURN_IF_ERROR(ExecNode::open(state));
     RETURN_IF_CANCELLED(state);
 
+    RETURN_IF_ERROR(_acquire_and_build_runtime_filter(state));
+
     RETURN_IF_ERROR(start_scanners());
 
     return Status::OK();
 }
 
+Status FileScanNode::_acquire_and_build_runtime_filter(RuntimeState* state) {
+    // acquire runtime filter
+    _runtime_filter_ctxs.resize(_runtime_filter_descs.size());
+    for (size_t i = 0; i < _runtime_filter_descs.size(); ++i) {
+        auto& filter_desc = _runtime_filter_descs[i];
+        IRuntimeFilter* runtime_filter = nullptr;
+        state->runtime_filter_mgr()->get_consume_filter(filter_desc.filter_id, &runtime_filter);
+        DCHECK(runtime_filter != nullptr);

Review Comment:
   What will happen if DCHECK(false)?



##########
fe/fe-core/src/main/java/org/apache/doris/planner/RuntimeFilterGenerator.java:
##########
@@ -321,7 +322,7 @@ private void finalizeRuntimeFilter(RuntimeFilter runtimeFilter) {
      * 2. Only olap scan nodes are supported:
      */
     private void assignRuntimeFilters(ScanNode scanNode) {
-        if (!(scanNode instanceof OlapScanNode)) {
+        if (!(scanNode instanceof OlapScanNode) && !(scanNode instanceof ExternalFileScanNode)) {

Review Comment:
   I suppose ExternalFileScanNode is used only when `enable_multi_catalog` is set to true.



-- 
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] [doris] morningman commented on a diff in pull request #11000: [feature-wip](multi-catalog) Support runtime filter for file scan node

Posted by GitBox <gi...@apache.org>.
morningman commented on code in PR #11000:
URL: https://github.com/apache/doris/pull/11000#discussion_r925101204


##########
fe/fe-core/src/main/java/org/apache/doris/planner/RuntimeFilterGenerator.java:
##########
@@ -321,7 +322,7 @@ private void finalizeRuntimeFilter(RuntimeFilter runtimeFilter) {
      * 2. Only olap scan nodes are supported:
      */
     private void assignRuntimeFilters(ScanNode scanNode) {
-        if (!(scanNode instanceof OlapScanNode)) {
+        if (!(scanNode instanceof OlapScanNode) && !(scanNode instanceof ExternalFileScanNode)) {

Review Comment:
   Yes



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