FANNG1 commented on code in PR #3461:
URL: https://github.com/apache/gravitino/pull/3461#discussion_r1669861846
##########
integration-test/src/test/java/com/datastrato/gravitino/integration/test/spark/SparkCommonIT.java:
##########
@@ -509,6 +509,35 @@ void testAlterTableUpdateColumnComment() {
checkTableColumns(tableName, updateCommentColumns,
getTableInfo(tableName));
}
+ @Test
+ void testAlterTableReplaceColumns() {
+ String tableName = "test_replace_columns_table";
+ dropTableIfExists(tableName);
+
+ createSimpleTable(tableName);
+ List<SparkColumnInfo> simpleTableColumns = getSimpleTableColumn();
+ checkTableColumns(tableName, simpleTableColumns, getTableInfo(tableName));
+
+ // We must make type compatibility when replace columns to pass Hive IT.
Or Will get such
+ // error: Failed to alter Hive table [test_replace_columns_table] in Hive
metastore, since Hive
+ // metastore will check the compatibility of column type between the old
and new column
+ // positions, please ensure that the type of the new column position is
compatible with the old
+ // one, otherwise the alter operation will fail in Hive metastore.
Review Comment:
removed the comments to extra concern, and I prefer not to add extra tests
to test the underlying capabilities and make test code more complicated.
--
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]