You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@asterixdb.apache.org by im...@apache.org on 2015/09/28 22:08:55 UTC

[25/51] [partial] incubator-asterixdb git commit: ASTERIXDB-1113, Add ASF license header to AQL files

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/857dc139/asterix-app/src/test/resources/runtimets/queries/aggregate-sql/avg_empty_02/avg_empty_02.1.ddl.aql
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/runtimets/queries/aggregate-sql/avg_empty_02/avg_empty_02.1.ddl.aql b/asterix-app/src/test/resources/runtimets/queries/aggregate-sql/avg_empty_02/avg_empty_02.1.ddl.aql
index 4773b3f..b73ef38 100644
--- a/asterix-app/src/test/resources/runtimets/queries/aggregate-sql/avg_empty_02/avg_empty_02.1.ddl.aql
+++ b/asterix-app/src/test/resources/runtimets/queries/aggregate-sql/avg_empty_02/avg_empty_02.1.ddl.aql
@@ -1,4 +1,22 @@
 /*
+ * 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.
+ */
+/*
  * Description    : Tests that sql-avg aggregation correctly returns null for an empty stream,
  *                  with an aggregate combiner.
  * Success        : Yes

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/857dc139/asterix-app/src/test/resources/runtimets/queries/aggregate-sql/avg_empty_02/avg_empty_02.2.update.aql
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/runtimets/queries/aggregate-sql/avg_empty_02/avg_empty_02.2.update.aql b/asterix-app/src/test/resources/runtimets/queries/aggregate-sql/avg_empty_02/avg_empty_02.2.update.aql
index 7b6bb9c..356d5e3 100644
--- a/asterix-app/src/test/resources/runtimets/queries/aggregate-sql/avg_empty_02/avg_empty_02.2.update.aql
+++ b/asterix-app/src/test/resources/runtimets/queries/aggregate-sql/avg_empty_02/avg_empty_02.2.update.aql
@@ -1,4 +1,22 @@
 /*
+ * 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.
+ */
+/*
  * Description    : Tests that sql-avg aggregation correctly returns null for an empty stream,
  *                  with an aggregate combiner.
  * Success        : Yes

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/857dc139/asterix-app/src/test/resources/runtimets/queries/aggregate-sql/avg_empty_02/avg_empty_02.3.query.aql
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/runtimets/queries/aggregate-sql/avg_empty_02/avg_empty_02.3.query.aql b/asterix-app/src/test/resources/runtimets/queries/aggregate-sql/avg_empty_02/avg_empty_02.3.query.aql
index 7f7489c..0332ec9 100644
--- a/asterix-app/src/test/resources/runtimets/queries/aggregate-sql/avg_empty_02/avg_empty_02.3.query.aql
+++ b/asterix-app/src/test/resources/runtimets/queries/aggregate-sql/avg_empty_02/avg_empty_02.3.query.aql
@@ -1,4 +1,22 @@
 /*
+ * 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.
+ */
+/*
  * Description    : Tests that sql-avg aggregation correctly returns null for an empty stream,
  *                  with an aggregate combiner.
  * Success        : Yes

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/857dc139/asterix-app/src/test/resources/runtimets/queries/aggregate-sql/avg_float/avg_float.1.ddl.aql
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/runtimets/queries/aggregate-sql/avg_float/avg_float.1.ddl.aql b/asterix-app/src/test/resources/runtimets/queries/aggregate-sql/avg_float/avg_float.1.ddl.aql
index 97b4670..950d2b4 100644
--- a/asterix-app/src/test/resources/runtimets/queries/aggregate-sql/avg_float/avg_float.1.ddl.aql
+++ b/asterix-app/src/test/resources/runtimets/queries/aggregate-sql/avg_float/avg_float.1.ddl.aql
@@ -1,3 +1,21 @@
+/*
+ * 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.
+ */
 drop dataverse test if exists;
 
 create dataverse test;

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/857dc139/asterix-app/src/test/resources/runtimets/queries/aggregate-sql/avg_float/avg_float.2.update.aql
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/runtimets/queries/aggregate-sql/avg_float/avg_float.2.update.aql b/asterix-app/src/test/resources/runtimets/queries/aggregate-sql/avg_float/avg_float.2.update.aql
index e69de29..042f3ce 100644
--- a/asterix-app/src/test/resources/runtimets/queries/aggregate-sql/avg_float/avg_float.2.update.aql
+++ b/asterix-app/src/test/resources/runtimets/queries/aggregate-sql/avg_float/avg_float.2.update.aql
@@ -0,0 +1,18 @@
+/*
+ * 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.
+ */

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/857dc139/asterix-app/src/test/resources/runtimets/queries/aggregate-sql/avg_float/avg_float.3.query.aql
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/runtimets/queries/aggregate-sql/avg_float/avg_float.3.query.aql b/asterix-app/src/test/resources/runtimets/queries/aggregate-sql/avg_float/avg_float.3.query.aql
index a106705..6b302e8 100644
--- a/asterix-app/src/test/resources/runtimets/queries/aggregate-sql/avg_float/avg_float.3.query.aql
+++ b/asterix-app/src/test/resources/runtimets/queries/aggregate-sql/avg_float/avg_float.3.query.aql
@@ -1,3 +1,21 @@
+/*
+ * 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.
+ */
 use dataverse test;
 
 sql-avg( 

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/857dc139/asterix-app/src/test/resources/runtimets/queries/aggregate-sql/avg_float_null/avg_float_nu.1.ddl.aql
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/runtimets/queries/aggregate-sql/avg_float_null/avg_float_nu.1.ddl.aql b/asterix-app/src/test/resources/runtimets/queries/aggregate-sql/avg_float_null/avg_float_nu.1.ddl.aql
index 9009897..8ac0753 100644
--- a/asterix-app/src/test/resources/runtimets/queries/aggregate-sql/avg_float_null/avg_float_nu.1.ddl.aql
+++ b/asterix-app/src/test/resources/runtimets/queries/aggregate-sql/avg_float_null/avg_float_nu.1.ddl.aql
@@ -1,3 +1,21 @@
+/*
+ * 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.
+ */
 drop dataverse test if exists;
 
 create dataverse test;

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/857dc139/asterix-app/src/test/resources/runtimets/queries/aggregate-sql/avg_float_null/avg_float_nu.2.update.aql
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/runtimets/queries/aggregate-sql/avg_float_null/avg_float_nu.2.update.aql b/asterix-app/src/test/resources/runtimets/queries/aggregate-sql/avg_float_null/avg_float_nu.2.update.aql
index e69de29..042f3ce 100644
--- a/asterix-app/src/test/resources/runtimets/queries/aggregate-sql/avg_float_null/avg_float_nu.2.update.aql
+++ b/asterix-app/src/test/resources/runtimets/queries/aggregate-sql/avg_float_null/avg_float_nu.2.update.aql
@@ -0,0 +1,18 @@
+/*
+ * 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.
+ */

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/857dc139/asterix-app/src/test/resources/runtimets/queries/aggregate-sql/avg_float_null/avg_float_nu.3.query.aql
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/runtimets/queries/aggregate-sql/avg_float_null/avg_float_nu.3.query.aql b/asterix-app/src/test/resources/runtimets/queries/aggregate-sql/avg_float_null/avg_float_nu.3.query.aql
index fdadd1d..b25a44b 100644
--- a/asterix-app/src/test/resources/runtimets/queries/aggregate-sql/avg_float_null/avg_float_nu.3.query.aql
+++ b/asterix-app/src/test/resources/runtimets/queries/aggregate-sql/avg_float_null/avg_float_nu.3.query.aql
@@ -1,3 +1,21 @@
+/*
+ * 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.
+ */
 use dataverse test;
 
 let $a := sql-avg( 

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/857dc139/asterix-app/src/test/resources/runtimets/queries/aggregate-sql/avg_int16/avg_int16.1.ddl.aql
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/runtimets/queries/aggregate-sql/avg_int16/avg_int16.1.ddl.aql b/asterix-app/src/test/resources/runtimets/queries/aggregate-sql/avg_int16/avg_int16.1.ddl.aql
index 97b4670..950d2b4 100644
--- a/asterix-app/src/test/resources/runtimets/queries/aggregate-sql/avg_int16/avg_int16.1.ddl.aql
+++ b/asterix-app/src/test/resources/runtimets/queries/aggregate-sql/avg_int16/avg_int16.1.ddl.aql
@@ -1,3 +1,21 @@
+/*
+ * 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.
+ */
 drop dataverse test if exists;
 
 create dataverse test;

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/857dc139/asterix-app/src/test/resources/runtimets/queries/aggregate-sql/avg_int16/avg_int16.2.update.aql
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/runtimets/queries/aggregate-sql/avg_int16/avg_int16.2.update.aql b/asterix-app/src/test/resources/runtimets/queries/aggregate-sql/avg_int16/avg_int16.2.update.aql
index 8b13789..bd244d0 100644
--- a/asterix-app/src/test/resources/runtimets/queries/aggregate-sql/avg_int16/avg_int16.2.update.aql
+++ b/asterix-app/src/test/resources/runtimets/queries/aggregate-sql/avg_int16/avg_int16.2.update.aql
@@ -1 +1,19 @@
+/*
+ * 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.
+ */
 

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/857dc139/asterix-app/src/test/resources/runtimets/queries/aggregate-sql/avg_int16/avg_int16.3.query.aql
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/runtimets/queries/aggregate-sql/avg_int16/avg_int16.3.query.aql b/asterix-app/src/test/resources/runtimets/queries/aggregate-sql/avg_int16/avg_int16.3.query.aql
index c204756..4c6b4d9 100644
--- a/asterix-app/src/test/resources/runtimets/queries/aggregate-sql/avg_int16/avg_int16.3.query.aql
+++ b/asterix-app/src/test/resources/runtimets/queries/aggregate-sql/avg_int16/avg_int16.3.query.aql
@@ -1,3 +1,21 @@
+/*
+ * 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.
+ */
 use dataverse test;
 
 sql-avg( 

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/857dc139/asterix-app/src/test/resources/runtimets/queries/aggregate-sql/avg_int16_null/avg_int16_null.1.ddl.aql
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/runtimets/queries/aggregate-sql/avg_int16_null/avg_int16_null.1.ddl.aql b/asterix-app/src/test/resources/runtimets/queries/aggregate-sql/avg_int16_null/avg_int16_null.1.ddl.aql
index 9009897..8ac0753 100644
--- a/asterix-app/src/test/resources/runtimets/queries/aggregate-sql/avg_int16_null/avg_int16_null.1.ddl.aql
+++ b/asterix-app/src/test/resources/runtimets/queries/aggregate-sql/avg_int16_null/avg_int16_null.1.ddl.aql
@@ -1,3 +1,21 @@
+/*
+ * 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.
+ */
 drop dataverse test if exists;
 
 create dataverse test;

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/857dc139/asterix-app/src/test/resources/runtimets/queries/aggregate-sql/avg_int16_null/avg_int16_null.2.update.aql
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/runtimets/queries/aggregate-sql/avg_int16_null/avg_int16_null.2.update.aql b/asterix-app/src/test/resources/runtimets/queries/aggregate-sql/avg_int16_null/avg_int16_null.2.update.aql
index e69de29..042f3ce 100644
--- a/asterix-app/src/test/resources/runtimets/queries/aggregate-sql/avg_int16_null/avg_int16_null.2.update.aql
+++ b/asterix-app/src/test/resources/runtimets/queries/aggregate-sql/avg_int16_null/avg_int16_null.2.update.aql
@@ -0,0 +1,18 @@
+/*
+ * 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.
+ */

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/857dc139/asterix-app/src/test/resources/runtimets/queries/aggregate-sql/avg_int16_null/avg_int16_null.3.query.aql
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/runtimets/queries/aggregate-sql/avg_int16_null/avg_int16_null.3.query.aql b/asterix-app/src/test/resources/runtimets/queries/aggregate-sql/avg_int16_null/avg_int16_null.3.query.aql
index 738cc6d..4e6f4f3 100644
--- a/asterix-app/src/test/resources/runtimets/queries/aggregate-sql/avg_int16_null/avg_int16_null.3.query.aql
+++ b/asterix-app/src/test/resources/runtimets/queries/aggregate-sql/avg_int16_null/avg_int16_null.3.query.aql
@@ -1,3 +1,21 @@
+/*
+ * 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.
+ */
 use dataverse test;
 
 let $a := sql-avg( 

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/857dc139/asterix-app/src/test/resources/runtimets/queries/aggregate-sql/avg_int32/avg_int32.1.ddl.aql
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/runtimets/queries/aggregate-sql/avg_int32/avg_int32.1.ddl.aql b/asterix-app/src/test/resources/runtimets/queries/aggregate-sql/avg_int32/avg_int32.1.ddl.aql
index 97b4670..950d2b4 100644
--- a/asterix-app/src/test/resources/runtimets/queries/aggregate-sql/avg_int32/avg_int32.1.ddl.aql
+++ b/asterix-app/src/test/resources/runtimets/queries/aggregate-sql/avg_int32/avg_int32.1.ddl.aql
@@ -1,3 +1,21 @@
+/*
+ * 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.
+ */
 drop dataverse test if exists;
 
 create dataverse test;

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/857dc139/asterix-app/src/test/resources/runtimets/queries/aggregate-sql/avg_int32/avg_int32.2.update.aql
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/runtimets/queries/aggregate-sql/avg_int32/avg_int32.2.update.aql b/asterix-app/src/test/resources/runtimets/queries/aggregate-sql/avg_int32/avg_int32.2.update.aql
index 8b13789..bd244d0 100644
--- a/asterix-app/src/test/resources/runtimets/queries/aggregate-sql/avg_int32/avg_int32.2.update.aql
+++ b/asterix-app/src/test/resources/runtimets/queries/aggregate-sql/avg_int32/avg_int32.2.update.aql
@@ -1 +1,19 @@
+/*
+ * 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.
+ */
 

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/857dc139/asterix-app/src/test/resources/runtimets/queries/aggregate-sql/avg_int32/avg_int32.3.query.aql
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/runtimets/queries/aggregate-sql/avg_int32/avg_int32.3.query.aql b/asterix-app/src/test/resources/runtimets/queries/aggregate-sql/avg_int32/avg_int32.3.query.aql
index fca3c6f..a7f196b 100644
--- a/asterix-app/src/test/resources/runtimets/queries/aggregate-sql/avg_int32/avg_int32.3.query.aql
+++ b/asterix-app/src/test/resources/runtimets/queries/aggregate-sql/avg_int32/avg_int32.3.query.aql
@@ -1,3 +1,21 @@
+/*
+ * 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.
+ */
 use dataverse test;
 
 sql-avg(

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/857dc139/asterix-app/src/test/resources/runtimets/queries/aggregate-sql/avg_int32_null/avg_int32_null.1.ddl.aql
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/runtimets/queries/aggregate-sql/avg_int32_null/avg_int32_null.1.ddl.aql b/asterix-app/src/test/resources/runtimets/queries/aggregate-sql/avg_int32_null/avg_int32_null.1.ddl.aql
index 9009897..8ac0753 100644
--- a/asterix-app/src/test/resources/runtimets/queries/aggregate-sql/avg_int32_null/avg_int32_null.1.ddl.aql
+++ b/asterix-app/src/test/resources/runtimets/queries/aggregate-sql/avg_int32_null/avg_int32_null.1.ddl.aql
@@ -1,3 +1,21 @@
+/*
+ * 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.
+ */
 drop dataverse test if exists;
 
 create dataverse test;

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/857dc139/asterix-app/src/test/resources/runtimets/queries/aggregate-sql/avg_int32_null/avg_int32_null.2.update.aql
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/runtimets/queries/aggregate-sql/avg_int32_null/avg_int32_null.2.update.aql b/asterix-app/src/test/resources/runtimets/queries/aggregate-sql/avg_int32_null/avg_int32_null.2.update.aql
index e69de29..042f3ce 100644
--- a/asterix-app/src/test/resources/runtimets/queries/aggregate-sql/avg_int32_null/avg_int32_null.2.update.aql
+++ b/asterix-app/src/test/resources/runtimets/queries/aggregate-sql/avg_int32_null/avg_int32_null.2.update.aql
@@ -0,0 +1,18 @@
+/*
+ * 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.
+ */

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/857dc139/asterix-app/src/test/resources/runtimets/queries/aggregate-sql/avg_int32_null/avg_int32_null.3.query.aql
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/runtimets/queries/aggregate-sql/avg_int32_null/avg_int32_null.3.query.aql b/asterix-app/src/test/resources/runtimets/queries/aggregate-sql/avg_int32_null/avg_int32_null.3.query.aql
index a2f16e0..5ed6abe 100644
--- a/asterix-app/src/test/resources/runtimets/queries/aggregate-sql/avg_int32_null/avg_int32_null.3.query.aql
+++ b/asterix-app/src/test/resources/runtimets/queries/aggregate-sql/avg_int32_null/avg_int32_null.3.query.aql
@@ -1,3 +1,21 @@
+/*
+ * 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.
+ */
 use dataverse test;
 
 let $a := sql-avg( 

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/857dc139/asterix-app/src/test/resources/runtimets/queries/aggregate-sql/avg_int64/avg_int64.1.ddl.aql
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/runtimets/queries/aggregate-sql/avg_int64/avg_int64.1.ddl.aql b/asterix-app/src/test/resources/runtimets/queries/aggregate-sql/avg_int64/avg_int64.1.ddl.aql
index d330bc0..15642ca 100644
--- a/asterix-app/src/test/resources/runtimets/queries/aggregate-sql/avg_int64/avg_int64.1.ddl.aql
+++ b/asterix-app/src/test/resources/runtimets/queries/aggregate-sql/avg_int64/avg_int64.1.ddl.aql
@@ -1,3 +1,21 @@
+/*
+ * 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.
+ */
 drop dataverse test if exists;
 
 create dataverse test;

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/857dc139/asterix-app/src/test/resources/runtimets/queries/aggregate-sql/avg_int64/avg_int64.2.update.aql
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/runtimets/queries/aggregate-sql/avg_int64/avg_int64.2.update.aql b/asterix-app/src/test/resources/runtimets/queries/aggregate-sql/avg_int64/avg_int64.2.update.aql
index e69de29..042f3ce 100644
--- a/asterix-app/src/test/resources/runtimets/queries/aggregate-sql/avg_int64/avg_int64.2.update.aql
+++ b/asterix-app/src/test/resources/runtimets/queries/aggregate-sql/avg_int64/avg_int64.2.update.aql
@@ -0,0 +1,18 @@
+/*
+ * 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.
+ */

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/857dc139/asterix-app/src/test/resources/runtimets/queries/aggregate-sql/avg_int64/avg_int64.3.query.aql
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/runtimets/queries/aggregate-sql/avg_int64/avg_int64.3.query.aql b/asterix-app/src/test/resources/runtimets/queries/aggregate-sql/avg_int64/avg_int64.3.query.aql
index fa668c1..82f297c 100644
--- a/asterix-app/src/test/resources/runtimets/queries/aggregate-sql/avg_int64/avg_int64.3.query.aql
+++ b/asterix-app/src/test/resources/runtimets/queries/aggregate-sql/avg_int64/avg_int64.3.query.aql
@@ -1,3 +1,21 @@
+/*
+ * 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.
+ */
 use dataverse test;
 
 sql-avg( 

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/857dc139/asterix-app/src/test/resources/runtimets/queries/aggregate-sql/avg_int64_null/avg_int64_null.1.ddl.aql
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/runtimets/queries/aggregate-sql/avg_int64_null/avg_int64_null.1.ddl.aql b/asterix-app/src/test/resources/runtimets/queries/aggregate-sql/avg_int64_null/avg_int64_null.1.ddl.aql
index 9009897..8ac0753 100644
--- a/asterix-app/src/test/resources/runtimets/queries/aggregate-sql/avg_int64_null/avg_int64_null.1.ddl.aql
+++ b/asterix-app/src/test/resources/runtimets/queries/aggregate-sql/avg_int64_null/avg_int64_null.1.ddl.aql
@@ -1,3 +1,21 @@
+/*
+ * 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.
+ */
 drop dataverse test if exists;
 
 create dataverse test;

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/857dc139/asterix-app/src/test/resources/runtimets/queries/aggregate-sql/avg_int64_null/avg_int64_null.2.update.aql
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/runtimets/queries/aggregate-sql/avg_int64_null/avg_int64_null.2.update.aql b/asterix-app/src/test/resources/runtimets/queries/aggregate-sql/avg_int64_null/avg_int64_null.2.update.aql
index e69de29..042f3ce 100644
--- a/asterix-app/src/test/resources/runtimets/queries/aggregate-sql/avg_int64_null/avg_int64_null.2.update.aql
+++ b/asterix-app/src/test/resources/runtimets/queries/aggregate-sql/avg_int64_null/avg_int64_null.2.update.aql
@@ -0,0 +1,18 @@
+/*
+ * 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.
+ */

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/857dc139/asterix-app/src/test/resources/runtimets/queries/aggregate-sql/avg_int64_null/avg_int64_null.3.query.aql
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/runtimets/queries/aggregate-sql/avg_int64_null/avg_int64_null.3.query.aql b/asterix-app/src/test/resources/runtimets/queries/aggregate-sql/avg_int64_null/avg_int64_null.3.query.aql
index 9534dc6..6cb021f 100644
--- a/asterix-app/src/test/resources/runtimets/queries/aggregate-sql/avg_int64_null/avg_int64_null.3.query.aql
+++ b/asterix-app/src/test/resources/runtimets/queries/aggregate-sql/avg_int64_null/avg_int64_null.3.query.aql
@@ -1,3 +1,21 @@
+/*
+ * 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.
+ */
 use dataverse test;
 
 let $a := sql-avg( 

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/857dc139/asterix-app/src/test/resources/runtimets/queries/aggregate-sql/avg_int8/avg_int8.1.ddl.aql
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/runtimets/queries/aggregate-sql/avg_int8/avg_int8.1.ddl.aql b/asterix-app/src/test/resources/runtimets/queries/aggregate-sql/avg_int8/avg_int8.1.ddl.aql
index d330bc0..15642ca 100644
--- a/asterix-app/src/test/resources/runtimets/queries/aggregate-sql/avg_int8/avg_int8.1.ddl.aql
+++ b/asterix-app/src/test/resources/runtimets/queries/aggregate-sql/avg_int8/avg_int8.1.ddl.aql
@@ -1,3 +1,21 @@
+/*
+ * 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.
+ */
 drop dataverse test if exists;
 
 create dataverse test;

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/857dc139/asterix-app/src/test/resources/runtimets/queries/aggregate-sql/avg_int8/avg_int8.2.update.aql
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/runtimets/queries/aggregate-sql/avg_int8/avg_int8.2.update.aql b/asterix-app/src/test/resources/runtimets/queries/aggregate-sql/avg_int8/avg_int8.2.update.aql
index e69de29..042f3ce 100644
--- a/asterix-app/src/test/resources/runtimets/queries/aggregate-sql/avg_int8/avg_int8.2.update.aql
+++ b/asterix-app/src/test/resources/runtimets/queries/aggregate-sql/avg_int8/avg_int8.2.update.aql
@@ -0,0 +1,18 @@
+/*
+ * 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.
+ */

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/857dc139/asterix-app/src/test/resources/runtimets/queries/aggregate-sql/avg_int8/avg_int8.3.query.aql
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/runtimets/queries/aggregate-sql/avg_int8/avg_int8.3.query.aql b/asterix-app/src/test/resources/runtimets/queries/aggregate-sql/avg_int8/avg_int8.3.query.aql
index fc77503..315b2d4 100644
--- a/asterix-app/src/test/resources/runtimets/queries/aggregate-sql/avg_int8/avg_int8.3.query.aql
+++ b/asterix-app/src/test/resources/runtimets/queries/aggregate-sql/avg_int8/avg_int8.3.query.aql
@@ -1,3 +1,21 @@
+/*
+ * 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.
+ */
 use dataverse test;
 
 sql-avg( 

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/857dc139/asterix-app/src/test/resources/runtimets/queries/aggregate-sql/avg_int8_null/avg_int8_null.1.ddl.aql
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/runtimets/queries/aggregate-sql/avg_int8_null/avg_int8_null.1.ddl.aql b/asterix-app/src/test/resources/runtimets/queries/aggregate-sql/avg_int8_null/avg_int8_null.1.ddl.aql
index 346d2a4..c762c11 100644
--- a/asterix-app/src/test/resources/runtimets/queries/aggregate-sql/avg_int8_null/avg_int8_null.1.ddl.aql
+++ b/asterix-app/src/test/resources/runtimets/queries/aggregate-sql/avg_int8_null/avg_int8_null.1.ddl.aql
@@ -1,3 +1,21 @@
+/*
+ * 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.
+ */
 drop dataverse test if exists;
 
 create dataverse test;

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/857dc139/asterix-app/src/test/resources/runtimets/queries/aggregate-sql/avg_int8_null/avg_int8_null.2.update.aql
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/runtimets/queries/aggregate-sql/avg_int8_null/avg_int8_null.2.update.aql b/asterix-app/src/test/resources/runtimets/queries/aggregate-sql/avg_int8_null/avg_int8_null.2.update.aql
index e69de29..042f3ce 100644
--- a/asterix-app/src/test/resources/runtimets/queries/aggregate-sql/avg_int8_null/avg_int8_null.2.update.aql
+++ b/asterix-app/src/test/resources/runtimets/queries/aggregate-sql/avg_int8_null/avg_int8_null.2.update.aql
@@ -0,0 +1,18 @@
+/*
+ * 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.
+ */

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/857dc139/asterix-app/src/test/resources/runtimets/queries/aggregate-sql/avg_int8_null/avg_int8_null.3.query.aql
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/runtimets/queries/aggregate-sql/avg_int8_null/avg_int8_null.3.query.aql b/asterix-app/src/test/resources/runtimets/queries/aggregate-sql/avg_int8_null/avg_int8_null.3.query.aql
index f5d91bf..a3c9cbd 100644
--- a/asterix-app/src/test/resources/runtimets/queries/aggregate-sql/avg_int8_null/avg_int8_null.3.query.aql
+++ b/asterix-app/src/test/resources/runtimets/queries/aggregate-sql/avg_int8_null/avg_int8_null.3.query.aql
@@ -1,3 +1,21 @@
+/*
+ * 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.
+ */
 use dataverse test;
 
 let $a := sql-avg( 

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/857dc139/asterix-app/src/test/resources/runtimets/queries/aggregate-sql/avg_mixed/avg_mixed.1.ddl.aql
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/runtimets/queries/aggregate-sql/avg_mixed/avg_mixed.1.ddl.aql b/asterix-app/src/test/resources/runtimets/queries/aggregate-sql/avg_mixed/avg_mixed.1.ddl.aql
index 8bfa5d2..1a67a52 100644
--- a/asterix-app/src/test/resources/runtimets/queries/aggregate-sql/avg_mixed/avg_mixed.1.ddl.aql
+++ b/asterix-app/src/test/resources/runtimets/queries/aggregate-sql/avg_mixed/avg_mixed.1.ddl.aql
@@ -1,4 +1,22 @@
 /*
+ * 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.
+ */
+/*
 * Description  : Run sql-avg over an ordered list with mixed types
 * Expected Res : Failure
 * Date         : Feb 7th 2014

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/857dc139/asterix-app/src/test/resources/runtimets/queries/aggregate-sql/avg_mixed/avg_mixed.2.update.aql
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/runtimets/queries/aggregate-sql/avg_mixed/avg_mixed.2.update.aql b/asterix-app/src/test/resources/runtimets/queries/aggregate-sql/avg_mixed/avg_mixed.2.update.aql
index 8b13789..bd244d0 100644
--- a/asterix-app/src/test/resources/runtimets/queries/aggregate-sql/avg_mixed/avg_mixed.2.update.aql
+++ b/asterix-app/src/test/resources/runtimets/queries/aggregate-sql/avg_mixed/avg_mixed.2.update.aql
@@ -1 +1,19 @@
+/*
+ * 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.
+ */
 

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/857dc139/asterix-app/src/test/resources/runtimets/queries/aggregate-sql/avg_mixed/avg_mixed.3.query.aql
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/runtimets/queries/aggregate-sql/avg_mixed/avg_mixed.3.query.aql b/asterix-app/src/test/resources/runtimets/queries/aggregate-sql/avg_mixed/avg_mixed.3.query.aql
index d1d9477..864c4ce 100644
--- a/asterix-app/src/test/resources/runtimets/queries/aggregate-sql/avg_mixed/avg_mixed.3.query.aql
+++ b/asterix-app/src/test/resources/runtimets/queries/aggregate-sql/avg_mixed/avg_mixed.3.query.aql
@@ -1,4 +1,22 @@
 /*
+ * 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.
+ */
+/*
 * Description  : Run sql-avg over an ordered list with mixed types
 * Expected Res : Failure
 * Date         : Feb 7th 2014

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/857dc139/asterix-app/src/test/resources/runtimets/queries/aggregate-sql/count_01/count_01.1.ddl.aql
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/runtimets/queries/aggregate-sql/count_01/count_01.1.ddl.aql b/asterix-app/src/test/resources/runtimets/queries/aggregate-sql/count_01/count_01.1.ddl.aql
index 55ab0f7..445809a 100644
--- a/asterix-app/src/test/resources/runtimets/queries/aggregate-sql/count_01/count_01.1.ddl.aql
+++ b/asterix-app/src/test/resources/runtimets/queries/aggregate-sql/count_01/count_01.1.ddl.aql
@@ -1,3 +1,21 @@
+/*
+ * 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.
+ */
 drop dataverse test if exists;
 
 create dataverse test;

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/857dc139/asterix-app/src/test/resources/runtimets/queries/aggregate-sql/count_01/count_01.2.update.aql
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/runtimets/queries/aggregate-sql/count_01/count_01.2.update.aql b/asterix-app/src/test/resources/runtimets/queries/aggregate-sql/count_01/count_01.2.update.aql
index 8b13789..bd244d0 100644
--- a/asterix-app/src/test/resources/runtimets/queries/aggregate-sql/count_01/count_01.2.update.aql
+++ b/asterix-app/src/test/resources/runtimets/queries/aggregate-sql/count_01/count_01.2.update.aql
@@ -1 +1,19 @@
+/*
+ * 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.
+ */
 

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/857dc139/asterix-app/src/test/resources/runtimets/queries/aggregate-sql/count_01/count_01.3.query.aql
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/runtimets/queries/aggregate-sql/count_01/count_01.3.query.aql b/asterix-app/src/test/resources/runtimets/queries/aggregate-sql/count_01/count_01.3.query.aql
index 0d87f51..74138b0 100644
--- a/asterix-app/src/test/resources/runtimets/queries/aggregate-sql/count_01/count_01.3.query.aql
+++ b/asterix-app/src/test/resources/runtimets/queries/aggregate-sql/count_01/count_01.3.query.aql
@@ -1,3 +1,21 @@
+/*
+ * 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.
+ */
 use dataverse test;
 
 sql-count( 

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/857dc139/asterix-app/src/test/resources/runtimets/queries/aggregate-sql/count_empty_01/count_empty_01.1.ddl.aql
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/runtimets/queries/aggregate-sql/count_empty_01/count_empty_01.1.ddl.aql b/asterix-app/src/test/resources/runtimets/queries/aggregate-sql/count_empty_01/count_empty_01.1.ddl.aql
index 22b6585..c772fbb 100644
--- a/asterix-app/src/test/resources/runtimets/queries/aggregate-sql/count_empty_01/count_empty_01.1.ddl.aql
+++ b/asterix-app/src/test/resources/runtimets/queries/aggregate-sql/count_empty_01/count_empty_01.1.ddl.aql
@@ -1,4 +1,22 @@
 /*
+ * 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.
+ */
+/*
  * Description    : Tests that sql-count aggregation correctly returns 0 for an empty stream,
  *                  without an aggregate combiner.
  * Success        : Yes

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/857dc139/asterix-app/src/test/resources/runtimets/queries/aggregate-sql/count_empty_01/count_empty_01.2.update.aql
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/runtimets/queries/aggregate-sql/count_empty_01/count_empty_01.2.update.aql b/asterix-app/src/test/resources/runtimets/queries/aggregate-sql/count_empty_01/count_empty_01.2.update.aql
index 6d86705..b0903c6 100644
--- a/asterix-app/src/test/resources/runtimets/queries/aggregate-sql/count_empty_01/count_empty_01.2.update.aql
+++ b/asterix-app/src/test/resources/runtimets/queries/aggregate-sql/count_empty_01/count_empty_01.2.update.aql
@@ -1,4 +1,22 @@
 /*
+ * 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.
+ */
+/*
  * Description    : Tests that sql-count aggregation correctly returns 0 for an empty stream,
  *                  without an aggregate combiner.
  * Success        : Yes

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/857dc139/asterix-app/src/test/resources/runtimets/queries/aggregate-sql/count_empty_01/count_empty_01.3.query.aql
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/runtimets/queries/aggregate-sql/count_empty_01/count_empty_01.3.query.aql b/asterix-app/src/test/resources/runtimets/queries/aggregate-sql/count_empty_01/count_empty_01.3.query.aql
index 27a7aa7..3cbebad 100644
--- a/asterix-app/src/test/resources/runtimets/queries/aggregate-sql/count_empty_01/count_empty_01.3.query.aql
+++ b/asterix-app/src/test/resources/runtimets/queries/aggregate-sql/count_empty_01/count_empty_01.3.query.aql
@@ -1,4 +1,22 @@
 /*
+ * 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.
+ */
+/*
  * Description    : Tests that sql-count aggregation correctly returns 0 for an empty stream,
  *                  without an aggregate combiner.
  * Success        : Yes

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/857dc139/asterix-app/src/test/resources/runtimets/queries/aggregate-sql/count_empty_02/count_empty_02.1.ddl.aql
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/runtimets/queries/aggregate-sql/count_empty_02/count_empty_02.1.ddl.aql b/asterix-app/src/test/resources/runtimets/queries/aggregate-sql/count_empty_02/count_empty_02.1.ddl.aql
index af41284..8edc6f8 100644
--- a/asterix-app/src/test/resources/runtimets/queries/aggregate-sql/count_empty_02/count_empty_02.1.ddl.aql
+++ b/asterix-app/src/test/resources/runtimets/queries/aggregate-sql/count_empty_02/count_empty_02.1.ddl.aql
@@ -1,4 +1,22 @@
 /*
+ * 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.
+ */
+/*
  * Description    : Tests that sql-count aggregation correctly returns 0 for an empty stream,
  *                  with an aggregate combiner.
  * Success        : Yes

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/857dc139/asterix-app/src/test/resources/runtimets/queries/aggregate-sql/count_empty_02/count_empty_02.2.update.aql
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/runtimets/queries/aggregate-sql/count_empty_02/count_empty_02.2.update.aql b/asterix-app/src/test/resources/runtimets/queries/aggregate-sql/count_empty_02/count_empty_02.2.update.aql
index 774e6ca..2fe949f 100644
--- a/asterix-app/src/test/resources/runtimets/queries/aggregate-sql/count_empty_02/count_empty_02.2.update.aql
+++ b/asterix-app/src/test/resources/runtimets/queries/aggregate-sql/count_empty_02/count_empty_02.2.update.aql
@@ -1,4 +1,22 @@
 /*
+ * 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.
+ */
+/*
  * Description    : Tests that sql-count aggregation correctly returns 0 for an empty stream,
  *                  with an aggregate combiner.
  * Success        : Yes

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/857dc139/asterix-app/src/test/resources/runtimets/queries/aggregate-sql/count_empty_02/count_empty_02.3.query.aql
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/runtimets/queries/aggregate-sql/count_empty_02/count_empty_02.3.query.aql b/asterix-app/src/test/resources/runtimets/queries/aggregate-sql/count_empty_02/count_empty_02.3.query.aql
index 33c080a..35d3650 100644
--- a/asterix-app/src/test/resources/runtimets/queries/aggregate-sql/count_empty_02/count_empty_02.3.query.aql
+++ b/asterix-app/src/test/resources/runtimets/queries/aggregate-sql/count_empty_02/count_empty_02.3.query.aql
@@ -1,4 +1,22 @@
 /*
+ * 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.
+ */
+/*
  * Description    : Tests that sql-count aggregation correctly returns 0 for an empty stream,
  *                  with an aggregate combiner.
  * Success        : Yes

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/857dc139/asterix-app/src/test/resources/runtimets/queries/aggregate-sql/count_null/count_null.1.ddl.aql
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/runtimets/queries/aggregate-sql/count_null/count_null.1.ddl.aql b/asterix-app/src/test/resources/runtimets/queries/aggregate-sql/count_null/count_null.1.ddl.aql
index 9009897..8ac0753 100644
--- a/asterix-app/src/test/resources/runtimets/queries/aggregate-sql/count_null/count_null.1.ddl.aql
+++ b/asterix-app/src/test/resources/runtimets/queries/aggregate-sql/count_null/count_null.1.ddl.aql
@@ -1,3 +1,21 @@
+/*
+ * 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.
+ */
 drop dataverse test if exists;
 
 create dataverse test;

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/857dc139/asterix-app/src/test/resources/runtimets/queries/aggregate-sql/count_null/count_null.2.update.aql
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/runtimets/queries/aggregate-sql/count_null/count_null.2.update.aql b/asterix-app/src/test/resources/runtimets/queries/aggregate-sql/count_null/count_null.2.update.aql
index e69de29..042f3ce 100644
--- a/asterix-app/src/test/resources/runtimets/queries/aggregate-sql/count_null/count_null.2.update.aql
+++ b/asterix-app/src/test/resources/runtimets/queries/aggregate-sql/count_null/count_null.2.update.aql
@@ -0,0 +1,18 @@
+/*
+ * 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.
+ */

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/857dc139/asterix-app/src/test/resources/runtimets/queries/aggregate-sql/count_null/count_null.3.query.aql
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/runtimets/queries/aggregate-sql/count_null/count_null.3.query.aql b/asterix-app/src/test/resources/runtimets/queries/aggregate-sql/count_null/count_null.3.query.aql
index 2e15415..cb1b565 100644
--- a/asterix-app/src/test/resources/runtimets/queries/aggregate-sql/count_null/count_null.3.query.aql
+++ b/asterix-app/src/test/resources/runtimets/queries/aggregate-sql/count_null/count_null.3.query.aql
@@ -1,3 +1,21 @@
+/*
+ * 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.
+ */
 use dataverse test;
 
 let $c := sql-count( 

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/857dc139/asterix-app/src/test/resources/runtimets/queries/aggregate-sql/issue395/issue395.1.ddl.aql
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/runtimets/queries/aggregate-sql/issue395/issue395.1.ddl.aql b/asterix-app/src/test/resources/runtimets/queries/aggregate-sql/issue395/issue395.1.ddl.aql
index 986d6b9..66b3832 100644
--- a/asterix-app/src/test/resources/runtimets/queries/aggregate-sql/issue395/issue395.1.ddl.aql
+++ b/asterix-app/src/test/resources/runtimets/queries/aggregate-sql/issue395/issue395.1.ddl.aql
@@ -1,3 +1,21 @@
+/*
+ * 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.
+ */
 drop dataverse test if exists;
 create dataverse test;
 use dataverse test;

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/857dc139/asterix-app/src/test/resources/runtimets/queries/aggregate-sql/issue395/issue395.2.update.aql
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/runtimets/queries/aggregate-sql/issue395/issue395.2.update.aql b/asterix-app/src/test/resources/runtimets/queries/aggregate-sql/issue395/issue395.2.update.aql
index d92b582..840bafc 100644
--- a/asterix-app/src/test/resources/runtimets/queries/aggregate-sql/issue395/issue395.2.update.aql
+++ b/asterix-app/src/test/resources/runtimets/queries/aggregate-sql/issue395/issue395.2.update.aql
@@ -1,3 +1,21 @@
+/*
+ * 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.
+ */
 use dataverse test;
 
 insert into dataset Employee({"id":12,"name":"John Doe"});

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/857dc139/asterix-app/src/test/resources/runtimets/queries/aggregate-sql/issue395/issue395.3.query.aql
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/runtimets/queries/aggregate-sql/issue395/issue395.3.query.aql b/asterix-app/src/test/resources/runtimets/queries/aggregate-sql/issue395/issue395.3.query.aql
index 809f0e2..d638e5f 100644
--- a/asterix-app/src/test/resources/runtimets/queries/aggregate-sql/issue395/issue395.3.query.aql
+++ b/asterix-app/src/test/resources/runtimets/queries/aggregate-sql/issue395/issue395.3.query.aql
@@ -1,3 +1,21 @@
+/*
+ * 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.
+ */
 use dataverse test;
 
 sql-count(for $l in dataset Employee

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/857dc139/asterix-app/src/test/resources/runtimets/queries/aggregate-sql/issue412_0/issue412_0.1.ddl.aql
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/runtimets/queries/aggregate-sql/issue412_0/issue412_0.1.ddl.aql b/asterix-app/src/test/resources/runtimets/queries/aggregate-sql/issue412_0/issue412_0.1.ddl.aql
index e69de29..042f3ce 100644
--- a/asterix-app/src/test/resources/runtimets/queries/aggregate-sql/issue412_0/issue412_0.1.ddl.aql
+++ b/asterix-app/src/test/resources/runtimets/queries/aggregate-sql/issue412_0/issue412_0.1.ddl.aql
@@ -0,0 +1,18 @@
+/*
+ * 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.
+ */

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/857dc139/asterix-app/src/test/resources/runtimets/queries/aggregate-sql/issue412_0/issue412_0.2.update.aql
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/runtimets/queries/aggregate-sql/issue412_0/issue412_0.2.update.aql b/asterix-app/src/test/resources/runtimets/queries/aggregate-sql/issue412_0/issue412_0.2.update.aql
index e69de29..042f3ce 100644
--- a/asterix-app/src/test/resources/runtimets/queries/aggregate-sql/issue412_0/issue412_0.2.update.aql
+++ b/asterix-app/src/test/resources/runtimets/queries/aggregate-sql/issue412_0/issue412_0.2.update.aql
@@ -0,0 +1,18 @@
+/*
+ * 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.
+ */

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/857dc139/asterix-app/src/test/resources/runtimets/queries/aggregate-sql/issue412_0/issue412_0.3.query.aql
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/runtimets/queries/aggregate-sql/issue412_0/issue412_0.3.query.aql b/asterix-app/src/test/resources/runtimets/queries/aggregate-sql/issue412_0/issue412_0.3.query.aql
index 0bced9f..56454f6 100644
--- a/asterix-app/src/test/resources/runtimets/queries/aggregate-sql/issue412_0/issue412_0.3.query.aql
+++ b/asterix-app/src/test/resources/runtimets/queries/aggregate-sql/issue412_0/issue412_0.3.query.aql
@@ -1,2 +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.
+ */
 let $l := ["ASTERIX", "Hyracks", null]
 return sql-count($l)

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/857dc139/asterix-app/src/test/resources/runtimets/queries/aggregate-sql/issue412_1/issue412_1.1.ddl.aql
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/runtimets/queries/aggregate-sql/issue412_1/issue412_1.1.ddl.aql b/asterix-app/src/test/resources/runtimets/queries/aggregate-sql/issue412_1/issue412_1.1.ddl.aql
index e69de29..042f3ce 100644
--- a/asterix-app/src/test/resources/runtimets/queries/aggregate-sql/issue412_1/issue412_1.1.ddl.aql
+++ b/asterix-app/src/test/resources/runtimets/queries/aggregate-sql/issue412_1/issue412_1.1.ddl.aql
@@ -0,0 +1,18 @@
+/*
+ * 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.
+ */

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/857dc139/asterix-app/src/test/resources/runtimets/queries/aggregate-sql/issue412_1/issue412_1.2.update.aql
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/runtimets/queries/aggregate-sql/issue412_1/issue412_1.2.update.aql b/asterix-app/src/test/resources/runtimets/queries/aggregate-sql/issue412_1/issue412_1.2.update.aql
index e69de29..042f3ce 100644
--- a/asterix-app/src/test/resources/runtimets/queries/aggregate-sql/issue412_1/issue412_1.2.update.aql
+++ b/asterix-app/src/test/resources/runtimets/queries/aggregate-sql/issue412_1/issue412_1.2.update.aql
@@ -0,0 +1,18 @@
+/*
+ * 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.
+ */