qidaye commented on code in PR #37783: URL: https://github.com/apache/doris/pull/37783#discussion_r1677482663
########## regression-test/suites/inverted_index_up_down_p0/load.groovy: ########## @@ -0,0 +1,93 @@ +// Licensed to the Apache Software Foundation (ASF) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The ASF licenses this file +// to you under the Apache License, Version 2.0 (the +// "License"); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. + +suite("test_upgrade_downgrade_prepare_inverted_index","p0,inverted_index,restart_fe") { + for (version in ["V1", "V2"]) { + sql "drop table if exists t_up_down_inverted_index${version}_duplicate" + sql String.format(''' + create table t_up_down_inverted_index%s_duplicate( + a int, + b int, + c int, + index idx_a(a) Review Comment: inverted_index should contain fulltext with tokenized, fulltext without tokenized and numerical value. ########## regression-test/suites/inverted_index_up_down_p0/inverted_index.groovy: ########## @@ -0,0 +1,126 @@ +// Licensed to the Apache Software Foundation (ASF) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The ASF licenses this file +// to you under the Apache License, Version 2.0 (the +// "License"); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. + +suite("test_upgrade_downgrade_compatibility_inverted_index","p0,inverted_index,restart_fe") { + for (version in ["V1", "V2"]) { + def tableName = "t_up_down_inverted_index${version}_duplicate" + def result = sql(String.format("show create table %s", tableName)) + if (!result[0][1].toString().contains(String.format('''"inverted_index_storage_format" = "%s"''', version))) { + throw new IllegalStateException("${tableName} inverted_index_storage_format exception") + } + result = sql("select count(*) from ${tableName} where a = 10") + if (result[0][0] != 10) { + throw new IllegalStateException("count error") + } + sql "alter table ${tableName} add index idx_b(b)" Review Comment: Run `build index` after create a new index. And check indexes count after build. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
