Skip to content

Commit

Permalink
fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
Zouxxyy committed Dec 18, 2024
1 parent 430b320 commit c1265b1
Showing 1 changed file with 2 additions and 27 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -577,8 +577,7 @@ public void testCreateInsensitiveTable() throws Exception {
" 'uri' = '',",
" 'warehouse' = '" + path + "',",
" 'lock.enabled' = 'true',",
" 'table.type' = 'EXTERNAL',",
" 'allow-upper-case' = 'true'",
" 'table.type' = 'EXTERNAL'",
")"))
.await();
tEnv.executeSql("USE CATALOG paimon_catalog_01").await();
Expand All @@ -593,30 +592,6 @@ public void testCreateInsensitiveTable() throws Exception {
tEnv.executeSql("DROP TABLE t").await();
Path tablePath = new Path(path, "test_db.db/t");
assertThat(tablePath.getFileSystem().exists(tablePath)).isTrue();

tEnv.executeSql(
String.join(
"\n",
"CREATE CATALOG paimon_catalog_02 WITH (",
" 'type' = 'paimon',",
" 'metastore' = 'hive',",
" 'uri' = '',",
" 'warehouse' = '" + path + "',",
" 'lock.enabled' = 'true',",
" 'table.type' = 'EXTERNAL',",
" 'allow-upper-case' = 'false'",
")"))
.await();
tEnv.executeSql("USE CATALOG paimon_catalog_02").await();
tEnv.executeSql("USE test_db").await();

// set case-sensitive = false would throw exception out
assertThatThrownBy(
() ->
tEnv.executeSql(
"CREATE TABLE t1 ( aa INT, Bb STRING ) WITH ( 'file.format' = 'avro' )")
.await())
.isInstanceOf(RuntimeException.class);
}

@Test
Expand Down Expand Up @@ -1007,7 +982,7 @@ public void testRenameTable() throws Exception {
// the target table name has upper case.
assertThatThrownBy(() -> tEnv.executeSql("ALTER TABLE t1 RENAME TO T1"))
.hasMessage(
"Could not execute ALTER TABLE my_hive.test_db.t1 RENAME TO my_hive.test_db.T1.");
"Could not execute ALTER TABLE my_hive.test_db.t1 RENAME TO my_hive.test_db.T1");

tEnv.executeSql("ALTER TABLE t1 RENAME TO t3").await();

Expand Down

0 comments on commit c1265b1

Please sign in to comment.