Skip to content

Conversation

@englefly
Copy link
Contributor

@englefly englefly commented Oct 14, 2024

Proposed changes

disable join reorder if any condition is matched:

  1. any table row count is -1
  2. any column, whose ndv is 0, but MinExpr or MaxExpr is not null
  3. ndv > 10* rowCount

Issue Number: close #xxx

@doris-robot
Copy link

Thank you for your contribution to Apache Doris.
Don't know what should be done next? See How to process your PR

Since 2024-03-18, the Document has been moved to doris-website.
See Doris Document.

@englefly englefly changed the title tmp [feat](nereids)disable join reorder if column stats is invalid Oct 14, 2024
@englefly englefly force-pushed the ndv-row-disjoinorder branch from edec83c to 72af654 Compare October 14, 2024 07:55
@englefly
Copy link
Contributor Author

run buildall

1 similar comment
@englefly
Copy link
Contributor Author

run buildall

@englefly englefly force-pushed the ndv-row-disjoinorder branch 3 times, most recently from abbf2e4 to 1fb4249 Compare October 15, 2024 06:31
@englefly
Copy link
Contributor Author

run buildall

@englefly englefly marked this pull request as ready for review October 15, 2024 06:48
Copy link
Contributor

@Jibing-Li Jibing-Li left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Better to add a test case.

@englefly englefly force-pushed the ndv-row-disjoinorder branch from 1fb4249 to 9b9d7fa Compare October 15, 2024 08:08
@englefly
Copy link
Contributor Author

run buildall

@englefly englefly force-pushed the ndv-row-disjoinorder branch from 9b9d7fa to 268aaa2 Compare October 21, 2024 09:26
@englefly
Copy link
Contributor Author

run buildall

@englefly
Copy link
Contributor Author

run p0

@englefly
Copy link
Contributor Author

run cloud_p0

@englefly
Copy link
Contributor Author

LGTM. Better to add a test case.

cases are appended to nereids_p0/stats/column_stats.groovy

@englefly
Copy link
Contributor Author

run buildall

5 similar comments
@englefly
Copy link
Contributor Author

run buildall

@englefly
Copy link
Contributor Author

run buildall

@englefly
Copy link
Contributor Author

run buildall

@englefly
Copy link
Contributor Author

run buildall

@englefly
Copy link
Contributor Author

run buildall

@englefly englefly force-pushed the ndv-row-disjoinorder branch from a3da30f to 078d02b Compare October 24, 2024 02:44
@englefly
Copy link
Contributor Author

run buildall

@github-actions
Copy link
Contributor

PR approved by anyone and no changes requested.

@englefly
Copy link
Contributor Author

run buildall

englefly added a commit to englefly/incubator-doris that referenced this pull request Oct 30, 2024
…e#41790)

## Proposed changes
disable join reorder if any condition is matched:
1. any table row count is -1
2. any column, whose ndv is 0, but MinExpr or MaxExpr is not null
3. ndv > 10* rowCount

Issue Number: close #xxx

<!--Describe your changes.-->

(cherry picked from commit e238a87)
englefly added a commit that referenced this pull request Oct 30, 2024
…(branch-2.1) (#42902)

## Proposed changes
pick #41790
Issue Number: close #xxx

<!--Describe your changes.-->
englefly added a commit that referenced this pull request Oct 30, 2024
… (branch-3.0) (#42917)

## Proposed changes
pick #41790 

disable join reorder if any condition is matched:
1. any table row count is -1
2. any column, whose ndv is 0, but MinExpr or MaxExpr is not null
3. ndv > 10* rowCount

Issue Number: close #xxx

<!--Describe your changes.-->

(cherry picked from commit e238a87)

## Proposed changes

Issue Number: close #xxx

<!--Describe your changes.-->
englefly added a commit that referenced this pull request Nov 1, 2024
…(branch-2.0) (#42913)

## Proposed changes
pick  #41790 
Issue Number: close #xxx

<!--Describe your changes.-->
englefly added a commit that referenced this pull request Nov 4, 2024
…ilable (#43000)

## Proposed changes
in previous PR #41790, if any Olap table row count is not available,
planner set disable_join_reorder true.
this pr make this rule apply to external table.

Issue Number: close #xxx

<!--Describe your changes.-->
englefly pushed a commit that referenced this pull request Nov 8, 2024
Remove useless stats validation check.
Before, we will not load the column stats when table rowCount > 0 and
ndv == 0 and nullCount != rowCount. This is to avoid using invalid
stats.
Now, we remove this validation because the planner side added validation
to the column stats, (see #41790).
Besides, after remove of the validation, it is easier to add regression
test using stats injection.
github-actions bot pushed a commit that referenced this pull request Nov 8, 2024
Remove useless stats validation check.
Before, we will not load the column stats when table rowCount > 0 and
ndv == 0 and nullCount != rowCount. This is to avoid using invalid
stats.
Now, we remove this validation because the planner side added validation
to the column stats, (see #41790).
Besides, after remove of the validation, it is easier to add regression
test using stats injection.
github-actions bot pushed a commit that referenced this pull request Nov 8, 2024
Remove useless stats validation check.
Before, we will not load the column stats when table rowCount > 0 and
ndv == 0 and nullCount != rowCount. This is to avoid using invalid
stats.
Now, we remove this validation because the planner side added validation
to the column stats, (see #41790).
Besides, after remove of the validation, it is easier to add regression
test using stats injection.
Jibing-Li added a commit to Jibing-Li/incubator-doris that referenced this pull request Nov 11, 2024
…he#43279)

Remove useless stats validation check.
Before, we will not load the column stats when table rowCount > 0 and
ndv == 0 and nullCount != rowCount. This is to avoid using invalid
stats.
Now, we remove this validation because the planner side added validation
to the column stats, (see apache#41790).
Besides, after remove of the validation, it is easier to add regression
test using stats injection.
Jibing-Li added a commit to Jibing-Li/incubator-doris that referenced this pull request Nov 11, 2024
…he#43279)

Remove useless stats validation check.
Before, we will not load the column stats when table rowCount > 0 and
ndv == 0 and nullCount != rowCount. This is to avoid using invalid
stats.
Now, we remove this validation because the planner side added validation
to the column stats, (see apache#41790).
Besides, after remove of the validation, it is easier to add regression
test using stats injection.
Jibing-Li added a commit to Jibing-Li/incubator-doris that referenced this pull request Nov 12, 2024
…he#43279)

Remove useless stats validation check.
Before, we will not load the column stats when table rowCount > 0 and
ndv == 0 and nullCount != rowCount. This is to avoid using invalid
stats.
Now, we remove this validation because the planner side added validation
to the column stats, (see apache#41790).
Besides, after remove of the validation, it is easier to add regression
test using stats injection.
englefly added a commit to englefly/incubator-doris that referenced this pull request Nov 15, 2024
…ilable (apache#43000)

in previous PR apache#41790, if any Olap table row count is not available,
planner set disable_join_reorder true.
this pr make this rule apply to external table.

Issue Number: close #xxx

<!--Describe your changes.-->
englefly added a commit that referenced this pull request Nov 18, 2024
…ilable (#43000) branch-3.0 (#44026)

pick #43000

in previous PR #41790, if any Olap table row count is not available,
planner set disable_join_reorder true.
this pr make this rule apply to external table.
englefly added a commit that referenced this pull request Nov 28, 2024
… invalid stats (#43501)

### What problem does this PR solve?
add test case for pr #41790.
this case is blocked by #43279
englefly added a commit that referenced this pull request Aug 7, 2025
…valid when rowCount is not aviable (#53834)

### What problem does this PR solve?
this bug is introduced by pr #41790.

when any table row count is not available, disable join reorder.
this is implemented in pr #40349 , but pr #41790 breaks this function.
freemandealer pushed a commit to freemandealer/doris that referenced this pull request Aug 7, 2025
…valid when rowCount is not aviable (apache#53834)

### What problem does this PR solve?
this bug is introduced by pr apache#41790.

when any table row count is not available, disable join reorder.
this is implemented in pr apache#40349 , but pr apache#41790 breaks this function.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by one committer. dev/2.0.x dev/2.1.7-merged dev/3.0.3-merged reviewed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants