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:57 UTC

[27/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/optimizerts/queries/query-issue810.aql
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/optimizerts/queries/query-issue810.aql b/asterix-app/src/test/resources/optimizerts/queries/query-issue810.aql
index 097a48b..e023d43 100644
--- a/asterix-app/src/test/resources/optimizerts/queries/query-issue810.aql
+++ b/asterix-app/src/test/resources/optimizerts/queries/query-issue810.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     : This test case is to verify the fix for issue810
  * https://code.google.com/p/asterixdb/issues/detail?id=810
  * Expected Result : Success
@@ -46,4 +64,4 @@ return {
   "l_linestatus": $l_linestatus,
   "count_cheaps": count($cheap),
   "count_expensives": count($expensive)
-}
\ No newline at end of file
+}

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/857dc139/asterix-app/src/test/resources/optimizerts/queries/query-issue827-2.aql
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/optimizerts/queries/query-issue827-2.aql b/asterix-app/src/test/resources/optimizerts/queries/query-issue827-2.aql
index 270383d..2c8451c 100644
--- a/asterix-app/src/test/resources/optimizerts/queries/query-issue827-2.aql
+++ b/asterix-app/src/test/resources/optimizerts/queries/query-issue827-2.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  : This test case is to verify the fix for issue827
  * https://code.google.com/p/asterixdb/issues/detail?id=827
  * Expected Res : SUCCESS

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/857dc139/asterix-app/src/test/resources/optimizerts/queries/query_issue849-2.aql
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/optimizerts/queries/query_issue849-2.aql b/asterix-app/src/test/resources/optimizerts/queries/query_issue849-2.aql
index 929c5f1..18acdf0 100644
--- a/asterix-app/src/test/resources/optimizerts/queries/query_issue849-2.aql
+++ b/asterix-app/src/test/resources/optimizerts/queries/query_issue849-2.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  : This test case is to verify the fix for issue827
  * https://code.google.com/p/asterixdb/issues/detail?id=849
  * Expected Res : SUCCESS
@@ -21,4 +39,4 @@ for $y in (
  for $z in {{ {"a":1, "c":1},{"a":2, "c":2},{"a":1, "c":null} }} where $x.b=$z.a
     return $z.c
 )
-return {"x":$x,"y":$y}
\ No newline at end of file
+return {"x":$x,"y":$y}

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/857dc139/asterix-app/src/test/resources/optimizerts/queries/query_issue849.aql
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/optimizerts/queries/query_issue849.aql b/asterix-app/src/test/resources/optimizerts/queries/query_issue849.aql
index 5e45938..3e2bea3 100644
--- a/asterix-app/src/test/resources/optimizerts/queries/query_issue849.aql
+++ b/asterix-app/src/test/resources/optimizerts/queries/query_issue849.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  : This test case is to verify the fix for issue827
  * https://code.google.com/p/asterixdb/issues/detail?id=849
  * Expected Res : SUCCESS
@@ -21,4 +39,4 @@ for $y in (
  for $z in dataset s where $x.a=$z.b
     return $z.b
 )
-return {"x":$x,"y":$y}
\ No newline at end of file
+return {"x":$x,"y":$y}

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/857dc139/asterix-app/src/test/resources/optimizerts/queries/range-connector/sort-hint-on-closed-numeric-desc.aql
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/optimizerts/queries/range-connector/sort-hint-on-closed-numeric-desc.aql b/asterix-app/src/test/resources/optimizerts/queries/range-connector/sort-hint-on-closed-numeric-desc.aql
index 1d13a10..4d2807c 100644
--- a/asterix-app/src/test/resources/optimizerts/queries/range-connector/sort-hint-on-closed-numeric-desc.aql
+++ b/asterix-app/src/test/resources/optimizerts/queries/range-connector/sort-hint-on-closed-numeric-desc.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     : The hint is to use the range connector
  *                  : This test is intended to verify that the range connector is used instead of single node merge.
  *  Expected Result : Success
@@ -24,4 +42,4 @@ primary key screen-name;
 for $user in dataset TwitterUsers
 /*+ range [400, 150, 100] */
 order by $user.friends_count desc
-return $user;
\ No newline at end of file
+return $user;

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/857dc139/asterix-app/src/test/resources/optimizerts/queries/range-connector/sort-hint-on-closed-numeric.aql
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/optimizerts/queries/range-connector/sort-hint-on-closed-numeric.aql b/asterix-app/src/test/resources/optimizerts/queries/range-connector/sort-hint-on-closed-numeric.aql
index 1bf07ab..5916bcc 100644
--- a/asterix-app/src/test/resources/optimizerts/queries/range-connector/sort-hint-on-closed-numeric.aql
+++ b/asterix-app/src/test/resources/optimizerts/queries/range-connector/sort-hint-on-closed-numeric.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     : The hint is to use the range connector
  *                  : This test is intended to verify that the range connector is used instead of single node merge.
  *  Expected Result : Success

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/857dc139/asterix-app/src/test/resources/optimizerts/queries/range-connector/sort-hint-on-closed-string-desc.aql
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/optimizerts/queries/range-connector/sort-hint-on-closed-string-desc.aql b/asterix-app/src/test/resources/optimizerts/queries/range-connector/sort-hint-on-closed-string-desc.aql
index 7d61041..f9b7a34 100644
--- a/asterix-app/src/test/resources/optimizerts/queries/range-connector/sort-hint-on-closed-string-desc.aql
+++ b/asterix-app/src/test/resources/optimizerts/queries/range-connector/sort-hint-on-closed-string-desc.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     : The hint is to use the range connector
  *                  : This test is intended to verify that the range connector is used instead of single node merge.
  *  Expected Result : Success

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/857dc139/asterix-app/src/test/resources/optimizerts/queries/range-connector/sort-hint-on-closed-string.aql
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/optimizerts/queries/range-connector/sort-hint-on-closed-string.aql b/asterix-app/src/test/resources/optimizerts/queries/range-connector/sort-hint-on-closed-string.aql
index 71de562..852939d 100644
--- a/asterix-app/src/test/resources/optimizerts/queries/range-connector/sort-hint-on-closed-string.aql
+++ b/asterix-app/src/test/resources/optimizerts/queries/range-connector/sort-hint-on-closed-string.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     : The hint is to use the range connector
  *                  : This test is intended to verify that the range connector is used instead of single node merge.
  *  Expected Result : Success

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/857dc139/asterix-app/src/test/resources/optimizerts/queries/record_access.aql
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/optimizerts/queries/record_access.aql b/asterix-app/src/test/resources/optimizerts/queries/record_access.aql
index f69f28c..28f4d4c 100644
--- a/asterix-app/src/test/resources/optimizerts/queries/record_access.aql
+++ b/asterix-app/src/test/resources/optimizerts/queries/record_access.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/optimizerts/queries/rtree-index-join/issue730.aql
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/optimizerts/queries/rtree-index-join/issue730.aql b/asterix-app/src/test/resources/optimizerts/queries/rtree-index-join/issue730.aql
index e67d702..8bf6dbb 100644
--- a/asterix-app/src/test/resources/optimizerts/queries/rtree-index-join/issue730.aql
+++ b/asterix-app/src/test/resources/optimizerts/queries/rtree-index-join/issue730.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  : Test that left-outer-join may use an available rtree index in index subtree.
  * Issue        : 730              
  * Expected Res : Success
@@ -41,4 +59,4 @@ return {
 "nearby-message": for $t2 in dataset('TweetMessages')
                              where spatial-intersect($t2.sender_location, $n)
                              return $t2.tweetid
-}
\ No newline at end of file
+}

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/857dc139/asterix-app/src/test/resources/optimizerts/queries/rtree-index-join/leftouterjoin-probe-pidx-with-join-rtree-sidx_01.aql
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/optimizerts/queries/rtree-index-join/leftouterjoin-probe-pidx-with-join-rtree-sidx_01.aql b/asterix-app/src/test/resources/optimizerts/queries/rtree-index-join/leftouterjoin-probe-pidx-with-join-rtree-sidx_01.aql
index 9b72850..aa4ffc2 100644
--- a/asterix-app/src/test/resources/optimizerts/queries/rtree-index-join/leftouterjoin-probe-pidx-with-join-rtree-sidx_01.aql
+++ b/asterix-app/src/test/resources/optimizerts/queries/rtree-index-join/leftouterjoin-probe-pidx-with-join-rtree-sidx_01.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  : Test that left-outer-join may use two available indexes, one for primary index in prob subtree and another for secondary rtree index in index subtree.
  * Issue        : 730, 741                 
  * Expected Res : Success
@@ -50,4 +68,4 @@ return {
                              where spatial-intersect($t2.sender-location, $n) 
                              order by $t2.tweetid 
                              return {"tweetid2":$t2.tweetid, "loc2":$t2.sender-location}
-};
\ No newline at end of file
+};

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/857dc139/asterix-app/src/test/resources/optimizerts/queries/rtree-index-join/leftouterjoin-probe-pidx-with-join-rtree-sidx_02.aql
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/optimizerts/queries/rtree-index-join/leftouterjoin-probe-pidx-with-join-rtree-sidx_02.aql b/asterix-app/src/test/resources/optimizerts/queries/rtree-index-join/leftouterjoin-probe-pidx-with-join-rtree-sidx_02.aql
index d71faad..7655490 100644
--- a/asterix-app/src/test/resources/optimizerts/queries/rtree-index-join/leftouterjoin-probe-pidx-with-join-rtree-sidx_02.aql
+++ b/asterix-app/src/test/resources/optimizerts/queries/rtree-index-join/leftouterjoin-probe-pidx-with-join-rtree-sidx_02.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  : Test that left-outer-join may use two available indexes, one for primary index in prob subtree and another for secondary rtree index in index subtree.
  * Issue        : 730, 741                 
  * Expected Res : Success
@@ -50,4 +68,4 @@ return {
                              where spatial-intersect($t2.sender-location, $n) and $t1.tweetid != $t2.tweetid 
                              order by $t2.tweetid 
                              return {"tweetid2":$t2.tweetid, "loc2":$t2.sender-location}
-};
\ No newline at end of file
+};

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/857dc139/asterix-app/src/test/resources/optimizerts/queries/rtree-index-join/query-issue838.aql
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/optimizerts/queries/rtree-index-join/query-issue838.aql b/asterix-app/src/test/resources/optimizerts/queries/rtree-index-join/query-issue838.aql
index 24e4adf..c07a58c 100644
--- a/asterix-app/src/test/resources/optimizerts/queries/rtree-index-join/query-issue838.aql
+++ b/asterix-app/src/test/resources/optimizerts/queries/rtree-index-join/query-issue838.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  : This test case is to verify the fix for issue838
  * https://code.google.com/p/asterixdb/issues/detail?id=838
  * Expected Res : SUCCESS
@@ -42,4 +60,4 @@ return {
     "changeSet":1,
     "execution-time":current-datetime(),
     "message-text":$text
-}
\ No newline at end of file
+}

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/857dc139/asterix-app/src/test/resources/optimizerts/queries/rtree-index-join/spatial-intersect-point_01.aql
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/optimizerts/queries/rtree-index-join/spatial-intersect-point_01.aql b/asterix-app/src/test/resources/optimizerts/queries/rtree-index-join/spatial-intersect-point_01.aql
index e95be99..a6cafb2 100644
--- a/asterix-app/src/test/resources/optimizerts/queries/rtree-index-join/spatial-intersect-point_01.aql
+++ b/asterix-app/src/test/resources/optimizerts/queries/rtree-index-join/spatial-intersect-point_01.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    : Joins two datasets on the intersection of their point attributes.
  *                  The dataset 'MyData1' has an RTree index, and we expect the 
  *                  join to be transformed into an indexed nested-loop join.

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/857dc139/asterix-app/src/test/resources/optimizerts/queries/rtree-index-join/spatial-intersect-point_02.aql
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/optimizerts/queries/rtree-index-join/spatial-intersect-point_02.aql b/asterix-app/src/test/resources/optimizerts/queries/rtree-index-join/spatial-intersect-point_02.aql
index c0a8634..216ac93 100644
--- a/asterix-app/src/test/resources/optimizerts/queries/rtree-index-join/spatial-intersect-point_02.aql
+++ b/asterix-app/src/test/resources/optimizerts/queries/rtree-index-join/spatial-intersect-point_02.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    : Joins two datasets on the intersection of their point attributes.
  *                  The dataset 'MyData2' has an RTree index, and we expect the 
  *                  join to be transformed into an indexed nested-loop join.

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/857dc139/asterix-app/src/test/resources/optimizerts/queries/rtree-index-join/spatial-intersect-point_03.aql
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/optimizerts/queries/rtree-index-join/spatial-intersect-point_03.aql b/asterix-app/src/test/resources/optimizerts/queries/rtree-index-join/spatial-intersect-point_03.aql
index 6fb79f3..a399038 100644
--- a/asterix-app/src/test/resources/optimizerts/queries/rtree-index-join/spatial-intersect-point_03.aql
+++ b/asterix-app/src/test/resources/optimizerts/queries/rtree-index-join/spatial-intersect-point_03.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    : Self-joins a dataset on the intersection of its point attribute.
  *                  The dataset has an RTree index, and we expect the 
  *                  join to be transformed into an indexed nested-loop join.

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/857dc139/asterix-app/src/test/resources/optimizerts/queries/rtree-secondary-index-open.aql
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/optimizerts/queries/rtree-secondary-index-open.aql b/asterix-app/src/test/resources/optimizerts/queries/rtree-secondary-index-open.aql
index 1d3a4bd..ef17ced 100644
--- a/asterix-app/src/test/resources/optimizerts/queries/rtree-secondary-index-open.aql
+++ b/asterix-app/src/test/resources/optimizerts/queries/rtree-secondary-index-open.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/optimizerts/queries/rtree-secondary-index.aql
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/optimizerts/queries/rtree-secondary-index.aql b/asterix-app/src/test/resources/optimizerts/queries/rtree-secondary-index.aql
index 93846bc..a75f187 100644
--- a/asterix-app/src/test/resources/optimizerts/queries/rtree-secondary-index.aql
+++ b/asterix-app/src/test/resources/optimizerts/queries/rtree-secondary-index.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/optimizerts/queries/scan-delete-all.aql
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/optimizerts/queries/scan-delete-all.aql b/asterix-app/src/test/resources/optimizerts/queries/scan-delete-all.aql
index 7b8215f..aae52e2 100644
--- a/asterix-app/src/test/resources/optimizerts/queries/scan-delete-all.aql
+++ b/asterix-app/src/test/resources/optimizerts/queries/scan-delete-all.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 tpch if exists;
 create dataverse tpch;
 use dataverse tpch;

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/857dc139/asterix-app/src/test/resources/optimizerts/queries/scan-delete-rtree-secondary-index.aql
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/optimizerts/queries/scan-delete-rtree-secondary-index.aql b/asterix-app/src/test/resources/optimizerts/queries/scan-delete-rtree-secondary-index.aql
index 7ab2cd8..73b0cd2 100644
--- a/asterix-app/src/test/resources/optimizerts/queries/scan-delete-rtree-secondary-index.aql
+++ b/asterix-app/src/test/resources/optimizerts/queries/scan-delete-rtree-secondary-index.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/optimizerts/queries/scan-delete.aql
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/optimizerts/queries/scan-delete.aql b/asterix-app/src/test/resources/optimizerts/queries/scan-delete.aql
index 57e1bd3..0369c7f 100644
--- a/asterix-app/src/test/resources/optimizerts/queries/scan-delete.aql
+++ b/asterix-app/src/test/resources/optimizerts/queries/scan-delete.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 tpch if exists;
 create dataverse tpch;
 use dataverse tpch;

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/857dc139/asterix-app/src/test/resources/optimizerts/queries/scan-insert-secondary-index.aql
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/optimizerts/queries/scan-insert-secondary-index.aql b/asterix-app/src/test/resources/optimizerts/queries/scan-insert-secondary-index.aql
index 97bc8df..840081b 100644
--- a/asterix-app/src/test/resources/optimizerts/queries/scan-insert-secondary-index.aql
+++ b/asterix-app/src/test/resources/optimizerts/queries/scan-insert-secondary-index.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 tpch if exists;
 create dataverse tpch;
 use dataverse tpch;
