This is an automated email from the ASF dual-hosted git repository.

diqiu50 pushed a commit to branch cherry-pick-2c7c308d-to-branch-1.3
in repository https://gitbox.apache.org/repos/asf/gravitino.git


The following commit(s) were added to 
refs/heads/cherry-pick-2c7c308d-to-branch-1.3 by this push:
     new 2118a08a99 Resolve cherry-pick conflicts for branch-1.3
2118a08a99 is described below

commit 2118a08a9963f46c5077a2fee62f8aa6b6c9e01c
Author: yuhui <[email protected]>
AuthorDate: Thu Oct 22 14:32:32 2026 +0800

    Resolve cherry-pick conflicts for branch-1.3
---
 .../mysql/operation/TestMysqlTableOperations.java  | 36 -----------
 .../operation/TestStarRocksTableOperations.java    | 75 +---------------------
 2 files changed, 1 insertion(+), 110 deletions(-)

diff --git 
a/catalogs/catalog-jdbc-mysql/src/test/java/org/apache/gravitino/catalog/mysql/operation/TestMysqlTableOperations.java
 
b/catalogs/catalog-jdbc-mysql/src/test/java/org/apache/gravitino/catalog/mysql/operation/TestMysqlTableOperations.java
index 78d9a3935b..db4fd2f0b4 100644
--- 
a/catalogs/catalog-jdbc-mysql/src/test/java/org/apache/gravitino/catalog/mysql/operation/TestMysqlTableOperations.java
+++ 
b/catalogs/catalog-jdbc-mysql/src/test/java/org/apache/gravitino/catalog/mysql/operation/TestMysqlTableOperations.java
@@ -197,41 +197,6 @@ public class TestMysqlTableOperations extends TestMysql {
         TABLE_OPERATIONS.drop(TEST_DB_NAME.toString(), newName), "table should 
be non-existent");
   }
 
