File tree Expand file tree Collapse file tree 3 files changed +22
-4
lines changed
integration-test/src/test/java/org/apache/iotdb/relational/it/schema
iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/sql/ast Expand file tree Collapse file tree 3 files changed +22
-4
lines changed Original file line number Diff line number Diff line change @@ -150,6 +150,22 @@ public void testManageTable() {
150150 assertEquals (tableNames .length , cnt );
151151 }
152152
153+ // Test unsupported, to be deleted
154+ try {
155+ statement .execute ("alter table test1.table1 rename to tableN" );
156+ } catch (final SQLException e ) {
157+ assertEquals ("701: The renaming for base table is currently unsupported" , e .getMessage ());
158+ }
159+
160+ // Test unsupported, to be deleted
161+ try {
162+ statement .execute (
163+ "alter table if exists test_db.table1 rename column if exists model to modelType" );
164+ } catch (final SQLException e ) {
165+ assertEquals (
166+ "701: The renaming for base table column is currently unsupported" , e .getMessage ());
167+ }
168+
153169 // Alter table properties
154170 statement .execute ("alter table test1.table1 set properties ttl=1000000" );
155171 ttls = new String [] {"1000000" };
Original file line number Diff line number Diff line change 1919
2020package org .apache .iotdb .db .queryengine .plan .relational .sql .ast ;
2121
22+ import org .apache .iotdb .db .exception .sql .SemanticException ;
23+
2224import com .google .common .collect .ImmutableList ;
2325
2426import java .util .List ;
@@ -52,8 +54,7 @@ public RenameColumn(
5254 this .columnIfNotExists = columnIfNotExists ;
5355 this .view = view ;
5456 if (!view ) {
55- throw new UnsupportedOperationException (
56- "The renaming for base table column is currently unsupported" );
57+ throw new SemanticException ("The renaming for base table column is currently unsupported" );
5758 }
5859 }
5960
Original file line number Diff line number Diff line change 1919
2020package org .apache .iotdb .db .queryengine .plan .relational .sql .ast ;
2121
22+ import org .apache .iotdb .db .exception .sql .SemanticException ;
23+
2224import com .google .common .collect .ImmutableList ;
2325
2426import java .util .List ;
@@ -46,8 +48,7 @@ public RenameTable(
4648 this .tableIfExists = tableIfExists ;
4749 this .view = view ;
4850 if (!view ) {
49- throw new UnsupportedOperationException (
50- "The renaming for base table is currently unsupported" );
51+ throw new SemanticException ("The renaming for base table is currently unsupported" );
5152 }
5253 }
5354
You can’t perform that action at this time.
0 commit comments