@@ -46,4 +64,4 @@ for $l in dataset('LineItems_q1')
 		"l_partkey": $l.l_partkey,
 		"l_suppkey": $l.l_partkey
 	}
-);
\ No newline at end of file
+);

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/857dc139/asterix-app/src/test/resources/optimizerts/queries/scan-insert.aql
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/optimizerts/queries/scan-insert.aql b/asterix-app/src/test/resources/optimizerts/queries/scan-insert.aql
index 1c26a46..4902bc6 100644
--- a/asterix-app/src/test/resources/optimizerts/queries/scan-insert.aql
+++ b/asterix-app/src/test/resources/optimizerts/queries/scan-insert.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 tpch if exists;
 create dataverse tpch;
 use dataverse tpch;
@@ -43,4 +61,4 @@ for $l in dataset('LineItems_q1')
 		"l_partkey": $l.l_partkey,
 		"l_suppkey": $l.l_partkey
 	}
-);
\ No newline at end of file
+);

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/857dc139/asterix-app/src/test/resources/optimizerts/queries/similarity/edit-distance-let-to-edit-distance-check_01.aql
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/optimizerts/queries/similarity/edit-distance-let-to-edit-distance-check_01.aql b/asterix-app/src/test/resources/optimizerts/queries/similarity/edit-distance-let-to-edit-distance-check_01.aql
index 4d63c15..3ec9472 100644
--- a/asterix-app/src/test/resources/optimizerts/queries/similarity/edit-distance-let-to-edit-distance-check_01.aql
+++ b/asterix-app/src/test/resources/optimizerts/queries/similarity/edit-distance-let-to-edit-distance-check_01.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 the SimilarityCheckRule rewrites the edit-distance function with a threshold 
  *                  into edit-distance-check if possible.
  *                  Tests that the optimizer drills through the let clause.
@@ -25,4 +43,4 @@ write output to nc1:"rttest/similarity_edit-distance-let-to-edit-distance-check_
 for $o in dataset('DBLP')
 let $ed := edit-distance($o.authors, "Michael J. Carey")
 where $ed <= 2
-return $ed
\ No newline at end of file
+return $ed

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/857dc139/asterix-app/src/test/resources/optimizerts/queries/similarity/edit-distance-let-to-edit-distance-check_02.aql
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/optimizerts/queries/similarity/edit-distance-let-to-edit-distance-check_02.aql b/asterix-app/src/test/resources/optimizerts/queries/similarity/edit-distance-let-to-edit-distance-check_02.aql
index 762b41c..1da3606 100644
--- a/asterix-app/src/test/resources/optimizerts/queries/similarity/edit-distance-let-to-edit-distance-check_02.aql
+++ b/asterix-app/src/test/resources/optimizerts/queries/similarity/edit-distance-let-to-edit-distance-check_02.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 the SimilarityCheckRule rewrites the edit-distance function with a threshold 
  *                  into edit-distance-check if possible.
  *                  Tests that the optimizer drills through the let clause. 
@@ -25,4 +43,4 @@ write output to nc1:"rttest/similarity_edit-distance-let-to-edit-distance-check_
 for $o in dataset('DBLP')
 let $ed := edit-distance($o.authors, "Michael J. Carey")
 where 2 >= $ed
-return $ed
\ No newline at end of file
+return $ed

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/857dc139/asterix-app/src/test/resources/optimizerts/queries/similarity/edit-distance-let-to-edit-distance-check_03.aql
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/optimizerts/queries/similarity/edit-distance-let-to-edit-distance-check_03.aql b/asterix-app/src/test/resources/optimizerts/queries/similarity/edit-distance-let-to-edit-distance-check_03.aql
index e14f329..572b505 100644
--- a/asterix-app/src/test/resources/optimizerts/queries/similarity/edit-distance-let-to-edit-distance-check_03.aql
+++ b/asterix-app/src/test/resources/optimizerts/queries/similarity/edit-distance-let-to-edit-distance-check_03.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 the SimilarityCheckRule rewrites the edit-distance function with a threshold 
  *                  into edit-distance-check if possible.
  *                  Tests that the optimizer drills through the let clause.
@@ -25,4 +43,4 @@ write output to nc1:"rttest/similarity_edit-distance-let-to-edit-distance-check_
 for $o in dataset('DBLP')
 let $ed := edit-distance($o.authors, "Michael J. Carey")
 where $ed < 3
-return $ed
\ No newline at end of file
+return $ed

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/857dc139/asterix-app/src/test/resources/optimizerts/queries/similarity/edit-distance-let-to-edit-distance-check_04.aql
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/optimizerts/queries/similarity/edit-distance-let-to-edit-distance-check_04.aql b/asterix-app/src/test/resources/optimizerts/queries/similarity/edit-distance-let-to-edit-distance-check_04.aql
index f539938..a5349fd 100644
--- a/asterix-app/src/test/resources/optimizerts/queries/similarity/edit-distance-let-to-edit-distance-check_04.aql
+++ b/asterix-app/src/test/resources/optimizerts/queries/similarity/edit-distance-let-to-edit-distance-check_04.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 the SimilarityCheckRule rewrites the edit-distance function with a threshold 
  *                  into edit-distance-check if possible.
  *                  Tests that the optimizer drills through the let clause.
@@ -25,4 +43,4 @@ write output to nc1:"rttest/similarity_edit-distance-let-to-edit-distance-check_
 for $o in dataset('DBLP')
 let $ed := edit-distance($o.authors, "Michael J. Carey")
 where 3 > $ed
-return $ed
\ No newline at end of file
+return $ed

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/857dc139/asterix-app/src/test/resources/optimizerts/queries/similarity/edit-distance-let-to-edit-distance-check_05.aql
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/optimizerts/queries/similarity/edit-distance-let-to-edit-distance-check_05.aql b/asterix-app/src/test/resources/optimizerts/queries/similarity/edit-distance-let-to-edit-distance-check_05.aql
index b126f67..5f5eec7 100644
--- a/asterix-app/src/test/resources/optimizerts/queries/similarity/edit-distance-let-to-edit-distance-check_05.aql
+++ b/asterix-app/src/test/resources/optimizerts/queries/similarity/edit-distance-let-to-edit-distance-check_05.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 the SimilarityCheckRule rewrites the edit-distance function with a threshold 
  *                  into edit-distance-check if possible.
  *                  Tests that the optimizer drills through the let clause.
@@ -25,4 +43,4 @@ write output to nc1:"rttest/similarity_edit-distance-let-to-edit-distance-check_
 for $o in dataset('DBLP')
 let $ed := edit-distance($o.authors, "Michael J. Carey")
 where $ed >= 2
-return $ed
\ No newline at end of file
+return $ed

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/857dc139/asterix-app/src/test/resources/optimizerts/queries/similarity/edit-distance-let-to-edit-distance-check_06.aql
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/optimizerts/queries/similarity/edit-distance-let-to-edit-distance-check_06.aql b/asterix-app/src/test/resources/optimizerts/queries/similarity/edit-distance-let-to-edit-distance-check_06.aql
index f32285e..d869685 100644
--- a/asterix-app/src/test/resources/optimizerts/queries/similarity/edit-distance-let-to-edit-distance-check_06.aql
+++ b/asterix-app/src/test/resources/optimizerts/queries/similarity/edit-distance-let-to-edit-distance-check_06.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 the SimilarityCheckRule rewrites the edit-distance function with a threshold 
  *                  into edit-distance-check if possible.
  *                  Tests that the optimizer drills through the let clause.
@@ -25,4 +43,4 @@ write output to nc1:"rttest/similarity_edit-distance-let-to-edit-distance-check_
 for $o in dataset('DBLP')
 let $ed := edit-distance($o.authors, "Michael J. Carey")
 where 2 <= $ed
-return $ed
\ No newline at end of file
+return $ed

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/857dc139/asterix-app/src/test/resources/optimizerts/queries/similarity/edit-distance-let-to-edit-distance-check_07.aql
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/optimizerts/queries/similarity/edit-distance-let-to-edit-distance-check_07.aql b/asterix-app/src/test/resources/optimizerts/queries/similarity/edit-distance-let-to-edit-distance-check_07.aql
index 2dff7e5..c96c39a 100644
--- a/asterix-app/src/test/resources/optimizerts/queries/similarity/edit-distance-let-to-edit-distance-check_07.aql
+++ b/asterix-app/src/test/resources/optimizerts/queries/similarity/edit-distance-let-to-edit-distance-check_07.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 the SimilarityCheckRule rewrites the edit-distance function with a threshold 
  *                  into edit-distance-check if possible.
  *                  Tests that the optimizer drills through the let clause.
@@ -25,4 +43,4 @@ write output to nc1:"rttest/similarity_edit-distance-let-to-edit-distance-check_
 for $o in dataset('DBLP')
 let $ed := edit-distance($o.authors, "Michael J. Carey")
 where $ed > 2
-return $ed
\ No newline at end of file
+return $ed

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/857dc139/asterix-app/src/test/resources/optimizerts/queries/similarity/edit-distance-let-to-edit-distance-check_08.aql
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/optimizerts/queries/similarity/edit-distance-let-to-edit-distance-check_08.aql b/asterix-app/src/test/resources/optimizerts/queries/similarity/edit-distance-let-to-edit-distance-check_08.aql
index 9bc10e6..8bfa7d8 100644
--- a/asterix-app/src/test/resources/optimizerts/queries/similarity/edit-distance-let-to-edit-distance-check_08.aql
+++ b/asterix-app/src/test/resources/optimizerts/queries/similarity/edit-distance-let-to-edit-distance-check_08.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 the SimilarityCheckRule rewrites the edit-distance function with a threshold 
  *                  into edit-distance-check if possible.
  *                  Tests that the optimizer drills through the let clause.
@@ -25,4 +43,4 @@ write output to nc1:"rttest/similarity_edit-distance-let-to-edit-distance-check_
 for $o in dataset('DBLP')
 let $ed := edit-distance($o.authors, "Michael J. Carey")
 where 2 < $ed
-return $ed
\ No newline at end of file
+return $ed

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/857dc139/asterix-app/src/test/resources/optimizerts/queries/similarity/edit-distance-to-edit-distance-check_01.aql
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/optimizerts/queries/similarity/edit-distance-to-edit-distance-check_01.aql b/asterix-app/src/test/resources/optimizerts/queries/similarity/edit-distance-to-edit-distance-check_01.aql
index 09e962c..0fc611e 100644
--- a/asterix-app/src/test/resources/optimizerts/queries/similarity/edit-distance-to-edit-distance-check_01.aql
+++ b/asterix-app/src/test/resources/optimizerts/queries/similarity/edit-distance-to-edit-distance-check_01.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 the SimilarityCheckRule rewrites the edit-distance function with a threshold 
  *                  into edit-distance-check if possible.
  *                  Replacement should happen because of a "<=" condition on the edit distance.

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/857dc139/asterix-app/src/test/resources/optimizerts/queries/similarity/edit-distance-to-edit-distance-check_02.aql
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/optimizerts/queries/similarity/edit-distance-to-edit-distance-check_02.aql b/asterix-app/src/test/resources/optimizerts/queries/similarity/edit-distance-to-edit-distance-check_02.aql
index 35e28fc..99cb91f 100644
--- a/asterix-app/src/test/resources/optimizerts/queries/similarity/edit-distance-to-edit-distance-check_02.aql
+++ b/asterix-app/src/test/resources/optimizerts/queries/similarity/edit-distance-to-edit-distance-check_02.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 the SimilarityCheckRule rewrites the edit-distance function with a threshold 
  *                  into edit-distance-check if possible.
  *                  Replacement should happen because of a reverse "<=" condition on the edit distance.
@@ -23,4 +41,4 @@ write output to nc1:"rttest/similarity_edit-distance-to-edit-distance-check_02.a
 
 for $o in dataset('DBLP')
 where 2 >= edit-distance($o.authors, "Michael J. Carey")
-return $o
\ No newline at end of file
+return $o

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/857dc139/asterix-app/src/test/resources/optimizerts/queries/similarity/edit-distance-to-edit-distance-check_03.aql
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/optimizerts/queries/similarity/edit-distance-to-edit-distance-check_03.aql b/asterix-app/src/test/resources/optimizerts/queries/similarity/edit-distance-to-edit-distance-check_03.aql
index e05f85a..98c20a2 100644
--- a/asterix-app/src/test/resources/optimizerts/queries/similarity/edit-distance-to-edit-distance-check_03.aql
+++ b/asterix-app/src/test/resources/optimizerts/queries/similarity/edit-distance-to-edit-distance-check_03.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 the SimilarityCheckRule rewrites the edit-distance function with a threshold 
  *                  into edit-distance-check if possible.
  *                  Replacement should happen because of a "<" condition on the edit distance.
@@ -23,4 +41,4 @@ write output to nc1:"rttest/similarity_edit-distance-to-edit-distance-check_03.a
 
 for $o in dataset('DBLP')
 where edit-distance($o.authors, "Michael J. Carey") < 3
-return $o
\ No newline at end of file
+return $o

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/857dc139/asterix-app/src/test/resources/optimizerts/queries/similarity/edit-distance-to-edit-distance-check_04.aql
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/optimizerts/queries/similarity/edit-distance-to-edit-distance-check_04.aql b/asterix-app/src/test/resources/optimizerts/queries/similarity/edit-distance-to-edit-distance-check_04.aql
index b890967..cd2b761 100644
--- a/asterix-app/src/test/resources/optimizerts/queries/similarity/edit-distance-to-edit-distance-check_04.aql
+++ b/asterix-app/src/test/resources/optimizerts/queries/similarity/edit-distance-to-edit-distance-check_04.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 the SimilarityCheckRule rewrites the edit-distance function with a threshold 
  *                  into edit-distance-check if possible.
  *                  Replacement should happen because of a reverse "<" condition on the edit distance.
@@ -23,4 +41,4 @@ write output to nc1:"rttest/similarity_edit-distance-to-edit-distance-check_04.a
 
 for $o in dataset('DBLP')
 where 3 > edit-distance($o.authors, "Michael J. Carey")
-return $o
\ No newline at end of file
+return $o

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/857dc139/asterix-app/src/test/resources/optimizerts/queries/similarity/edit-distance-to-edit-distance-check_05.aql
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/optimizerts/queries/similarity/edit-distance-to-edit-distance-check_05.aql b/asterix-app/src/test/resources/optimizerts/queries/similarity/edit-distance-to-edit-distance-check_05.aql
index bc66061..a266010 100644
--- a/asterix-app/src/test/resources/optimizerts/queries/similarity/edit-distance-to-edit-distance-check_05.aql
+++ b/asterix-app/src/test/resources/optimizerts/queries/similarity/edit-distance-to-edit-distance-check_05.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 the SimilarityCheckRule rewrites the edit-distance function with a threshold 
  *                  into edit-distance-check if possible.
  *                  Replacement should *not* happen because of a ">=" condition on the edit distance.
@@ -24,4 +42,4 @@ write output to nc1:"rttest/similarity_edit-distance-to-edit-distance-check_05.a
 // We cannot introduce edit-distance-check because the condition is >=
 for $o in dataset('DBLP')
 where edit-distance($o.authors, "Michael J. Carey") >= 2
-return $o
\ No newline at end of file
+return $o

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/857dc139/asterix-app/src/test/resources/optimizerts/queries/similarity/edit-distance-to-edit-distance-check_06.aql
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/optimizerts/queries/similarity/edit-distance-to-edit-distance-check_06.aql b/asterix-app/src/test/resources/optimizerts/queries/similarity/edit-distance-to-edit-distance-check_06.aql
index 018d6d1..d5bf4ac 100644
--- a/asterix-app/src/test/resources/optimizerts/queries/similarity/edit-distance-to-edit-distance-check_06.aql
+++ b/asterix-app/src/test/resources/optimizerts/queries/similarity/edit-distance-to-edit-distance-check_06.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 the SimilarityCheckRule rewrites the edit-distance function with a threshold 
  *                  into edit-distance-check if possible.
  *                  Replacement should *not* happen because of a reverse ">=" condition on the edit distance.
