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

[BugFix] Disable Gin for shared data mode and alter gin column into non-string type #44970

Merged
merged 4 commits into from
Apr 30, 2024

Conversation

srlch
Copy link
Contributor

@srlch srlch commented Apr 29, 2024

Fix two problem:

  1. Disable using Gin in shared data mode.
  2. Disable modify column with Gin into non-string type

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.3
    • 3.2
    • 3.1
    • 3.0
    • 2.5

…on-string type

Fix two problem:
1. Disable using Gin in shared data mode.
2. Disable modify column with Gin into non-string type

Signed-off-by: srlch <linzichao@starrocks.com>
if (index.getIndexType() == IndexDef.IndexType.GIN) {
if (index.getColumns().contains(oriColumn.getName()) &&
!modColumn.getType().isStringType()) {
throw new DdlException("Can't not modify a Column with Gin into Non-String type");
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
throw new DdlException("Can't not modify a Column with Gin into Non-String type");
throw new DdlException("Cannot modify a column with GIN into non-string type");

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed it

nshangyiming
nshangyiming previously approved these changes Apr 29, 2024
Signed-off-by: srlch <linzichao@starrocks.com>
nshangyiming
nshangyiming previously approved these changes Apr 29, 2024
packy92
packy92 previously approved these changes Apr 29, 2024
Signed-off-by: srlch <linzichao@starrocks.com>
@srlch srlch dismissed stale reviews from packy92 and nshangyiming via 3c941cf April 29, 2024 11:02
packy92
packy92 previously approved these changes Apr 29, 2024
nshangyiming
nshangyiming previously approved these changes Apr 29, 2024
Signed-off-by: srlch <linzichao@starrocks.com>
@srlch srlch dismissed stale reviews from nshangyiming and packy92 via 4ba7bee April 30, 2024 02:31
Copy link

sonarcloud bot commented Apr 30, 2024

@wyb wyb enabled auto-merge (squash) April 30, 2024 03:50
Copy link

[BE Incremental Coverage Report]

pass : 0 / 0 (0%)

Copy link

[FE Incremental Coverage Report]

pass : 8 / 8 (100.00%)

file detail

path covered_line new_line coverage not_covered_line_detail
🔵 com/starrocks/analysis/InvertedIndexUtil.java 2 2 100.00% []
🔵 com/starrocks/alter/SchemaChangeHandler.java 6 6 100.00% []

@wyb wyb merged commit ddd6f6c into StarRocks:main Apr 30, 2024
52 checks passed
Copy link

@Mergifyio backport branch-3.3

@github-actions github-actions bot removed the 3.3 label Apr 30, 2024
Copy link
Contributor

mergify bot commented Apr 30, 2024

backport branch-3.3

✅ Backports have been created

mergify bot pushed a commit that referenced this pull request Apr 30, 2024
…on-string type (#44970)

Signed-off-by: srlch <linzichao@starrocks.com>
(cherry picked from commit ddd6f6c)
wanpengfei-git pushed a commit that referenced this pull request Apr 30, 2024
…on-string type (backport #44970) (#45024)

Co-authored-by: srlch <111035020+srlch@users.noreply.github.com>
node pushed a commit to vivo/starrocks that referenced this pull request May 9, 2024
…on-string type (StarRocks#44970)

Signed-off-by: srlch <linzichao@starrocks.com>
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