Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
924060929 committed Aug 5, 2024
1 parent bda2cfe commit 3a730fd
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -320,9 +320,9 @@ public void analyze(Analyzer analyzer) throws UserException {
throw new AnalysisException("Disable to create table with `ALL` type columns.");
}
String columnNameUpperCase = columnDef.getName().toUpperCase();
if (columnNameUpperCase.startsWith("__DORIS_") && columnNameUpperCase.endsWith("_SIGN__")) {
if (columnNameUpperCase.startsWith("__DORIS_")) {
throw new AnalysisException(
"Disable to create table column with name __DORIS_[.]*_SIGN__: " + columnNameUpperCase);
"Disable to create table column with name start with __DORIS_: " + columnNameUpperCase);
}
if (Objects.equals(columnDef.getType(), Type.DATE) && Config.disable_datev1) {
throw new AnalysisException("Disable to create table with `DATE` type columns, please use `DATEV2`.");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -294,9 +294,9 @@ public void validate(ConnectContext ctx) {
//check datev1 and decimalv2
for (ColumnDefinition columnDef : columns) {
String columnNameUpperCase = columnDef.getName().toUpperCase();
if (columnNameUpperCase.startsWith("__DORIS_") && columnNameUpperCase.endsWith("_SIGN__")) {
if (columnNameUpperCase.startsWith("__DORIS_")) {
throw new AnalysisException(
"Disable to create table column with name __DORIS_[.]*_SIGN__: " + columnNameUpperCase);
"Disable to create table column with name start with __DORIS_: " + columnNameUpperCase);
}
if (columnDef.getType().isDateType() && Config.disable_datev1) {
throw new AnalysisException(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ suite("test_show_create_table_and_views", "show") {

test {
sql "create table table_with_hidden_sign(id int, __DORIS_DELETE_SIGN__ int) distributed by hash(id) properties('replication_num'='1')"
exception "Disable to create table column with name __DORIS_"
exception "Disable to create table column with name start with __DORIS_: "
}
}
}()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ suite("test_show_create_table_and_views_nereids", "show") {

test {
sql "create table table_with_hidden_sign(id int, __DORIS_DELETE_SIGN__ int) distributed by hash(id) properties('replication_num'='1')"
exception "Disable to create table column with name __DORIS_"
exception "Disable to create table column with name start with __DORIS_: "
}
}
}()
Expand Down

0 comments on commit 3a730fd

Please sign in to comment.