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

[Enhancement] Reduce cache miss when evaluate lots of expr in aggregate #15998

Merged
merged 2 commits into from Jan 3, 2023

Conversation

stdpain
Copy link
Contributor

@stdpain stdpain commented Dec 30, 2022

What type of PR is this:

  • BugFix
  • Feature
  • Enhancement
  • Refactor
  • UT
  • Doc
  • Tool

Which issues of this PR fixes :

#9118

Problem Summary(Required) :

  1. move some function call expr from project node to aggregate node
  2. evaluate function call expr before call aggregate node

cache miss
before:
image
after:
image

Checklist:

  • I have added test cases for my bug fix or my new feature
  • This pr will affect users' behaviors
  • This pr needs user documentation (for new or modified features or behaviors)
    • I have added documentation for my new feature or new function

Bugfix cherry-pick branch check:

  • I have checked the version labels which the pr will be auto backported to target branch
    • 2.5
    • 2.4
    • 2.3
    • 2.2

Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

clang-tidy made some suggestions

@@ -16,6 +16,7 @@

#include <utility>

Choose a reason for hiding this comment

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

warning: 'utility' file not found [clang-diagnostic-error]

#include <utility>
         ^

@@ -16,6 +16,7 @@

#include <utility>

#include "column/vectorized_fwd.h"

Choose a reason for hiding this comment

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

warning: 'column/vectorized_fwd.h' file not found [clang-diagnostic-error]

#include "column/vectorized_fwd.h"
         ^

@stdpain stdpain enabled auto-merge (squash) December 30, 2022 09:31
@github-actions github-actions bot removed the be-build label Dec 30, 2022
@stdpain
Copy link
Contributor Author

stdpain commented Dec 30, 2022

run starrocks_admit_test

@stdpain
Copy link
Contributor Author

stdpain commented Jan 3, 2023

run starrocks_fe_unittest

@stdpain
Copy link
Contributor Author

stdpain commented Jan 3, 2023

run starrocks_admit_test

@github-actions github-actions bot removed the be-build label Jan 3, 2023
@stdpain
Copy link
Contributor Author

stdpain commented Jan 3, 2023

run starrocks_admit_test

1. move some function call expr from project node to aggregate node
2. evaluate function call expr before call aggregate node
@sonarcloud
Copy link

sonarcloud bot commented Jan 3, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 3 Code Smells

0.0% 0.0% Coverage
0.0% 0.0% Duplication

@wanpengfei-git
Copy link
Collaborator

[FE PR Coverage Check]

😍 pass : 78 / 80 (97.50%)

file detail

path covered_line new_line coverage not_covered_line_detail
🔵 com/starrocks/sql/optimizer/rule/tree/ExtractAggregateColumn.java 77 79 97.47% [82, 91]
🔵 com/starrocks/sql/optimizer/Optimizer.java 1 1 100.00% []

@stdpain
Copy link
Contributor Author

stdpain commented Jan 3, 2023

run starrocks_admit_test

@sonarcloud
Copy link

sonarcloud bot commented Jan 3, 2023

SonarCloud Quality Gate failed.    Quality Gate failed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
4.9% 4.9% Duplication

@stdpain stdpain merged commit 4c2e089 into StarRocks:main Jan 3, 2023
@github-actions github-actions bot removed the be-build label Jan 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants