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

[Feature]Support add/drop field for struct column(part3) #47217

Merged
merged 8 commits into from
Jun 25, 2024

Conversation

sevev
Copy link
Contributor

@sevev sevev commented Jun 19, 2024

Why I'm doing:

It is the third pr to support add/drop field for struct column.

What I'm doing:

Support add/drop field for table enable fast schema evolution in shared nothing mode.

Fixes #46452

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

Signed-off-by: sevev <[email protected]>
* @throws DdlException
*/
private boolean processDropField(DropFieldClause alterClause, OlapTable olapTable,
Map<Long, LinkedList<Column>> indexSchemaMap, List<Index> indexes) throws DdlException {
Copy link
Contributor

Choose a reason for hiding this comment

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

it seems that indexes is not used in this function.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

it seems that indexes is not used in this function.

updated.

Signed-off-by: sevev <[email protected]>
@HangyuanLiu HangyuanLiu self-assigned this Jun 20, 2024
Signed-off-by: sevev <[email protected]>
Signed-off-by: sevev <[email protected]>
Signed-off-by: sevev <[email protected]>
Signed-off-by: sevev <[email protected]>
Signed-off-by: sevev <[email protected]>
Copy link

sonarcloud bot commented Jun 25, 2024

Copy link

[BE Incremental Coverage Report]

pass : 0 / 0 (0%)

Copy link

[FE Incremental Coverage Report]

pass : 153 / 173 (88.44%)

file detail

path covered_line new_line coverage not_covered_line_detail
🔵 com/starrocks/alter/SchemaChangeHandler.java 120 139 86.33% [438, 439, 440, 442, 454, 458, 484, 489, 504, 520, 523, 542, 568, 573, 588, 594, 614, 1874, 1894]
🔵 com/starrocks/catalog/StructType.java 14 15 93.33% [191]
🔵 com/starrocks/sql/ast/StructFieldDesc.java 4 4 100.00% []
🔵 com/starrocks/sql/analyzer/AlterTableClauseAnalyzer.java 1 1 100.00% []
🔵 com/starrocks/sql/ast/AddFieldClause.java 4 4 100.00% []
🔵 com/starrocks/sql/ast/DropFieldClause.java 2 2 100.00% []
🔵 com/starrocks/catalog/Column.java 7 7 100.00% []
🔵 com/starrocks/persist/EditLog.java 1 1 100.00% []

@sevev sevev requested a review from HangyuanLiu June 25, 2024 07:44
@wyb wyb enabled auto-merge (squash) June 25, 2024 12:38
@wyb wyb merged commit 13899a2 into StarRocks:main Jun 25, 2024
48 of 49 checks passed
@sevev
Copy link
Contributor Author

sevev commented Jun 26, 2024

@mergify backport branch-3.3

Copy link
Contributor

mergify bot commented Jun 26, 2024

backport branch-3.3

✅ Backports have been created

mergify bot pushed a commit that referenced this pull request Jun 26, 2024
Signed-off-by: sevev <[email protected]>
(cherry picked from commit 13899a2)

# Conflicts:
#	fe/fe-core/src/main/java/com/starrocks/alter/SchemaChangeHandler.java
#	fe/fe-core/src/main/java/com/starrocks/sql/analyzer/AlterTableClauseAnalyzer.java
#	fe/fe-core/src/main/java/com/starrocks/sql/ast/AddFieldClause.java
#	fe/fe-core/src/main/java/com/starrocks/sql/ast/DropFieldClause.java
#	fe/fe-core/src/main/java/com/starrocks/sql/ast/StructFieldDesc.java
#	test/sql/test_add_drop_field/R/test_add_drop_field
#	test/sql/test_add_drop_field/T/test_add_drop_field
happut pushed a commit to happut/starrocks that referenced this pull request Jun 26, 2024
@sevev
Copy link
Contributor Author

sevev commented Jun 26, 2024

@mergify backport branch-3.3

Copy link
Contributor

mergify bot commented Jun 26, 2024

backport branch-3.3

✅ Backports have been created

wanpengfei-git pushed a commit that referenced this pull request Jun 26, 2024
@sevev
Copy link
Contributor Author

sevev commented Jun 27, 2024

@mergify backport branch-3.2

Copy link
Contributor

mergify bot commented Jun 27, 2024

backport branch-3.2

✅ Backports have been created

mergify bot pushed a commit that referenced this pull request Jun 27, 2024
Signed-off-by: sevev <[email protected]>
(cherry picked from commit 13899a2)

# Conflicts:
#	fe/fe-core/src/main/java/com/starrocks/alter/SchemaChangeHandler.java
wanpengfei-git pushed a commit that referenced this pull request Jun 27, 2024
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.

Support Add/drop Field for struct column
6 participants