@@ -24,4 +42,4 @@ write output to nc1:"rttest/similarity_edit-distance-to-edit-distance-check_06.a
 // We cannot introduce edit-distance-check because the condition is <=
 for $o in dataset('DBLP')
 where 2 <= edit-distance($o.authors, "Michael J. Carey")
-return $o
\ No newline at end of file
+return $o

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/857dc139/asterix-app/src/test/resources/optimizerts/queries/similarity/edit-distance-to-edit-distance-check_07.aql
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/optimizerts/queries/similarity/edit-distance-to-edit-distance-check_07.aql b/asterix-app/src/test/resources/optimizerts/queries/similarity/edit-distance-to-edit-distance-check_07.aql
index cdaefa9..4fbfc08 100644
--- a/asterix-app/src/test/resources/optimizerts/queries/similarity/edit-distance-to-edit-distance-check_07.aql
+++ b/asterix-app/src/test/resources/optimizerts/queries/similarity/edit-distance-to-edit-distance-check_07.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 the SimilarityCheckRule rewrites the edit-distance function with a threshold 
  *                  into edit-distance-check if possible.
  *                  Replacement should *not* happen because of a ">" condition on the edit distance.
@@ -24,4 +42,4 @@ write output to nc1:"rttest/similarity_edit-distance-to-edit-distance-check_07.a
 // We cannot introduce edit-distance-check because the condition is >
 for $o in dataset('DBLP')
 where edit-distance($o.authors, "Michael J. Carey") > 2
-return $o
\ No newline at end of file
+return $o

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/857dc139/asterix-app/src/test/resources/optimizerts/queries/similarity/edit-distance-to-edit-distance-check_08.aql
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/optimizerts/queries/similarity/edit-distance-to-edit-distance-check_08.aql b/asterix-app/src/test/resources/optimizerts/queries/similarity/edit-distance-to-edit-distance-check_08.aql
index 745044f..e3d47a4 100644
--- a/asterix-app/src/test/resources/optimizerts/queries/similarity/edit-distance-to-edit-distance-check_08.aql
+++ b/asterix-app/src/test/resources/optimizerts/queries/similarity/edit-distance-to-edit-distance-check_08.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 the SimilarityCheckRule rewrites the edit-distance function with a threshold 
  *                  into edit-distance-check if possible.
  *                  Replacement should *not* happen because of a reverse ">" condition on the edit distance.
@@ -24,4 +42,4 @@ write output to nc1:"rttest/similarity_edit-distance-to-edit-distance-check_08.a
 // We cannot introduce edit-distance-check because the condition is <
 for $o in dataset('DBLP')
 where 2 < edit-distance($o.authors, "Michael J. Carey")
-return $o
\ No newline at end of file
+return $o

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/857dc139/asterix-app/src/test/resources/optimizerts/queries/similarity/fuzzyeq-to-edit-distance-check.aql
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/optimizerts/queries/similarity/fuzzyeq-to-edit-distance-check.aql b/asterix-app/src/test/resources/optimizerts/queries/similarity/fuzzyeq-to-edit-distance-check.aql
index f6e9d52..2ca045b 100644
--- a/asterix-app/src/test/resources/optimizerts/queries/similarity/fuzzyeq-to-edit-distance-check.aql
+++ b/asterix-app/src/test/resources/optimizerts/queries/similarity/fuzzyeq-to-edit-distance-check.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 the FuzzyEqRule rewrites ~= using edit distance 
  *                  into edit-distance-check.
  * Success        : Yes
@@ -26,4 +44,4 @@ set simthreshold '1';
 // Tests two rules: FuzzyEqRule and SimilarityCheckRule
 for $o in dataset('DBLP')
 where $o.authors ~= "Michael J. Carey"
-return $o
\ No newline at end of file
+return $o

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/857dc139/asterix-app/src/test/resources/optimizerts/queries/similarity/fuzzyeq-to-jaccard-check.aql
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/optimizerts/queries/similarity/fuzzyeq-to-jaccard-check.aql b/asterix-app/src/test/resources/optimizerts/queries/similarity/fuzzyeq-to-jaccard-check.aql
index 5f57a3e..9ec9eb4 100644
--- a/asterix-app/src/test/resources/optimizerts/queries/similarity/fuzzyeq-to-jaccard-check.aql
+++ b/asterix-app/src/test/resources/optimizerts/queries/similarity/fuzzyeq-to-jaccard-check.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 the FuzzyEqRule rewrites ~= using Jaccard 
  *                  into edit-distance-check.
  * Success        : Yes
@@ -26,4 +44,4 @@ set simthreshold '0.8f';
 // Tests two rules: FuzzyEqRule and SimilarityCheckRule
 for $paper in dataset('DBLP')
 where word-tokens($paper.title) ~= word-tokens("Transactions for Cooperative Environments")
