Uh oh!
There was an error while loading. Please reload this page.
[fix](Nereids) handle continuous filter or project in plan - #40176
Merged
starocean999 merged 1 commit intoSep 10, 2024
Merged
Conversation
doris-robot
commented
Aug 30, 2024
Thank you for your contribution to Apache Doris. Since 2024-03-18, the Document has been moved to doris-website. |
morrySnow
commented
Aug 30, 2024
ContributorAuthor
run buildall |
doris-robot
commented
Aug 30, 2024
TPC-H: Total hot run time: 38091 ms |
morrySnowforce-pushed
the
prevent_continuous_filter_or_project
branch
from
September 3, 2024 10:01
e5fe1d4 to
2eef885ComparemorrySnow
commented
Sep 3, 2024
ContributorAuthor
run buildall |
doris-robot
commented
Sep 3, 2024
TPC-H: Total hot run time: 38347 ms |
doris-robot
commented
Sep 3, 2024
TPC-DS: Total hot run time: 188187 ms |
doris-robot
commented
Sep 3, 2024
ClickBench: Total hot run time: 31.78 s |
morrySnowforce-pushed
the
prevent_continuous_filter_or_project
branch
from
September 4, 2024 04:22
2eef885 to
669d07cComparemorrySnow
commented
Sep 4, 2024
ContributorAuthor
run buildall |
doris-robot
commented
Sep 4, 2024
TPC-H: Total hot run time: 38472 ms |
doris-robot
commented
Sep 4, 2024
TPC-DS: Total hot run time: 188701 ms |
doris-robot
commented
Sep 4, 2024
ClickBench: Total hot run time: 32.87 s |
morrySnowforce-pushed
the
prevent_continuous_filter_or_project
branch
from
September 4, 2024 09:35
669d07c to
5eb13c8ComparemorrySnow
commented
Sep 4, 2024
ContributorAuthor
run buildall |
doris-robot
commented
Sep 4, 2024
TPC-H: Total hot run time: 38192 ms |
doris-robot
commented
Sep 4, 2024
TPC-DS: Total hot run time: 188294 ms |
doris-robot
commented
Sep 4, 2024
ClickBench: Total hot run time: 32.52 s |
morrySnow
commented
Sep 4, 2024
ContributorAuthor
run buildall |
doris-robot
commented
Sep 4, 2024
TPC-H: Total hot run time: 38842 ms |
doris-robot
commented
Sep 4, 2024
TPC-DS: Total hot run time: 192111 ms |
doris-robot
commented
Sep 4, 2024
ClickBench: Total hot run time: 32.5 s |
morrySnow
commented
Sep 5, 2024
ContributorAuthor
run buildall |
doris-robot
commented
Sep 5, 2024
TPC-H: Total hot run time: 38171 ms |
doris-robot
commented
Sep 5, 2024
TPC-DS: Total hot run time: 193835 ms |
doris-robot
commented
Sep 5, 2024
ClickBench: Total hot run time: 32.6 s |
morrySnow
commented
Sep 5, 2024
ContributorAuthor
run cloud_p0 |
if we meet continuous project or filter in translator, we try to generate SelectNode as far as possible to avoid generate invalid plan for example ``` Filter(conjuncts 1) +-- Limit (limit 10) +-- Filter(conjuncts 2) +-- Aggregate ``` will be translated to ``` SELECT_NODE (conjuncts 1) +-- AGGREGATE_NODE (conjuncts 2) (limit 10) ```
morrySnowforce-pushed
the
prevent_continuous_filter_or_project
branch
from
September 6, 2024 08:07
5eb13c8 to
20271f6ComparemorrySnow
commented
Sep 6, 2024
ContributorAuthor
run buildall |
morrySnow pushed a commit
that referenced
this pull request
Oct 17, 2024
…#41218) In the previous FileScanNode, some parts that used conjuncts for predicate conversion were placed in the init phase. However, for the Nereids planner, pushing the filter down to the scan happens in the Translator, which means that the ScanNode can only get the complete conjuncts in the finalized phase. Therefore, in this PR, I have removed all conjuncts variables in External for the Nereids planner. They no longer need to store conjuncts themselves or add them to the ScanNode. Instead, all places in the ScanNode that use conjuncts should be moved to the finalized phase. This refactor also fix a performance issue introduced from #40176 After introducing the change of generating SelectNode for consecutive projects or filters, FileScan still adds conjuncts too early in the init phase, resulting in the discovery of consecutive filters when the upper layer continues to translate, a selectnode was unexpectedly generated on the scannode, causing the project to be unable to prune the scannode columns. However, the Project node trims columns of SelectNode and ScanNode differently, which causes ScanNode to scan unnecessary columns. My modification removes the addition of conjuncts in the scannode step, so that we can keep the structure from ScanNode to Project and achieve correct column trimming.
zy-kkk added a commit
to zy-kkk/doris
that referenced
this pull request
Oct 22, 2024
…apache#41218) In the previous FileScanNode, some parts that used conjuncts for predicate conversion were placed in the init phase. However, for the Nereids planner, pushing the filter down to the scan happens in the Translator, which means that the ScanNode can only get the complete conjuncts in the finalized phase. Therefore, in this PR, I have removed all conjuncts variables in External for the Nereids planner. They no longer need to store conjuncts themselves or add them to the ScanNode. Instead, all places in the ScanNode that use conjuncts should be moved to the finalized phase. This refactor also fix a performance issue introduced from apache#40176 After introducing the change of generating SelectNode for consecutive projects or filters, FileScan still adds conjuncts too early in the init phase, resulting in the discovery of consecutive filters when the upper layer continues to translate, a selectnode was unexpectedly generated on the scannode, causing the project to be unable to prune the scannode columns. However, the Project node trims columns of SelectNode and ScanNode differently, which causes ScanNode to scan unnecessary columns. My modification removes the addition of conjuncts in the scannode step, so that we can keep the structure from ScanNode to Project and achieve correct column trimming.
morningman pushed a commit
that referenced
this pull request
Oct 22, 2024
… Scan (#42261) pick (#41218) In the previous FileScanNode, some parts that used conjuncts for predicate conversion were placed in the init phase. However, for the Nereids planner, pushing the filter down to the scan happens in the Translator, which means that the ScanNode can only get the complete conjuncts in the finalized phase. Therefore, in this PR, I have removed all conjuncts variables in External for the Nereids planner. They no longer need to store conjuncts themselves or add them to the ScanNode. Instead, all places in the ScanNode that use conjuncts should be moved to the finalized phase. This refactor also fix a performance issue introduced from #40176 After introducing the change of generating SelectNode for consecutive projects or filters, FileScan still adds conjuncts too early in the init phase, resulting in the discovery of consecutive filters when the upper layer continues to translate, a selectnode was unexpectedly generated on the scannode, causing the project to be unable to prune the scannode columns. However, the Project node trims columns of SelectNode and ScanNode differently, which causes ScanNode to scan unnecessary columns. My modification removes the addition of conjuncts in the scannode step, so that we can keep the structure from ScanNode to Project and achieve correct column trimming.
zy-kkk added a commit
to zy-kkk/doris
that referenced
this pull request
Oct 31, 2024
…apache#41218) In the previous FileScanNode, some parts that used conjuncts for predicate conversion were placed in the init phase. However, for the Nereids planner, pushing the filter down to the scan happens in the Translator, which means that the ScanNode can only get the complete conjuncts in the finalized phase. Therefore, in this PR, I have removed all conjuncts variables in External for the Nereids planner. They no longer need to store conjuncts themselves or add them to the ScanNode. Instead, all places in the ScanNode that use conjuncts should be moved to the finalized phase. This refactor also fix a performance issue introduced from apache#40176 After introducing the change of generating SelectNode for consecutive projects or filters, FileScan still adds conjuncts too early in the init phase, resulting in the discovery of consecutive filters when the upper layer continues to translate, a selectnode was unexpectedly generated on the scannode, causing the project to be unable to prune the scannode columns. However, the Project node trims columns of SelectNode and ScanNode differently, which causes ScanNode to scan unnecessary columns. My modification removes the addition of conjuncts in the scannode step, so that we can keep the structure from ScanNode to Project and achieve correct column trimming.
morningman pushed a commit
that referenced
this pull request
Oct 31, 2024
… Scan (#43018) bp (#41218) In the previous FileScanNode, some parts that used conjuncts for predicate conversion were placed in the init phase. However, for the Nereids planner, pushing the filter down to the scan happens in the Translator, which means that the ScanNode can only get the complete conjuncts in the finalized phase. Therefore, in this PR, I have removed all conjuncts variables in External for the Nereids planner. They no longer need to store conjuncts themselves or add them to the ScanNode. Instead, all places in the ScanNode that use conjuncts should be moved to the finalized phase. This refactor also fix a performance issue introduced from #40176 After introducing the change of generating SelectNode for consecutive projects or filters, FileScan still adds conjuncts too early in the init phase, resulting in the discovery of consecutive filters when the upper layer continues to translate, a selectnode was unexpectedly generated on the scannode, causing the project to be unable to prune the scannode columns. However, the Project node trims columns of SelectNode and ScanNode differently, which causes ScanNode to scan unnecessary columns. My modification removes the addition of conjuncts in the scannode step, so that we can keep the structure from ScanNode to Project and achieve correct column trimming.
yujun777 pushed a commit
to yujun777/doris
that referenced
this pull request
Aug 15, 2025
) if we meet continuous project or filter in translator, we try to generate SelectNode as far as possible to avoid generate invalid plan for example ``` Filter(conjuncts 1) +-- Limit (limit 10) +-- Filter(conjuncts 2) +-- Aggregate ``` will be translated to ``` SELECT_NODE (conjuncts 1) +-- AGGREGATE_NODE (conjuncts 2) (limit 10) ```
This was referenced Aug 15, 2025
github-actionsBot
pushed a commit
that referenced
this pull request
Aug 15, 2025
if we meet continuous project or filter in translator, we try to generate SelectNode as far as possible to avoid generate invalid plan for example ``` Filter(conjuncts 1) +-- Limit (limit 10) +-- Filter(conjuncts 2) +-- Aggregate ``` will be translated to ``` SELECT_NODE (conjuncts 1) +-- AGGREGATE_NODE (conjuncts 2) (limit 10) ```
3 tasks
924060929 pushed a commit
that referenced
this pull request
Aug 21, 2025
yujun777 added a commit
to yujun777/doris
that referenced
this pull request
Aug 21, 2025
yujun777 added a commit
to yujun777/doris
that referenced
this pull request
Aug 21, 2025
yiguolei pushed a commit
that referenced
this pull request
Aug 22, 2025
morrySnow pushed a commit
that referenced
this pull request
Aug 22, 2025
dataroaring pushed a commit
that referenced
this pull request
Aug 24, 2025
Closed
3 tasks
HappenLee pushed a commit
to HappenLee/incubator-doris
that referenced
this pull request
Apr 24, 2026
) if we meet continuous project or filter in translator, we try to generate SelectNode as far as possible to avoid generate invalid plan for example ``` Filter(conjuncts 1) +-- Limit (limit 10) +-- Filter(conjuncts 2) +-- Aggregate ``` will be translated to ``` SELECT_NODE (conjuncts 1) +-- AGGREGATE_NODE (conjuncts 2) (limit 10) ```
HappenLee pushed a commit
to HappenLee/incubator-doris
that referenced
this pull request
Apr 24, 2026
…apache#41218) In the previous FileScanNode, some parts that used conjuncts for predicate conversion were placed in the init phase. However, for the Nereids planner, pushing the filter down to the scan happens in the Translator, which means that the ScanNode can only get the complete conjuncts in the finalized phase. Therefore, in this PR, I have removed all conjuncts variables in External for the Nereids planner. They no longer need to store conjuncts themselves or add them to the ScanNode. Instead, all places in the ScanNode that use conjuncts should be moved to the finalized phase. This refactor also fix a performance issue introduced from apache#40176 After introducing the change of generating SelectNode for consecutive projects or filters, FileScan still adds conjuncts too early in the init phase, resulting in the discovery of consecutive filters when the upper layer continues to translate, a selectnode was unexpectedly generated on the scannode, causing the project to be unable to prune the scannode columns. However, the Project node trims columns of SelectNode and ScanNode differently, which causes ScanNode to scan unnecessary columns. My modification removes the addition of conjuncts in the scannode step, so that we can keep the structure from ScanNode to Project and achieve correct column trimming.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for freeto join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
if we meet continuous project or filter in translator, we try to generate SelectNode as far as possible to avoid generate invalid plan
for example
will be translated to