Skip to content

Commit

Permalink
tmp
Browse files Browse the repository at this point in the history
  • Loading branch information
bobhan1 committed Aug 9, 2023
1 parent 56c2f8d commit 5144ed0
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 34 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -698,7 +698,8 @@ private void checkDeleteV2(OlapTable table, List<Partition> partitions,
if (table.getKeysType() == KeysType.AGG_KEYS) {
throw new DdlException("delete predicate on value column only supports Unique table"
+ "Table[" + table.getName() + "] is Aggregate table.");
} else if (table.getKeysType() == KeysType.UNIQUE_KEYS && column.isSequenceColumn()) {
} else if (table.getKeysType() == KeysType.UNIQUE_KEYS
&& table.getSequenceMapCol().equals(columnName)) {
throw new DdlException("delete predicate on value column only supports Unique table and the column"
+ "must not be the sequence column. Column[" + columnName + "] is sequence column.");
}
Expand Down
31 changes: 0 additions & 31 deletions regression-test/data/delete_p0/test_delete_on_value.out
Original file line number Diff line number Diff line change
Expand Up @@ -10,34 +10,3 @@
8 8 8
9 9 9

-- !sql --
1 1 1
2 2 2
3 3 3
5 5 5
6 6 6
7 7 7
8 8 8
9 9 9

-- !sql --
1 1 1
2 2 2
8 8 8
9 9 9

-- !sql --
1 1 1
2 2 2
4 4 4
5 5 5
8 8 8
9 9 9

-- !sql --
1 1 1
2 2 2
4 4 4
8 8 8
9 9 9

3 changes: 1 addition & 2 deletions regression-test/suites/delete_p0/test_delete_on_value.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -79,9 +79,8 @@ suite("test_delete_on_value") {
"function_column.sequence_col" = 'y'
);"""
sql """ insert into ${tableName3} values(1,1,1),(2,2,2),(3,3,3),(4,4,4),(5,5,5); """
sql "delete from ${tableName3} where y=4;"
test {
qt_sql "select * from ${tableName3} order by x;"
sql "delete from ${tableName3} where y=4;"
exception "delete predicate on value column only supports Unique table and the column must not be the sequence column"
}
}

0 comments on commit 5144ed0

Please sign in to comment.