bbiiaaoo commented on code in PR #10637:
URL: https://github.com/apache/gravitino/pull/10637#discussion_r3042671765
##########
lance/lance-rest-server/src/main/java/org/apache/gravitino/lance/service/rest/LanceTableOperations.java:
##########
@@ -337,13 +341,24 @@ private void
validateAlterColumnsRequest(AlterTableAlterColumnsRequest request)
Preconditions.checkArgument(
!request.getAlterations().isEmpty(), "Columns to alter cannot be
empty.");
- for (ColumnAlteration alteration : request.getAlterations()) {
+ for (AlterColumnsEntry alteration : request.getAlterations()) {
Preconditions.checkArgument(
- StringUtils.isBlank(alteration.getCastTo()),
- "Only RENAME alteration is supported currently.");
+ StringUtils.isNotBlank(alteration.getPath()), "Column path to alter
cannot be empty.");
Preconditions.checkArgument(
StringUtils.isNotBlank(alteration.getRename()),
- "Rename field must be specified when castTo is not provided.");
+ "Only RENAME alteration is supported currently.");
+ Preconditions.checkArgument(
+ alteration.getDataType() == null
+ && alteration.getNullable() == null
+ && alteration.getVirtualColumn() == null,
+ "Only RENAME alteration is supported currently.");
Review Comment:
Fixed
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]