-return $paper
\ No newline at end of file
+return $paper

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/857dc139/asterix-app/src/test/resources/optimizerts/queries/similarity/jaccard-let-to-jaccard-check_01.aql
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/optimizerts/queries/similarity/jaccard-let-to-jaccard-check_01.aql b/asterix-app/src/test/resources/optimizerts/queries/similarity/jaccard-let-to-jaccard-check_01.aql
index 733c6d9..bafd393 100644
--- a/asterix-app/src/test/resources/optimizerts/queries/similarity/jaccard-let-to-jaccard-check_01.aql
+++ b/asterix-app/src/test/resources/optimizerts/queries/similarity/jaccard-let-to-jaccard-check_01.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 the SimilarityCheckRule rewrites the similarity-jaccard function with a threshold 
  *                  into similarity-jaccard-check-check if possible.
  *                  Tests that the optimizer drills through the let clause.

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/857dc139/asterix-app/src/test/resources/optimizerts/queries/similarity/jaccard-let-to-jaccard-check_02.aql
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/optimizerts/queries/similarity/jaccard-let-to-jaccard-check_02.aql b/asterix-app/src/test/resources/optimizerts/queries/similarity/jaccard-let-to-jaccard-check_02.aql
index a360ef1..01439b0 100644
--- a/asterix-app/src/test/resources/optimizerts/queries/similarity/jaccard-let-to-jaccard-check_02.aql
+++ b/asterix-app/src/test/resources/optimizerts/queries/similarity/jaccard-let-to-jaccard-check_02.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 the SimilarityCheckRule rewrites the similarity-jaccard function with a threshold 
  *                  into similarity-jaccard-check-check if possible.
  *                  Tests that the optimizer drills through the let clause.

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/857dc139/asterix-app/src/test/resources/optimizerts/queries/similarity/jaccard-let-to-jaccard-check_03.aql
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/optimizerts/queries/similarity/jaccard-let-to-jaccard-check_03.aql b/asterix-app/src/test/resources/optimizerts/queries/similarity/jaccard-let-to-jaccard-check_03.aql
index ad8abca..abb7f89 100644
--- a/asterix-app/src/test/resources/optimizerts/queries/similarity/jaccard-let-to-jaccard-check_03.aql
+++ b/asterix-app/src/test/resources/optimizerts/queries/similarity/jaccard-let-to-jaccard-check_03.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 the SimilarityCheckRule rewrites the similarity-jaccard function with a threshold 
  *                  into similarity-jaccard-check-check if possible.
  *                  Tests that the optimizer drills through the let clause.

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/857dc139/asterix-app/src/test/resources/optimizerts/queries/similarity/jaccard-let-to-jaccard-check_04.aql
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/optimizerts/queries/similarity/jaccard-let-to-jaccard-check_04.aql b/asterix-app/src/test/resources/optimizerts/queries/similarity/jaccard-let-to-jaccard-check_04.aql
index fd236de..8268cb7 100644
--- a/asterix-app/src/test/resources/optimizerts/queries/similarity/jaccard-let-to-jaccard-check_04.aql
+++ b/asterix-app/src/test/resources/optimizerts/queries/similarity/jaccard-let-to-jaccard-check_04.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 the SimilarityCheckRule rewrites the similarity-jaccard function with a threshold 
  *                  into similarity-jaccard-check-check if possible.
  *                  Tests that the optimizer drills through the let clause.

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/857dc139/asterix-app/src/test/resources/optimizerts/queries/similarity/jaccard-let-to-jaccard-check_05.aql
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/optimizerts/queries/similarity/jaccard-let-to-jaccard-check_05.aql b/asterix-app/src/test/resources/optimizerts/queries/similarity/jaccard-let-to-jaccard-check_05.aql
index b750a5d..7a9f1f1 100644
--- a/asterix-app/src/test/resources/optimizerts/queries/similarity/jaccard-let-to-jaccard-check_05.aql
+++ b/asterix-app/src/test/resources/optimizerts/queries/similarity/jaccard-let-to-jaccard-check_05.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 the SimilarityCheckRule rewrites the similarity-jaccard function with a threshold 
  *                  into similarity-jaccard-check-check if possible.
  *                  Tests that the optimizer drills through the let clause.

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/857dc139/asterix-app/src/test/resources/optimizerts/queries/similarity/jaccard-let-to-jaccard-check_06.aql
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/optimizerts/queries/similarity/jaccard-let-to-jaccard-check_06.aql b/asterix-app/src/test/resources/optimizerts/queries/similarity/jaccard-let-to-jaccard-check_06.aql
index 56b1471..0a25c83 100644
--- a/asterix-app/src/test/resources/optimizerts/queries/similarity/jaccard-let-to-jaccard-check_06.aql
+++ b/asterix-app/src/test/resources/optimizerts/queries/similarity/jaccard-let-to-jaccard-check_06.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 the SimilarityCheckRule rewrites the similarity-jaccard function with a threshold 
  *                  into similarity-jaccard-check-check if possible.
  *                  Tests that the optimizer drills through the let clause.

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/857dc139/asterix-app/src/test/resources/optimizerts/queries/similarity/jaccard-let-to-jaccard-check_07.aql
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/optimizerts/queries/similarity/jaccard-let-to-jaccard-check_07.aql b/asterix-app/src/test/resources/optimizerts/queries/similarity/jaccard-let-to-jaccard-check_07.aql
index 6ae0444..83ffad0 100644
--- a/asterix-app/src/test/resources/optimizerts/queries/similarity/jaccard-let-to-jaccard-check_07.aql
+++ b/asterix-app/src/test/resources/optimizerts/queries/similarity/jaccard-let-to-jaccard-check_07.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 the SimilarityCheckRule rewrites the similarity-jaccard function with a threshold 
  *                  into similarity-jaccard-check-check if possible.
  *                  Tests that the optimizer drills through the let clause.