Skip to content

[Enhancement] Enable low cardinality optimization on PRIMARY KEY tables. #59487

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

Merged
merged 4 commits into from
Jun 5, 2025

Conversation

jkim650
Copy link
Contributor

@jkim650 jkim650 commented May 29, 2025

Why I'm doing:

To enable low cardinality optimization on PRIMARY KEY tables.

What I'm doing:

Removes a check restricting the optimization on PRIMARY KEY tables.
The optimization works only when global dictionaries are available. If there is a global dictionary, we don't need to restrict the optimization.

I tested this by changing tables in the unittests(LowCardinalityArrayTest.java and LowCardinalityTest2.java) to PRIMARY KEY tables and confirmed it worked. In the PR, I left 2 of those table changes in unittests.
I also tested this in internal e2e tests of our company.

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.5
    • 3.4
    • 3.3
    • 3.2
    • 3.1

jkim650 added 3 commits May 28, 2025 23:28
Signed-off-by: Jinho Kim <117620956+jkim650@users.noreply.github.com>
Signed-off-by: Jinho Kim <117620956+jkim650@users.noreply.github.com>
@jkim650 jkim650 requested a review from a team as a code owner May 29, 2025 22:22
Signed-off-by: Jinho Kim <117620956+jkim650@users.noreply.github.com>
Copy link

sonarqubecloud bot commented Jun 3, 2025

Copy link

github-actions bot commented Jun 3, 2025

[Java-Extensions Incremental Coverage Report]

pass : 0 / 0 (0%)

Copy link

github-actions bot commented Jun 3, 2025

[FE Incremental Coverage Report]

pass : 0 / 0 (0%)

Copy link

github-actions bot commented Jun 3, 2025

[BE Incremental Coverage Report]

pass : 0 / 0 (0%)

@Seaven Seaven merged commit ca38736 into StarRocks:main Jun 5, 2025
69 of 70 checks passed
Copy link

github-actions bot commented Jun 5, 2025

@Mergifyio backport branch-3.4

@github-actions github-actions bot removed the 3.4 label Jun 5, 2025
Copy link

github-actions bot commented Jun 5, 2025

@Mergifyio backport branch-3.5

@github-actions github-actions bot removed the 3.5 label Jun 5, 2025
Copy link

github-actions bot commented Jun 5, 2025

@Mergifyio backport branch-3.3

@github-actions github-actions bot removed the 3.3 label Jun 5, 2025
Copy link
Contributor

mergify bot commented Jun 5, 2025

backport branch-3.4

✅ Backports have been created

Copy link
Contributor

mergify bot commented Jun 5, 2025

backport branch-3.5

✅ Backports have been created

Copy link
Contributor

mergify bot commented Jun 5, 2025

backport branch-3.3

✅ Backports have been created

mergify bot pushed a commit that referenced this pull request Jun 5, 2025
…es. (#59487)

Signed-off-by: Jinho Kim <117620956+jkim650@users.noreply.github.com>
(cherry picked from commit ca38736)

# Conflicts:
#	fe/fe-core/src/main/java/com/starrocks/sql/optimizer/rule/tree/lowcardinality/DecodeCollector.java
mergify bot pushed a commit that referenced this pull request Jun 5, 2025
…es. (#59487)

Signed-off-by: Jinho Kim <117620956+jkim650@users.noreply.github.com>
(cherry picked from commit ca38736)

# Conflicts:
#	fe/fe-core/src/main/java/com/starrocks/sql/optimizer/rule/tree/lowcardinality/DecodeCollector.java
mergify bot pushed a commit that referenced this pull request Jun 5, 2025
…es. (#59487)

Signed-off-by: Jinho Kim <117620956+jkim650@users.noreply.github.com>
(cherry picked from commit ca38736)
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.

4 participants