diff --git a/.licenserc.yaml b/.licenserc.yaml index b9a6a6e6875766..4d707463450389 100644 --- a/.licenserc.yaml +++ b/.licenserc.yaml @@ -32,6 +32,7 @@ header: - '**/*.md5' - '**/*.patch' - '**/*.log' + - '**/*.sql' - 'tsan_suppressions' - 'docs/.markdownlintignore' - 'fe/fe-core/src/test/resources/data/net_snmp_normal' @@ -52,8 +53,6 @@ header: - 'be/src/util/sse2neon.h' - 'be/src/util/utf8_check.cpp' - 'build-support/run_clang_format.py' - - 'regression-test/common' - - 'regression-test/suites' - 'regression-test/data' comment: on-failure diff --git a/fe/fe-core/src/main/java/org/apache/doris/analysis/Analyzer.java b/fe/fe-core/src/main/java/org/apache/doris/analysis/Analyzer.java index 8b5ebab306d97b..0e3ed6d39b0c88 100644 --- a/fe/fe-core/src/main/java/org/apache/doris/analysis/Analyzer.java +++ b/fe/fe-core/src/main/java/org/apache/doris/analysis/Analyzer.java @@ -49,7 +49,6 @@ import org.apache.doris.rewrite.RewriteBinaryPredicatesRule; import org.apache.doris.rewrite.RewriteEncryptKeyRule; import org.apache.doris.rewrite.RewriteFromUnixTimeRule; -import org.apache.doris.rewrite.RewriteLikePredicateRule; import org.apache.doris.rewrite.RewriteDateLiteralRule; import org.apache.doris.rewrite.mvrewrite.CountDistinctToBitmap; import org.apache.doris.rewrite.mvrewrite.CountDistinctToBitmapOrHLLRule; @@ -311,7 +310,6 @@ public GlobalState(Catalog catalog, ConnectContext context) { rules.add(RewriteDateLiteralRule.INSTANCE); rules.add(RewriteEncryptKeyRule.INSTANCE); rules.add(RewriteAliasFunctionRule.INSTANCE); - rules.add(RewriteLikePredicateRule.INSTANCE); List onceRules = Lists.newArrayList(); onceRules.add(ExtractCommonFactorsRule.INSTANCE); onceRules.add(InferFiltersRule.INSTANCE); diff --git a/fe/fe-core/src/main/java/org/apache/doris/analysis/LikePredicate.java b/fe/fe-core/src/main/java/org/apache/doris/analysis/LikePredicate.java index 97d8f2afdd9a35..8d72c2a112eae2 100644 --- a/fe/fe-core/src/main/java/org/apache/doris/analysis/LikePredicate.java +++ b/fe/fe-core/src/main/java/org/apache/doris/analysis/LikePredicate.java @@ -113,14 +113,16 @@ protected void toThrift(TExprNode msg) { @Override public void analyzeImpl(Analyzer analyzer) throws AnalysisException { super.analyzeImpl(analyzer); - if (!getChild(0).getType().isStringType() && !getChild(0).getType().isFixedPointType() - && !getChild(0).getType().isNull()) { + if (getChild(0).getType().isObjectStored()) { throw new AnalysisException( - "left operand of " + op.toString() + " must be of type STRING or FIXED_POINT_TYPE: " + toSql()); + "left operand of " + op.toString() + " must not be Bitmap or HLL: " + toSql()); } if (!getChild(1).getType().isStringType() && !getChild(1).getType().isNull()) { - throw new AnalysisException( - "right operand of " + op.toString() + " must be of type STRING: " + toSql()); + throw new AnalysisException("right operand of " + op.toString() + " must be of type STRING: " + toSql()); + } + + if (!getChild(0).getType().isStringType()) { + uncheckedCastChild(Type.VARCHAR, 0); } fn = getBuiltinFunction(analyzer, op.toString(), diff --git a/fe/fe-core/src/main/java/org/apache/doris/catalog/FunctionSet.java b/fe/fe-core/src/main/java/org/apache/doris/catalog/FunctionSet.java index 0bbc83ffd9ab59..3582a04c9e224f 100644 --- a/fe/fe-core/src/main/java/org/apache/doris/catalog/FunctionSet.java +++ b/fe/fe-core/src/main/java/org/apache/doris/catalog/FunctionSet.java @@ -1210,10 +1210,12 @@ public void addBuiltinBothScalaAndVectorized(Function fn) { vecFns = Lists.newArrayList(); vectorizedFunctions.put(fn.functionName(), vecFns); } - ScalarFunction scalarFunction = (ScalarFunction)fn; - vecFns.add(ScalarFunction.createVecBuiltin(scalarFunction.functionName(), scalarFunction.getSymbolName(), - Lists.newArrayList(scalarFunction.getArgs()), scalarFunction.hasVarArgs(), - scalarFunction.getReturnType(), scalarFunction.isUserVisible(), scalarFunction.getNullableMode())); + ScalarFunction scalarFunction = (ScalarFunction) fn; + vecFns.add(ScalarFunction.createVecBuiltin(scalarFunction.functionName(), scalarFunction.getPrepareFnSymbol(), + scalarFunction.getSymbolName(), scalarFunction.getCloseFnSymbol(), + Lists.newArrayList(scalarFunction.getArgs()), scalarFunction.hasVarArgs(), + scalarFunction.getReturnType(), scalarFunction.isUserVisible(), + scalarFunction.getNullableMode())); } diff --git a/fe/fe-core/src/main/java/org/apache/doris/catalog/ScalarFunction.java b/fe/fe-core/src/main/java/org/apache/doris/catalog/ScalarFunction.java index e1f09fb2489239..f8d48094a2868f 100644 --- a/fe/fe-core/src/main/java/org/apache/doris/catalog/ScalarFunction.java +++ b/fe/fe-core/src/main/java/org/apache/doris/catalog/ScalarFunction.java @@ -285,16 +285,22 @@ public static ScalarFunction createBuiltin( public static ScalarFunction createVecBuiltinOperator( String name, String symbol, ArrayList argTypes, Type retType, NullableMode nullableMode) { - return createVecBuiltin(name, symbol, argTypes, false, retType, false, nullableMode); + return createVecBuiltin(name, null, symbol, null, argTypes, false, retType, false, nullableMode); } //TODO: This method should not be here, move to other place in the future - public static ScalarFunction createVecBuiltin( - String name, String symbol, ArrayList argTypes, - boolean hasVarArgs, Type retType, boolean userVisible, NullableMode nullableMode) { - ScalarFunction fn = new ScalarFunction( - new FunctionName(name), argTypes, retType, hasVarArgs, userVisible, true); + public static ScalarFunction createVecBuiltin(String name, String prepareFnSymbolBName, String symbol, + String closeFnSymbolName, ArrayList argTypes, boolean hasVarArgs, Type retType, boolean userVisible, + NullableMode nullableMode) { + ScalarFunction fn = new ScalarFunction(new FunctionName(name), argTypes, retType, hasVarArgs, userVisible, + true); + if (prepareFnSymbolBName != null) { + fn.prepareFnSymbol = prepareFnSymbolBName; + } fn.symbolName = symbol; + if (closeFnSymbolName != null) { + fn.closeFnSymbol = closeFnSymbolName; + } fn.nullableMode = nullableMode; return fn; } diff --git a/fe/fe-core/src/main/java/org/apache/doris/rewrite/RewriteLikePredicateRule.java b/fe/fe-core/src/main/java/org/apache/doris/rewrite/RewriteLikePredicateRule.java deleted file mode 100644 index c9679e8a330493..00000000000000 --- a/fe/fe-core/src/main/java/org/apache/doris/rewrite/RewriteLikePredicateRule.java +++ /dev/null @@ -1,50 +0,0 @@ -// 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. - -package org.apache.doris.rewrite; - -import org.apache.doris.analysis.Analyzer; -import org.apache.doris.analysis.CastExpr; -import org.apache.doris.analysis.Expr; -import org.apache.doris.analysis.LikePredicate; -import org.apache.doris.analysis.SlotRef; -import org.apache.doris.analysis.TypeDef; -import org.apache.doris.catalog.Type; -import org.apache.doris.common.AnalysisException; - -/** - * Rewrite `int` to `string` in like predicate - * in order to support `int` in like predicate, same as MySQL - */ -public class RewriteLikePredicateRule implements ExprRewriteRule { - public static RewriteLikePredicateRule INSTANCE = new RewriteLikePredicateRule(); - - @Override - public Expr apply(Expr expr, Analyzer analyzer, ExprRewriter.ClauseType clauseType) throws AnalysisException { - if (expr instanceof LikePredicate) { - Expr leftChild = expr.getChild(0); - if (leftChild instanceof SlotRef) { - Type type = leftChild.getType(); - if (type.isFixedPointType()) { - return new LikePredicate(((LikePredicate) expr).getOp(), - new CastExpr(new TypeDef(Type.VARCHAR), leftChild), expr.getChild(1)); - } - } - } - return expr; - } -} diff --git a/regression-test/common/load/test_basic_agg.sql b/regression-test/common/load/test_basic_agg.sql new file mode 100644 index 00000000000000..bb794971f4890c --- /dev/null +++ b/regression-test/common/load/test_basic_agg.sql @@ -0,0 +1 @@ +insert into test_basic_agg values(0,0,0,0,0,'0',0,0,0,0,0); \ No newline at end of file diff --git a/regression-test/common/table/test_basic_agg.sql b/regression-test/common/table/test_basic_agg.sql new file mode 100644 index 00000000000000..bd1ca6b2de1b2f --- /dev/null +++ b/regression-test/common/table/test_basic_agg.sql @@ -0,0 +1,26 @@ +CREATE TABLE `test_basic_agg` ( + `k1` tinyint(4) NULL COMMENT "", + `k2` smallint(6) NULL COMMENT "", + `k3` int(11) NULL COMMENT "", + `k4` bigint(20) NULL COMMENT "", + `k5` decimal(9, 3) NULL COMMENT "", + `k6` char(5) NULL COMMENT "", + `k10` date NULL COMMENT "", + `k11` datetime NULL COMMENT "", + `k7` varchar(20) NULL COMMENT "", + `k8` double MAX NULL COMMENT "", + `k9` float SUM NULL COMMENT "" +) ENGINE=OLAP +AGGREGATE KEY(`k1`, `k2`, `k3`, `k4`, `k5`, `k6`, `k10`, `k11`, `k7`) +COMMENT "OLAP" +PARTITION BY RANGE(`k1`) +(PARTITION p1 VALUES [("-128"), ("-64")), +PARTITION p2 VALUES [("-64"), ("0")), +PARTITION p3 VALUES [("0"), ("64")), +PARTITION p4 VALUES [("64"), (MAXVALUE))) +DISTRIBUTED BY HASH(`k1`) BUCKETS 5 +PROPERTIES ( +"replication_allocation" = "tag.location.default: 1", +"in_memory" = "false", +"storage_format" = "V2" +); \ No newline at end of file diff --git a/regression-test/data/correctness/test_select_with_predicate_like.out b/regression-test/data/correctness/test_select_with_predicate_like.out new file mode 100644 index 00000000000000..887fc1ab4723a0 --- /dev/null +++ b/regression-test/data/correctness/test_select_with_predicate_like.out @@ -0,0 +1,21 @@ +-- This file is automatically generated. You should know what you did if you want to edit this +-- !select_default -- +1 + +-- !select_default2 -- +1 + +-- !select_default3 -- + +-- !select_default4 -- + +-- !select_default -- +1 + +-- !select_default2 -- +1 + +-- !select_default3 -- + +-- !select_default4 -- + diff --git a/regression-test/suites/correctness/test_select_constant.groovy b/regression-test/suites/correctness/test_select_constant.groovy index 6368d3208304b8..787a4a32a3cb2e 100644 --- a/regression-test/suites/correctness/test_select_constant.groovy +++ b/regression-test/suites/correctness/test_select_constant.groovy @@ -1,3 +1,20 @@ +// 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_select_constant") { qt_select1 'select 100, "test", date("2021-01-02")' -} \ No newline at end of file +} diff --git a/regression-test/suites/correctness/test_select_with_predicate_like.groovy b/regression-test/suites/correctness/test_select_with_predicate_like.groovy new file mode 100644 index 00000000000000..9491c4271ca530 --- /dev/null +++ b/regression-test/suites/correctness/test_select_with_predicate_like.groovy @@ -0,0 +1,35 @@ +// 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_select_with_predicate_like") { + def tables=["test_basic_agg"] + + for (String table in tables) { + sql """drop table if exists ${table};""" + sql new File("""regression-test/common/table/${table}.sql""").text + sql new File("""regression-test/common/load/${table}.sql""").text + } + + + qt_select_default "select 1 from test_basic_agg where 1998 like '1%';" + qt_select_default2 "select 1 from test_basic_agg where '1998' like '1%';" + qt_select_default3 "select 1 from test_basic_agg where 2998 like '1%';" + qt_select_default4 "select 1 from test_basic_agg where '2998' like '1%';" + qt_select_default "select 1 from test_basic_agg where 199.8 like '1%';" + qt_select_default2 "select 1 from test_basic_agg where '199.8' like '1%';" + qt_select_default3 "select 1 from test_basic_agg where 299.8 like '1%';" + qt_select_default4 "select 1 from test_basic_agg where '299.8' like '1%';" +} \ No newline at end of file diff --git a/regression-test/suites/demo/connect_action.groovy b/regression-test/suites/demo/connect_action.groovy index ba85cda770e945..5d86fb26a350dc 100644 --- a/regression-test/suites/demo/connect_action.groovy +++ b/regression-test/suites/demo/connect_action.groovy @@ -1,3 +1,20 @@ +// 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("connect_action", "demo") { logger.info("ok") def result1 = connect(user = 'admin', password = context.config.jdbcPassword, url = context.config.jdbcUrl) { diff --git a/regression-test/suites/demo/event_action.groovy b/regression-test/suites/demo/event_action.groovy index 45938729f35b6a..b55e38f38a4af3 100644 --- a/regression-test/suites/demo/event_action.groovy +++ b/regression-test/suites/demo/event_action.groovy @@ -1,3 +1,20 @@ +// 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("event_action", "demo") { def createTable = { tableName -> sql """ diff --git a/regression-test/suites/demo/explain_action.groovy b/regression-test/suites/demo/explain_action.groovy index ca0ec6e8b63515..80b8a2902d4829 100644 --- a/regression-test/suites/demo/explain_action.groovy +++ b/regression-test/suites/demo/explain_action.groovy @@ -1,3 +1,20 @@ +// 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("explain_action", "demo") { explain { sql("select 100") diff --git a/regression-test/suites/demo/lazyCheck_action.groovy b/regression-test/suites/demo/lazyCheck_action.groovy index 377217dc60a408..91b14068ccadd0 100644 --- a/regression-test/suites/demo/lazyCheck_action.groovy +++ b/regression-test/suites/demo/lazyCheck_action.groovy @@ -1,3 +1,20 @@ +// 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("lazyCheck_action_exceptions", "demo") { /***** 1. lazy check exceptions *****/ diff --git a/regression-test/suites/demo/qt_action.groovy b/regression-test/suites/demo/qt_action.groovy index da6251377cfad0..02898075490a14 100644 --- a/regression-test/suites/demo/qt_action.groovy +++ b/regression-test/suites/demo/qt_action.groovy @@ -1,3 +1,20 @@ +// 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("qt_action", "demo") { /** * qt_xxx sql equals to quickTest(xxx, sql) witch xxx is tag. diff --git a/regression-test/suites/demo/select_union_all_action.groovy b/regression-test/suites/demo/select_union_all_action.groovy index 1964b83582a96e..a85b0515766f88 100644 --- a/regression-test/suites/demo/select_union_all_action.groovy +++ b/regression-test/suites/demo/select_union_all_action.groovy @@ -1,3 +1,20 @@ +// 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("select_union_all_action", "demo") { // 3 rows and 1 column def rows = [3, 1, 10] diff --git a/regression-test/suites/demo/sql_action.groovy b/regression-test/suites/demo/sql_action.groovy index 66802f366943bb..73a33b495058b2 100644 --- a/regression-test/suites/demo/sql_action.groovy +++ b/regression-test/suites/demo/sql_action.groovy @@ -1,3 +1,20 @@ +// 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("sql_action", "demo") { // execute sql and ignore result sql "show databases" diff --git a/regression-test/suites/demo/streamLoad_action.groovy b/regression-test/suites/demo/streamLoad_action.groovy index cc131128d10e4b..c12ce81fa5728f 100644 --- a/regression-test/suites/demo/streamLoad_action.groovy +++ b/regression-test/suites/demo/streamLoad_action.groovy @@ -1,3 +1,20 @@ +// 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("streamLoad_action", "demo") { def tableName = "test_streamload_action1" diff --git a/regression-test/suites/demo/test_action.groovy b/regression-test/suites/demo/test_action.groovy index 54615f3ed44235..eb13c49feb56aa 100644 --- a/regression-test/suites/demo/test_action.groovy +++ b/regression-test/suites/demo/test_action.groovy @@ -1,3 +1,20 @@ +// 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_action", "demo") { test { sql "abcdefg" diff --git a/regression-test/suites/demo/thread_action.groovy b/regression-test/suites/demo/thread_action.groovy index afa6765a457d4b..26bbedec9d75c8 100644 --- a/regression-test/suites/demo/thread_action.groovy +++ b/regression-test/suites/demo/thread_action.groovy @@ -1,3 +1,20 @@ +// 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("thread_action", "demo") { def (_, elapsedMillis) = timer { /** diff --git a/regression-test/suites/demo/timer_action.groovy b/regression-test/suites/demo/timer_action.groovy index 3d4f15069c6e43..c55743ab1345c7 100644 --- a/regression-test/suites/demo/timer_action.groovy +++ b/regression-test/suites/demo/timer_action.groovy @@ -1,3 +1,20 @@ +// 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("timer_action", "demo") { def (sumResult, elapsedMillis) = timer { long sum = 0 diff --git a/regression-test/suites/empty_table/load.groovy b/regression-test/suites/empty_table/load.groovy index 6b8cd7a3b7416b..76d184e3d7fa14 100644 --- a/regression-test/suites/empty_table/load.groovy +++ b/regression-test/suites/empty_table/load.groovy @@ -1,4 +1,3 @@ - // 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 diff --git a/regression-test/suites/join/load.groovy b/regression-test/suites/join/load.groovy index 404d85fc962249..a80a00e6158759 100644 --- a/regression-test/suites/join/load.groovy +++ b/regression-test/suites/join/load.groovy @@ -1,4 +1,3 @@ - // 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 diff --git a/regression-test/suites/join/sql/agg_output_as_right_tale_left_outer_order.sql b/regression-test/suites/join/sql/agg_output_as_right_tale_left_outer_order.sql index 23a1ff45cd64b5..134d14d5f50fc3 100644 --- a/regression-test/suites/join/sql/agg_output_as_right_tale_left_outer_order.sql +++ b/regression-test/suites/join/sql/agg_output_as_right_tale_left_outer_order.sql @@ -1 +1 @@ -select t1.k1,t2.k1 from test_join t1 left join (select k1 from test_join group by k1) t2 on t1.k1=t2.k1 +select t1.k1,t2.k1 from test_join t1 left join (select k1 from test_join group by k1) t2 on t1.k1=t2.k1 \ No newline at end of file diff --git a/regression-test/suites/performance/test_streamload_perfomance.groovy b/regression-test/suites/performance/test_streamload_perfomance.groovy index 8a5ef4a16cbb4e..8023e52822fa8d 100644 --- a/regression-test/suites/performance/test_streamload_perfomance.groovy +++ b/regression-test/suites/performance/test_streamload_perfomance.groovy @@ -1,3 +1,20 @@ +// 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_streamload_perfomance", "performance") { def tableName = "test_streamload_performance1" @@ -10,7 +27,7 @@ suite("test_streamload_perfomance", "performance") { DISTRIBUTED BY HASH(id) BUCKETS 1 PROPERTIES ( "replication_num" = "1" - ) + ) """ def rowCount = 10000