[#4412] feat(api): add validate check for default position when updating column position#4451
Merged
FANNG1 merged 12 commits intoapache:mainfrom Aug 13, 2024
Conversation
FANNG1
reviewed
Aug 8, 2024
Contributor
|
@LiuQhahah , please fix the ci and test failures like |
Contributor
Author
|
I have fixed the testUpdateIcebergColumnDefaultPosition UT and formated the code. |
FANNG1
reviewed
Aug 9, 2024
...va/org/apache/gravitino/catalog/lakehouse/iceberg/integration/test/CatalogIcebergBaseIT.java
Outdated
Show resolved
Hide resolved
…n't allow default position in UpdateColumnPosition
…ition-when-updating-column-positions
Contributor
|
Looks like there's some style issue needs to be fixed, @LiuQhahah would you please fix it. |
…ition-when-updating-column-positions
…or-ColumnPosition-when-updating-column-positions' into apache#4412-add-validate-check-for-ColumnPosition-when-updating-column-positions
FANNG1
reviewed
Aug 12, 2024
…ition-when-updating-column-positions
Contributor
|
There're some residual logic to process DefaultColumnPosition in private void doUpdateColumnPosition(
UpdateSchema icebergUpdateSchema,
UpdateColumnPosition updateColumnPosition,
Schema icebergTableSchema) {
StructType tableSchema = icebergTableSchema.asStruct();
// not need any more
ColumnPosition columnPosition =
getColumnPositionForIceberg(tableSchema, updateColumnPosition.getPosition());
doMoveColumn(icebergUpdateSchema, updateColumnPosition.fieldName(), columnPosition);
} |
…n due to supporting update the column position to default position isn't allowed.
…or-ColumnPosition-when-updating-column-positions' into apache#4412-add-validate-check-for-ColumnPosition-when-updating-column-positions
…ition-when-updating-column-positions
FANNG1
approved these changes
Aug 13, 2024
Contributor
|
@LiuQhahah , thanks for your contribution, and hope you enjoy the journey. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changes were proposed in this pull request?
add validate check for ColumnPosition when updating column positions,
If the position is default, will throw exception.
Why are the changes needed?
Fix: #4412
Does this PR introduce any user-facing change?
No
How was this patch tested?
the UT has been added.