This is an automated email from the ASF dual-hosted git repository.

lihaopeng pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-doris.git


The following commit(s) were added to refs/heads/master by this push:
     new 453485abfb [Bug] Fix some bugs(rewrite rule/symbol transport) of `like 
predicate` (#8770)
453485abfb is described below

commit 453485abfb2e3988e77a7b4a386a25dcca27bd90
Author: Pxl <[email protected]>
AuthorDate: Fri Apr 8 14:32:09 2022 +0800

    [Bug] Fix some bugs(rewrite rule/symbol transport) of `like predicate` 
(#8770)
---
 .licenserc.yaml                                    |  3 +-
 .../java/org/apache/doris/analysis/Analyzer.java   |  2 -
 .../org/apache/doris/analysis/LikePredicate.java   | 12 +++---
 .../java/org/apache/doris/catalog/FunctionSet.java | 10 +++--
 .../org/apache/doris/catalog/ScalarFunction.java   | 18 +++++---
 .../doris/rewrite/RewriteLikePredicateRule.java    | 50 ----------------------
 regression-test/common/load/test_basic_agg.sql     |  1 +
 regression-test/common/table/test_basic_agg.sql    | 26 +++++++++++
 .../test_select_with_predicate_like.out            | 21 +++++++++
 .../suites/correctness/test_select_constant.groovy | 19 +++++++-
 .../test_select_with_predicate_like.groovy         | 35 +++++++++++++++
 regression-test/suites/demo/connect_action.groovy  | 17 ++++++++
 regression-test/suites/demo/event_action.groovy    | 17 ++++++++
 regression-test/suites/demo/explain_action.groovy  | 17 ++++++++
 .../suites/demo/lazyCheck_action.groovy            | 17 ++++++++
 regression-test/suites/demo/qt_action.groovy       | 17 ++++++++
 .../suites/demo/select_union_all_action.groovy     | 17 ++++++++
 regression-test/suites/demo/sql_action.groovy      | 17 ++++++++
 .../suites/demo/streamLoad_action.groovy           | 17 ++++++++
 regression-test/suites/demo/test_action.groovy     | 17 ++++++++
 regression-test/suites/demo/thread_action.groovy   | 17 ++++++++
 regression-test/suites/demo/timer_action.groovy    | 17 ++++++++
 regression-test/suites/empty_table/load.groovy     |  1 -
 regression-test/suites/join/load.groovy            |  1 -
 .../agg_output_as_right_tale_left_outer_order.sql  |  2 +-
 .../performance/test_streamload_perfomance.groovy  | 19 +++++++-
 26 files changed, 333 insertions(+), 74 deletions(-)

diff --git a/.licenserc.yaml b/.licenserc.yaml
index b9a6a6e687..4d70746345 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 8b5ebab306..0e3ed6d39b 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.RewriteAliasFunctionRule;
 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 class Analyzer {
             rules.add(RewriteDateLiteralRule.INSTANCE);
             rules.add(RewriteEncryptKeyRule.INSTANCE);
             rules.add(RewriteAliasFunctionRule.INSTANCE);
-            rules.add(RewriteLikePredicateRule.INSTANCE);
             List<ExprRewriteRule> 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 97d8f2afdd..8d72c2a112 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 @@ public class LikePredicate extends Predicate {
     @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 b705151d79..7120a40ec5 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 class 
FunctionSet<min_initIN9doris_udf12DecimalV2ValEEEvPNS2_15FunctionCo
             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 e1f09fb248..f8d48094a2 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 class ScalarFunction extends Function {
 
     public static ScalarFunction createVecBuiltinOperator(
             String name, String symbol, ArrayList<Type> 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<Type> 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<Type> 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 c9679e8a33..0000000000
--- 
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 0000000000..bb794971f4
--- /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 0000000000..bd1ca6b2de
--- /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 0000000000..887fc1ab47
--- /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 6368d32083..787a4a32a3 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 0000000000..9491c4271c
--- /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 ba85cda770..5d86fb26a3 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 45938729f3..b55e38f38a 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 ca0ec6e8b6..80b8a2902d 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 377217dc60..91b14068cc 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 da6251377c..0289807549 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 1964b83582..a85b051576 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 66802f3669..73a33b4950 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 cc131128d1..c12ce81fa5 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 54615f3ed4..eb13c49feb 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 afa6765a45..26bbedec9d 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 3d4f15069c..c55743ab13 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 6b8cd7a3b7..76d184e3d7 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 404d85fc96..a80a00e615 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 23a1ff45cd..134d14d5f5 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 8a5ef4a16c..8023e52822 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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to