Skip to content
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

[fix](nereids) fix multi window projection issue temporarily #24568

Merged
merged 2 commits into from
Sep 19, 2023

Conversation

xzj7019
Copy link
Contributor

@xzj7019 xzj7019 commented Sep 18, 2023

Proposed changes

Current multi-window plan generation has problem on the project sequence, for example:

+--LogicalWindow ( windowExpressions=[avg(sum_sales#115) WindowSpec(...) AS `avg_monthly_sales`#116, rank() WindowSpec(...) AS `rn`#117], ...)

and correspond physical plan is:

+--PhysicalWindow[6572]@16 ( windowFrameGroup=(Funcs=[avg(sum_sales#115) WindowSpec(...) AS `avg_monthly_sales`#116], ... )
    +--PhysicalWindow[6568]@29 ( windowFrameGroup=(Funcs=[rank() WindowSpec(...) AS `rn`#117], ...] )

If the final plan is generated as following:

MultiCastDataSinks
STREAM DATA SINK
  EXCHANGE ID: 20
  HASH_PARTITIONED: rn[#208], i_brand[#202], cc_name[#203], i_category[#201]

Before we eventually resolve the multi-window issue, we add a projection as following and force a mapping but this will not cover all potential problems.

MultiCastDataSinks
STREAM DATA SINK
  EXCHANGE ID: 20
  HASH_PARTITIONED: rn[#219], i_brand[#213], cc_name[#214], i_category[#212]
  PROJECTIONS: i_category[#184], i_brand[#185], cc_name[#186], d_year[#187], d_moy[#188], sum_sales[#189], avg_monthly_sales[#191], rn[#190]
  PROJECTION TUPLE: 20

Further comments

If this is a relatively large or complex change, kick off the discussion at [email protected] by explaining why you chose the solution you did and what alternatives you considered, etc...

@xzj7019
Copy link
Contributor Author

xzj7019 commented Sep 18, 2023

run buildall

1 similar comment
@xzj7019
Copy link
Contributor Author

xzj7019 commented Sep 18, 2023

run buildall

@xzj7019 xzj7019 force-pushed the fix_multi_window_projection_2.0 branch from 93db471 to 9832142 Compare September 19, 2023 01:46
@xzj7019
Copy link
Contributor Author

xzj7019 commented Sep 19, 2023

run buildall

@xzj7019 xzj7019 force-pushed the fix_multi_window_projection_2.0 branch from 9832142 to 17510f7 Compare September 19, 2023 08:31
@xzj7019
Copy link
Contributor Author

xzj7019 commented Sep 19, 2023

run buildall

@xiaokang xiaokang added the p0_b label Sep 19, 2023
@hello-stephen
Copy link
Contributor

(From new machine)TeamCity pipeline, clickbench performance test result:
the sum of best hot time: 46.56 seconds
stream load tsv: 620 seconds loaded 74807831229 Bytes, about 115 MB/s
stream load json: 20 seconds loaded 2358488459 Bytes, about 112 MB/s
stream load orc: 64 seconds loaded 1101869774 Bytes, about 16 MB/s
stream load parquet: 31 seconds loaded 861443392 Bytes, about 26 MB/s
insert into select: 29.7 seconds inserted 10000000 Rows, about 336K ops/s
storage size: 17164128047 Bytes

@github-actions github-actions bot added the approved Indicates a PR has been approved by one committer. label Sep 19, 2023
@github-actions
Copy link
Contributor

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

@github-actions
Copy link
Contributor

PR approved by anyone and no changes requested.

@xiaokang xiaokang merged commit 2ef8069 into apache:branch-2.0 Sep 19, 2023
@xiaokang xiaokang mentioned this pull request Sep 28, 2023
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. area/nereids dev/2.0.2-merged p0_b reviewed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants