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] Eliminate non-required unnest computation #55431

Merged
merged 1 commit into from
Feb 7, 2025

Conversation

satanson
Copy link
Contributor

@satanson satanson commented Jan 24, 2025

Why I'm doing:

If table function result is not required to output, then it is not need to compute, instead, we just obtain the number of input param's element then duplicate the required output columns.

With this optimzation, some query can be accelerated significantly.

What I'm doing:

Fixes #issue

What type of PR is this:

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

Does this PR entail a change in behavior?

  • Yes, this PR will result in a change in behavior.
  • No, this PR will not result in a change in behavior.

If yes, please specify the type of change:

  • Interface/UI changes: syntax, type conversion, expression evaluation, display information
  • Parameter changes: default values, similar parameters but with different default values
  • Policy changes: use new policy to replace old one, functionality automatically enabled
  • Feature removed
  • Miscellaneous: upgrade & downgrade compatibility, etc.

Checklist:

  • I have added test cases for my bug fix or my new feature
  • This pr needs user documentation (for new or modified features or behaviors)
    • I have added documentation for my new feature or new function
  • This is a backport pr

Bugfix cherry-pick branch check:

  • I have checked the version labels which the pr will be auto-backported to the target branch
    • 3.4
    • 3.3
    • 3.2
    • 3.1
    • 3.0

@satanson
Copy link
Contributor Author

satanson commented Feb 6, 2025

@Mergifyio rebase

Copy link
Contributor

mergify bot commented Feb 6, 2025

rebase

✅ Branch has been successfully rebased

@satanson satanson force-pushed the eliminate_non_required_unest branch from 31a802d to 6c31b71 Compare February 6, 2025 11:45
Copy link

github-actions bot commented Feb 6, 2025

[FE Incremental Coverage Report]

pass : 11 / 11 (100.00%)

file detail

path covered_line new_line coverage not_covered_line_detail
🔵 com/starrocks/planner/TableFunctionNode.java 3 3 100.00% []
🔵 com/starrocks/sql/plan/PlanFragmentBuilder.java 8 8 100.00% []

@satanson satanson force-pushed the eliminate_non_required_unest branch from 6c31b71 to 00ebcd7 Compare February 7, 2025 02:54
Copy link

sonarqubecloud bot commented Feb 7, 2025

Quality Gate Failed Quality Gate failed

Failed conditions
B Maintainability Rating on New Code (required ≥ A)

See analysis details on SonarQube Cloud

Catch issues before they fail your Quality Gate with our IDE extension SonarQube for IDE

Copy link

github-actions bot commented Feb 7, 2025

[BE Incremental Coverage Report]

fail : 4 / 19 (21.05%)

file detail

path covered_line new_line coverage not_covered_line_detail
🔵 be/src/exprs/table_function/unnest.h 0 7 00.00% [51, 52, 61, 62, 68, 69, 70]
🔵 be/src/exec/pipeline/table_function_operator.cpp 3 10 30.00% [99, 168, 169, 170, 233, 234, 235]
🔵 be/src/exprs/table_function/table_function.h 1 2 50.00% [64]

Copy link

github-actions bot commented Feb 7, 2025

[Java-Extensions Incremental Coverage Report]

pass : 0 / 0 (0%)

@kangkaisen kangkaisen merged commit 4be4b5c into main Feb 7, 2025
46 of 52 checks passed
@kangkaisen kangkaisen deleted the eliminate_non_required_unest branch February 7, 2025 11:55
Copy link

github-actions bot commented Feb 7, 2025

@Mergifyio backport branch-3.4

@github-actions github-actions bot removed the 3.4 label Feb 7, 2025
Copy link

github-actions bot commented Feb 7, 2025

@Mergifyio backport branch-3.3

Copy link

github-actions bot commented Feb 7, 2025

@Mergifyio backport branch-3.2

@github-actions github-actions bot removed the 3.2 label Feb 7, 2025
Copy link

github-actions bot commented Feb 7, 2025

@Mergifyio backport branch-3.0

Copy link
Contributor

mergify bot commented Feb 7, 2025

backport branch-3.4

✅ Backports have been created

Copy link
Contributor

mergify bot commented Feb 7, 2025

backport branch-3.3

✅ Backports have been created

Copy link
Contributor

mergify bot commented Feb 7, 2025

backport branch-3.2

✅ Backports have been created

Copy link
Contributor

mergify bot commented Feb 7, 2025

backport branch-3.1

✅ Backports have been created

Copy link
Contributor

mergify bot commented Feb 7, 2025

backport branch-3.0

✅ Backports have been created

mergify bot pushed a commit that referenced this pull request Feb 7, 2025
Signed-off-by: satanson <[email protected]>
(cherry picked from commit 4be4b5c)

# Conflicts:
#	fe/fe-core/src/test/java/com/starrocks/sql/plan/TableFunctionTest.java
mergify bot pushed a commit that referenced this pull request Feb 7, 2025
Signed-off-by: satanson <[email protected]>
(cherry picked from commit 4be4b5c)

# Conflicts:
#	fe/fe-core/src/main/java/com/starrocks/planner/TableFunctionNode.java
#	fe/fe-core/src/test/java/com/starrocks/sql/plan/TableFunctionTest.java
mergify bot pushed a commit that referenced this pull request Feb 7, 2025
Signed-off-by: satanson <[email protected]>
(cherry picked from commit 4be4b5c)

# Conflicts:
#	fe/fe-core/src/main/java/com/starrocks/planner/TableFunctionNode.java
#	fe/fe-core/src/test/java/com/starrocks/sql/plan/TableFunctionTest.java
mergify bot pushed a commit that referenced this pull request Feb 7, 2025
Signed-off-by: satanson <[email protected]>
(cherry picked from commit 4be4b5c)

# Conflicts:
#	be/src/exprs/table_function/table_function.h
#	be/src/exprs/table_function/unnest.h
#	fe/fe-core/src/main/java/com/starrocks/planner/TableFunctionNode.java
#	fe/fe-core/src/test/java/com/starrocks/sql/plan/TableFunctionTest.java
mergify bot pushed a commit that referenced this pull request Feb 7, 2025
Signed-off-by: satanson <[email protected]>
(cherry picked from commit 4be4b5c)

# Conflicts:
#	be/src/exec/pipeline/table_function_operator.cpp
#	be/src/exec/pipeline/table_function_operator.h
#	be/src/exprs/table_function/table_function.h
#	be/src/exprs/table_function/unnest.h
#	fe/fe-core/src/main/java/com/starrocks/planner/TableFunctionNode.java
#	fe/fe-core/src/main/java/com/starrocks/sql/plan/PlanFragmentBuilder.java
#	fe/fe-core/src/test/java/com/starrocks/sql/plan/TableFunctionTest.java
satanson added a commit that referenced this pull request Feb 7, 2025
satanson added a commit to satanson/starrocks that referenced this pull request Feb 7, 2025
kangkaisen pushed a commit that referenced this pull request Feb 7, 2025
kangkaisen pushed a commit that referenced this pull request Feb 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants