-
Notifications
You must be signed in to change notification settings - Fork 3.7k
[Improvement](join) lazy calculate all_match_one #58729
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
Thank you for your contribution to Apache Doris. Please clearly describe your PR:
|
|
run buildall |
BE UT Coverage ReportIncrement line coverage Increment coverage report
|
BE Regression && UT Coverage ReportIncrement line coverage Increment coverage report
|
HappenLee
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
|
PR approved by at least one committer and no changes requested. |
|
PR approved by anyone and no changes requested. |
mrhhsg
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
Sometimes we don't need to calculate all_match_one (for example, when no
columns are materialized in probe_side_output_column)
```sql
SELECT /*+ LEADING({store_sales date_dim} item) */
any(iss.i_brand_id) brand_id
, any(iss.i_class_id) class_id
, any(iss.i_category_id) category_id
FROM
store_sales
, item iss
, date_dim d1
WHERE (ss_item_sk = iss.i_item_sk)
AND (ss_sold_date_sk = d1.d_date_sk)
AND (d1.d_year BETWEEN 1999 AND (1999 + 2));
```
before:
<img width="902" height="1092" alt="QQ_1764857385870"
src="https://github.com/user-attachments/assets/35524c81-889c-4905-b924-20745ad64bf6"
/>
after:
<img width="844" height="1042" alt="QQ_1764857396388"
src="https://github.com/user-attachments/assets/04bf2eb1-63b0-4b36-9497-4265fd25ec53"
/>
Sometimes we don't need to calculate all_match_one (for example, when no
columns are materialized in probe_side_output_column)
```sql
SELECT /*+ LEADING({store_sales date_dim} item) */
any(iss.i_brand_id) brand_id
, any(iss.i_class_id) class_id
, any(iss.i_category_id) category_id
FROM
store_sales
, item iss
, date_dim d1
WHERE (ss_item_sk = iss.i_item_sk)
AND (ss_sold_date_sk = d1.d_date_sk)
AND (d1.d_year BETWEEN 1999 AND (1999 + 2));
```
before:
<img width="902" height="1092" alt="QQ_1764857385870"
src="https://github.com/user-attachments/assets/35524c81-889c-4905-b924-20745ad64bf6"
/>
after:
<img width="844" height="1042" alt="QQ_1764857396388"
src="https://github.com/user-attachments/assets/04bf2eb1-63b0-4b36-9497-4265fd25ec53"
/>
What problem does this PR solve?
Sometimes we don't need to calculate all_match_one (for example, when no columns are materialized in probe_side_output_column)
before:


after:
Check List (For Author)
Test
Behavior changed:
Does this need documentation?
Check List (For Reviewer who merge this PR)