-  @Test
-<<<<<<< HEAD
-=======
-  public void testAlterTableUpdateColumnTypeKeepsDefaultValue() {
-    String tableName = RandomStringUtils.randomAlphabetic(16) + 
"_type_default_table";
-    JdbcColumn col_1 =
-        
JdbcColumn.builder().withName("col_1").withType(INT).withNullable(false).build();
-    JdbcColumn col_2 =
-        JdbcColumn.builder()
-            .withName("col_2")
-            .withType(Types.VarCharType.of(16))
-            .withDefaultValue(Literals.of("new", Types.VarCharType.of(16)))
-            .withNullable(false)
-            .build();
-    TABLE_OPERATIONS.create(
-        TEST_DB_NAME.toString(),
-        tableName,
-        new JdbcColumn[] {col_1, col_2},
-        "test_comment",
-        new HashMap<>(),
-        null,
-        Distributions.NONE,
-        new Index[0]);
-
-    TABLE_OPERATIONS.alterTable(
-        TEST_DB_NAME.toString(),
-        tableName,
-        TableChange.updateColumnType(new String[] {col_2.name()}, 
Types.VarCharType.of(32)));
-
-    JdbcTable load = TABLE_OPERATIONS.load(TEST_DB_NAME.toString(), tableName);
-    Column updated = load.columns()[1];
-    Assertions.assertEquals(Types.VarCharType.of(32), updated.dataType());
-    Assertions.assertEquals(Literals.of("new", Types.VarCharType.of(32)), 
updated.defaultValue());
-  }
-
   @Test
   public void testUpdateColumnPositionWithSpecialReferenceColumn() {
     String tableName = RandomStringUtils.randomAlphabetic(16) + 
"_position_table";
@@ -274,7 +239,6 @@ public class TestMysqlTableOperations extends TestMysql {
   }
 
   @Test
->>>>>>> 2c7c308d9 ([#14073] fix(catalog-jdbc): Quote reference column when 
updating column position (#14075))
   public void testAlterTable() {
     String tableName = RandomStringUtils.randomAlphabetic(16) + "_al_table";
     String tableComment = "test_comment";
diff --git 
a/catalogs/catalog-jdbc-starrocks/src/test/java/org/apache/gravitino/catalog/starrocks/operation/TestStarRocksTableOperations.java
 
b/catalogs/catalog-jdbc-starrocks/src/test/java/org/apache/gravitino/catalog/starrocks/operation/TestStarRocksTableOperations.java
index da7b8da576..6259c364c0 100644
--- 
a/catalogs/catalog-jdbc-starrocks/src/test/java/org/apache/gravitino/catalog/starrocks/operation/TestStarRocksTableOperations.java
+++ 
b/catalogs/catalog-jdbc-starrocks/src/test/java/org/apache/gravitino/catalog/starrocks/operation/TestStarRocksTableOperations.java
@@ -44,6 +44,7 @@ import 
org.apache.gravitino.catalog.starrocks.converter.StarRocksTypeConverter;
 import 
org.apache.gravitino.catalog.starrocks.operations.StarRocksTablePartitionOperations;
 import org.apache.gravitino.exceptions.GravitinoRuntimeException;
 import org.apache.gravitino.integration.test.util.GravitinoITUtils;
+import org.apache.gravitino.rel.Column;
 import org.apache.gravitino.rel.TableChange;
 import org.apache.gravitino.rel.expressions.Expression;
 import org.apache.gravitino.rel.expressions.NamedReference;
@@ -251,79 +252,6 @@ public class TestStarRocksTableOperations extends 
TestStarRocks {
     }
   }
 
-  @Test
-<<<<<<< HEAD
-=======
-  public void testClearTableCommentWithNull() {
-    String tableName = 
GravitinoITUtils.genRandomName("starrocks_clear_comment_table");
-    JdbcColumn column =
-        
JdbcColumn.builder().withName("col_1").withType(INT).withComment("id").build();
-
-    try {
-      TABLE_OPERATIONS.create(
-          databaseName,
-          tableName,
-          new JdbcColumn[] {column},
-          "table comment",
-          createProperties(),
-          null,
-          Distributions.hash(DEFAULT_BUCKET_SIZE, 
NamedReference.field("col_1")),
-          Indexes.EMPTY_INDEXES);
-
-      TABLE_OPERATIONS.alterTable(databaseName, tableName, 
TableChange.updateComment(null));
-      Awaitility.await()
-          .atMost(MAX_WAIT_IN_SECONDS, TimeUnit.SECONDS)
-          .pollInterval(WAIT_INTERVAL_IN_SECONDS, TimeUnit.SECONDS)
-          .untilAsserted(
-              () -> {
-                String comment = TABLE_OPERATIONS.load(databaseName, 
tableName).comment();
-                Assertions.assertTrue(StringUtils.isEmpty(comment), comment);
-              });
-    } finally {
-      TABLE_OPERATIONS.drop(databaseName, tableName);
-    }
-  }
-
-  @Test
-  public void testAlterTableUpdateColumnTypeKeepsDefaultValue() {
-    String tableName = 
GravitinoITUtils.genRandomName("starrocks_type_default_test_table");
-    JdbcColumn col_1 = 
JdbcColumn.builder().withName("col_1").withType(INT).build();
-    // The wide col_2 keeps col_3 out of the default key columns, so col_3 is 
a value column.
-    JdbcColumn col_2 = 
JdbcColumn.builder().withName("col_2").withType(VARCHAR_255).build();
-    JdbcColumn col_3 =
-        JdbcColumn.builder()
-            .withName("col_3")
-            .withType(Types.VarCharType.of(16))
-            .withDefaultValue(Literals.of("new", Types.VarCharType.of(16)))
-            .build();
-    TABLE_OPERATIONS.create(
-        databaseName,
-        tableName,
-        new JdbcColumn[] {col_1, col_2, col_3},
-        "test_comment",
-        createProperties(),
-        null,
-        Distributions.hash(DEFAULT_BUCKET_SIZE, NamedReference.field("col_1")),
-        new Index[0]);
-
-    TABLE_OPERATIONS.alterTable(
-        databaseName,
-        tableName,
-        TableChange.updateColumnType(new String[] {col_3.name()}, 
Types.VarCharType.of(32)));
-
-    // StarRocks applies schema changes asynchronously.
-    Awaitility.await()
-        .atMost(MAX_WAIT_IN_SECONDS, TimeUnit.SECONDS)
-        .pollInterval(WAIT_INTERVAL_IN_SECONDS, TimeUnit.SECONDS)
-        .untilAsserted(
-            () -> {
-              Column updated = TABLE_OPERATIONS.load(databaseName, 
tableName).columns()[2];
-              Assertions.assertEquals(Types.VarCharType.of(32), 
updated.dataType());
-              Assertions.assertEquals(
-                  Literals.of("new", Types.VarCharType.of(32)), 
updated.defaultValue());
-            });
-  }
-
   @Test
   public void testUpdateColumnPositionAfterReservedWordColumn() {
     String tableName = 
GravitinoITUtils.genRandomName("starrocks_position_test_table");
@@ -363,7 +291,6 @@ public class TestStarRocksTableOperations extends 
TestStarRocks {
   }
 
   @Test
->>>>>>> 2c7c308d9 ([#14073] fix(catalog-jdbc): Quote reference column when 
updating column position (#14075))
   public void testAlterTable() {
     String tableName = 
GravitinoITUtils.genRandomName("starrocks_alter_test_table");
 

Reply via email to