asterixdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From luoc...@apache.org
Subject [5/5] asterixdb git commit: [ASTERIXDB-1946][STO][IDX]Create RTree/InvertedIdx for Correlated Datasets
Date Tue, 18 Jul 2017 02:04:19 GMT
[ASTERIXDB-1946][STO][IDX]Create RTree/InvertedIdx for Correlated Datasets

- user model changes: allow creating secondary rtree and inverted index
 for datasets using correlated merge policy
- storage format changes: no
- interface changes: no

details:
- Implmeneted create secondary RTree and Inverted Index for datasets
using correlated merge policy.
- Add tests for RTree and Inverted Index creation job

Change-Id: I100fc0b86b8a6fa36a95d77806107bad0307544e
Reviewed-on: https://asterix-gerrit.ics.uci.edu/1845
Sonar-Qube: Jenkins <jenkins@fulliautomatix.ics.uci.edu>
Integration-Tests: Jenkins <jenkins@fulliautomatix.ics.uci.edu>
Tested-by: Jenkins <jenkins@fulliautomatix.ics.uci.edu>
BAD: Jenkins <jenkins@fulliautomatix.ics.uci.edu>
Reviewed-by: Yingyi Bu <buyingyi@gmail.com>


Project: http://git-wip-us.apache.org/repos/asf/asterixdb/repo
Commit: http://git-wip-us.apache.org/repos/asf/asterixdb/commit/e856e1e8
Tree: http://git-wip-us.apache.org/repos/asf/asterixdb/tree/e856e1e8
Diff: http://git-wip-us.apache.org/repos/asf/asterixdb/diff/e856e1e8

Branch: refs/heads/master
Commit: e856e1e8f583829a08ccb631cf4ba780c7e7770c
Parents: 77109ea
Author: luochen01 <cluo8@uci.edu>
Authored: Tue Jul 11 18:46:04 2017 -0700
Committer: Luo Chen <cluo8@uci.edu>
Committed: Mon Jul 17 09:02:19 2017 -0700

----------------------------------------------------------------------
 ...related-secondary-index-nullable.1.ddl.sqlpp |  52 +++
 ...ated-secondary-index-nullable.2.update.sqlpp |  30 ++
 ...related-secondary-index-nullable.3.ddl.sqlpp |  24 ++
 ...lated-secondary-index-nullable.4.query.sqlpp |  27 ++
 ...-correlated-secondary-index-open.1.ddl.sqlpp |  56 +++
 ...rrelated-secondary-index-open.2.update.sqlpp |  31 ++
 ...-correlated-secondary-index-open.3.ddl.sqlpp |  23 ++
 ...orrelated-secondary-index-open.5.query.sqlpp |  26 ++
 ...ngram-correlated-secondary-index.1.ddl.sqlpp |  51 +++
 ...am-correlated-secondary-index.2.update.sqlpp |  31 ++
 ...ngram-correlated-secondary-index.3.ddl.sqlpp |  23 ++
 ...ram-correlated-secondary-index.4.query.sqlpp |  27 ++
 ...related-secondary-index-nullable.1.ddl.sqlpp |  51 +++
 ...ated-secondary-index-nullable.2.update.sqlpp |  30 ++
 ...related-secondary-index-nullable.3.ddl.sqlpp |  24 ++
 ...lated-secondary-index-nullable.4.query.sqlpp |  27 ++
 ...-correlated-secondary-index-open.1.ddl.sqlpp |  57 ++++
 ...rrelated-secondary-index-open.2.update.sqlpp |  31 ++
 ...-correlated-secondary-index-open.3.ddl.sqlpp |  24 ++
 ...orrelated-secondary-index-open.4.query.sqlpp |  27 ++
 ...-word-correlated-secondary-index.1.ddl.sqlpp |  52 +++
 ...rd-correlated-secondary-index.2.update.sqlpp |  30 ++
 ...-word-correlated-secondary-index.3.ddl.sqlpp |  24 ++
 ...ord-correlated-secondary-index.4.query.sqlpp |  27 ++
 ...related-secondary-index-nullable.1.ddl.sqlpp |  55 +++
 ...ated-secondary-index-nullable.2.update.sqlpp |  29 ++
 ...related-secondary-index-nullable.3.ddl.sqlpp |  24 ++
 ...lated-secondary-index-nullable.4.query.sqlpp |  27 ++
 ...-correlated-secondary-index-open.1.ddl.sqlpp |  66 ++++
 ...rrelated-secondary-index-open.2.update.sqlpp |  30 ++
 ...-correlated-secondary-index-open.3.ddl.sqlpp |  24 ++
 ...orrelated-secondary-index-open.4.query.sqlpp |  27 ++
 ...rtree-correlated-secondary-index.1.ddl.sqlpp |  56 +++
 ...ee-correlated-secondary-index.2.update.sqlpp |  29 ++
 ...rtree-correlated-secondary-index.3.ddl.sqlpp |  24 ++
 ...ree-correlated-secondary-index.4.query.sqlpp |  27 ++
 ...related-secondary-index-nullable.1.ddl.sqlpp |  50 +++
 ...ated-secondary-index-nullable.2.update.sqlpp |  30 ++
 ...related-secondary-index-nullable.3.ddl.sqlpp |  26 ++
 ...lated-secondary-index-nullable.4.query.sqlpp |  27 ++
 ...-correlated-secondary-index-open.1.ddl.sqlpp |  57 ++++
 ...rrelated-secondary-index-open.2.update.sqlpp |  30 ++
 ...-correlated-secondary-index-open.3.ddl.sqlpp |  26 ++
 ...orrelated-secondary-index-open.4.query.sqlpp |  27 ++
 ...ngram-correlated-secondary-index.1.ddl.sqlpp |  48 +++
 ...am-correlated-secondary-index.2.update.sqlpp |  30 ++
 ...ngram-correlated-secondary-index.3.ddl.sqlpp |  25 ++
 ...ram-correlated-secondary-index.4.query.sqlpp |  27 ++
 ...related-secondary-index-nullable.1.ddl.sqlpp |  49 +++
 ...ated-secondary-index-nullable.2.update.sqlpp |  29 ++
 ...related-secondary-index-nullable.3.ddl.sqlpp |  26 ++
 ...lated-secondary-index-nullable.4.query.sqlpp |  27 ++
 ...-correlated-secondary-index-open.1.ddl.sqlpp |  57 ++++
 ...rrelated-secondary-index-open.2.update.sqlpp |  30 ++
 ...-correlated-secondary-index-open.3.ddl.sqlpp |  26 ++
 ...orrelated-secondary-index-open.4.query.sqlpp |  27 ++
 ...-word-correlated-secondary-index.1.ddl.sqlpp |  49 +++
 ...rd-correlated-secondary-index.2.update.sqlpp |  30 ++
 ...-word-correlated-secondary-index.3.ddl.sqlpp |  26 ++
 ...ord-correlated-secondary-index.4.query.sqlpp |  27 ++
 ...related-secondary-index-nullable.1.ddl.sqlpp |  66 ++++
 ...ated-secondary-index-nullable.2.update.sqlpp |  32 ++
 ...related-secondary-index-nullable.3.ddl.sqlpp |  25 ++
 ...lated-secondary-index-nullable.4.query.sqlpp |  27 ++
 ...-correlated-secondary-index-open.1.ddl.sqlpp |  65 ++++
 ...rrelated-secondary-index-open.2.update.sqlpp |  32 ++
 ...-correlated-secondary-index-open.3.ddl.sqlpp |  25 ++
 ...orrelated-secondary-index-open.5.query.sqlpp |  27 ++
 ...rtree-correlated-secondary-index.1.ddl.sqlpp |  67 ++++
 ...ee-correlated-secondary-index.2.update.sqlpp |  35 ++
 ...rtree-correlated-secondary-index.3.ddl.sqlpp |  26 ++
 ...ree-correlated-secondary-index.4.query.sqlpp |  27 ++
 ...related-secondary-inverted-ngram.1.ddl.sqlpp |  49 +++
 ...ated-secondary-inverted-ngram.2.update.sqlpp |  28 ++
 ...related-secondary-inverted-ngram.3.ddl.sqlpp |  24 ++
 ...lated-secondary-inverted-ngram.4.query.sqlpp |  27 ++
 ...rrelated-secondary-inverted-word.1.ddl.sqlpp |  49 +++
 ...lated-secondary-inverted-word.2.update.sqlpp |  28 ++
 ...rrelated-secondary-inverted-word.3.ddl.sqlpp |  24 ++
 ...elated-secondary-inverted-word.4.query.sqlpp |  27 ++
 ...-with-correlated-secondary-rtree.1.ddl.sqlpp |  49 +++
 ...th-correlated-secondary-rtree.2.update.sqlpp |  28 ++
 ...-with-correlated-secondary-rtree.3.ddl.sqlpp |  24 ++
 ...ith-correlated-secondary-rtree.4.query.sqlpp |  27 ++
 .../multiple-correlated-secondaries.1.ddl.sqlpp |  45 +++
 ...ltiple-correlated-secondaries.2.update.sqlpp |  27 ++
 .../multiple-correlated-secondaries.3.ddl.sqlpp |  24 ++
 ...ltiple-correlated-secondaries.4.update.sqlpp |  24 ++
 ...ultiple-correlated-secondaries.5.query.sqlpp |  24 ++
 ...ry-correlated-secondary-inverted.1.ddl.sqlpp |  39 +++
 ...correlated-secondary-inverted.2.update.sqlpp |  32 ++
 ...ry-correlated-secondary-inverted.3.ddl.sqlpp |  21 ++
 ...-correlated-secondary-inverted.4.query.sqlpp |  24 ++
 ...imary-correlated-secondary-rtree.1.ddl.sqlpp |  43 +++
 ...ry-correlated-secondary-rtree.2.update.sqlpp |  32 ++
 ...imary-correlated-secondary-rtree.3.ddl.sqlpp |  22 ++
 ...ary-correlated-secondary-rtree.4.query.sqlpp |  23 ++
 .../resources/runtimets/testsuite_sqlpp.xml     | 134 +++++++-
 .../asterix/common/exceptions/ErrorCode.java    |   1 +
 .../main/resources/asx_errormsg/en.properties   |   1 +
 ...ary_plus_correlated_ngram_index.1.script.aql |  19 ++
 ...ry_plus_correlated_ngram_index.10.script.aql |  19 ++
 ...rimary_plus_correlated_ngram_index.2.ddl.aql |  72 ++++
 ...ary_plus_correlated_ngram_index.3.update.aql |  23 ++
 ...mary_plus_correlated_ngram_index.4.txneu.aql |  37 ++
 ...rimary_plus_correlated_ngram_index.5.ddl.aql |  24 ++
 ...ary_plus_correlated_ngram_index.6.txnqbc.aql |  23 ++
 ...ary_plus_correlated_ngram_index.7.script.aql |  19 ++
 ...ary_plus_correlated_ngram_index.8.script.aql |  19 ++
 ...ary_plus_correlated_ngram_index.9.txnqar.aql |  23 ++
 ...ary_plus_correlated_rtree_index.1.script.aql |  19 ++
 ...ry_plus_correlated_rtree_index.10.script.aql |  19 ++
 ...rimary_plus_correlated_rtree_index.2.ddl.aql |  72 ++++
 ...ary_plus_correlated_rtree_index.3.update.aql |  24 ++
 ...mary_plus_correlated_rtree_index.4.txneu.aql |  38 +++
 ...rimary_plus_correlated_rtree_index.5.ddl.aql |  22 ++
 ...ary_plus_correlated_rtree_index.6.txnqbc.aql |  23 ++
 ...ary_plus_correlated_rtree_index.7.script.aql |  19 ++
 ...ary_plus_correlated_rtree_index.8.script.aql |  19 ++
 ...ary_plus_correlated_rtree_index.9.txnqar.aql |  23 ++
 ...word_correlated_secondary_index.1.script.aql |  19 ++
 ...ord_correlated_secondary_index.10.script.aql |  19 ++
 ...keyword_correlated_secondary_index.2.ddl.aql |  73 ++++
 ...word_correlated_secondary_index.3.update.aql |  24 ++
 ...yword_correlated_secondary_index.4.txneu.aql |  37 ++
 ...keyword_correlated_secondary_index.5.ddl.aql |  24 ++
 ...word_correlated_secondary_index.6.txnqbc.aql |  23 ++
 ...word_correlated_secondary_index.7.script.aql |  19 ++
 ...word_correlated_secondary_index.8.script.aql |  19 ++
 ...word_correlated_secondary_index.9.txnqar.aql |  23 ++
 ...le_correlated_secondary_indices.1.script.aql |  19 ++
 ...e_correlated_secondary_indices.10.script.aql |  19 ++
 ...tiple_correlated_secondary_indices.2.ddl.aql |  73 ++++
 ...le_correlated_secondary_indices.3.update.aql |  24 ++
 ...ple_correlated_secondary_indices.4.txneu.aql |  37 ++
 ...tiple_correlated_secondary_indices.5.ddl.aql |  27 ++
 ...le_correlated_secondary_indices.6.txnqbc.aql |  23 ++
 ...le_correlated_secondary_indices.7.script.aql |  19 ++
 ...le_correlated_secondary_indices.8.script.aql |  19 ++
 ...le_correlated_secondary_indices.9.txnqar.aql |  23 ++
 .../create_and_start.sh                         |  18 +
 .../kill_cc_and_nc.sh                           |  18 +
 .../stop_and_delete.sh                          |  20 ++
 .../stop_and_start.sh                           |  20 ++
 .../create_and_start.sh                         |  18 +
 .../kill_cc_and_nc.sh                           |  18 +
 .../stop_and_delete.sh                          |  20 ++
 .../stop_and_start.sh                           |  20 ++
 .../create_and_start.sh                         |  18 +
 .../kill_cc_and_nc.sh                           |  18 +
 .../stop_and_delete.sh                          |  20 ++
 .../stop_and_start.sh                           |  20 ++
 .../create_and_start.sh                         |  18 +
 .../kill_cc_and_nc.sh                           |  18 +
 .../stop_and_delete.sh                          |  20 ++
 .../stop_and_start.sh                           |  20 ++
 .../test/resources/transactionts/testsuite.xml  |  24 ++
 .../metadata/declared/MetadataProvider.java     |   3 +-
 ...econdaryCorrelatedBTreeOperationsHelper.java |   5 +-
 ...CorrelatedInvertedIndexOperationsHelper.java | 339 +++++++++++++++++++
 ...econdaryCorrelatedRTreeOperationsHelper.java | 258 ++++++++++++++
 ...daryCorrelatedTreeIndexOperationsHelper.java |  25 +-
 .../SecondaryInvertedIndexOperationsHelper.java |  10 +-
 ...ctLSMSecondaryIndexCreationNodePushable.java |   5 -
 .../LSMSecondaryIndexBulkLoadNodePushable.java  |  11 +-
 ...econdaryIndexBulkLoadOperatorDescriptor.java |   9 +-
 ...IndexCreationTupleProcessorNodePushable.java |   2 +
 .../BinaryTokenizerOperatorDescriptor.java      |  17 +-
 .../BinaryTokenizerOperatorNodePushable.java    | 143 ++++----
 169 files changed, 5562 insertions(+), 95 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/asterixdb/blob/e856e1e8/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/dml/scan-delete-inverted-index-ngram-correlated-secondary-index-nullable/scan-delete-inverted-index-ngram-correlated-secondary-index-nullable.1.ddl.sqlpp
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/dml/scan-delete-inverted-index-ngram-correlated-secondary-index-nullable/scan-delete-inverted-index-ngram-correlated-secondary-index-nullable.1.ddl.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/dml/scan-delete-inverted-index-ngram-correlated-secondary-index-nullable/scan-delete-inverted-index-ngram-correlated-secondary-index-nullable.1.ddl.sqlpp
new file mode 100644
index 0000000..74be0ef
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/dml/scan-delete-inverted-index-ngram-correlated-secondary-index-nullable/scan-delete-inverted-index-ngram-correlated-secondary-index-nullable.1.ddl.sqlpp
@@ -0,0 +1,52 @@
+/*
+ * 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.
+ */
+/*
+ * Test case Name  : scan-delete-inverted-index-ngram-correlated-secondary-index-nullable.sqlpp
+ * Description     : This test is intended to test deletion from correlated secondary ngram inverted index
+ * that are built on nullable fields.
+ * Expected Result : Success
+ * Date            : June 21 2017
+ */
+
+drop  dataverse test if exists;
+create  dataverse test;
+
+use test;
+
+
+create type test.DBLPType as
+ closed {
+  id : bigint,
+  dblpid : string,
+  title : string?,
+  authors : string,
+  misc : string
+}
+
+create  dataset DBLP(DBLPType) primary key id
+using compaction policy `correlated-prefix`
+((`max-mergable-component-size`=`16384`),(`max-tolerance-component-count`=`3`));
+
+create feed DBLPFeed
+using localfs
+((`path`=`asterix_nc1://data/dblp-small/dblp-small-nulls.adm`),
+(`format`=`adm`),
+(`delimiter`=`:`),
+(`type-name`=`DBLPType`),
+(`tuple-interval`=`10`));

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/e856e1e8/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/dml/scan-delete-inverted-index-ngram-correlated-secondary-index-nullable/scan-delete-inverted-index-ngram-correlated-secondary-index-nullable.2.update.sqlpp
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/dml/scan-delete-inverted-index-ngram-correlated-secondary-index-nullable/scan-delete-inverted-index-ngram-correlated-secondary-index-nullable.2.update.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/dml/scan-delete-inverted-index-ngram-correlated-secondary-index-nullable/scan-delete-inverted-index-ngram-correlated-secondary-index-nullable.2.update.sqlpp
new file mode 100644
index 0000000..868b798
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/dml/scan-delete-inverted-index-ngram-correlated-secondary-index-nullable/scan-delete-inverted-index-ngram-correlated-secondary-index-nullable.2.update.sqlpp
@@ -0,0 +1,30 @@
+/*
+ * 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 test;
+
+
+set `wait-for-completion-feed` "true";
+
+connect feed DBLPFeed to dataset DBLP;
+
+start feed DBLPFeed;
+
+delete from DBLP
+ where id > 50;
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/e856e1e8/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/dml/scan-delete-inverted-index-ngram-correlated-secondary-index-nullable/scan-delete-inverted-index-ngram-correlated-secondary-index-nullable.3.ddl.sqlpp
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/dml/scan-delete-inverted-index-ngram-correlated-secondary-index-nullable/scan-delete-inverted-index-ngram-correlated-secondary-index-nullable.3.ddl.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/dml/scan-delete-inverted-index-ngram-correlated-secondary-index-nullable/scan-delete-inverted-index-ngram-correlated-secondary-index-nullable.3.ddl.sqlpp
new file mode 100644
index 0000000..f1d7f46
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/dml/scan-delete-inverted-index-ngram-correlated-secondary-index-nullable/scan-delete-inverted-index-ngram-correlated-secondary-index-nullable.3.ddl.sqlpp
@@ -0,0 +1,24 @@
+/*
+ * 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 test;
+
+
+create  index ngram_index  on DBLP (title) type ngram (3);
+

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/e856e1e8/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/dml/scan-delete-inverted-index-ngram-correlated-secondary-index-nullable/scan-delete-inverted-index-ngram-correlated-secondary-index-nullable.4.query.sqlpp
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/dml/scan-delete-inverted-index-ngram-correlated-secondary-index-nullable/scan-delete-inverted-index-ngram-correlated-secondary-index-nullable.4.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/dml/scan-delete-inverted-index-ngram-correlated-secondary-index-nullable/scan-delete-inverted-index-ngram-correlated-secondary-index-nullable.4.query.sqlpp
new file mode 100644
index 0000000..0ac4ba6
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/dml/scan-delete-inverted-index-ngram-correlated-secondary-index-nullable/scan-delete-inverted-index-ngram-correlated-secondary-index-nullable.4.query.sqlpp
@@ -0,0 +1,27 @@
+/*
+ * 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 test;
+
+
+select element o
+from  DBLP as o
+where test.contains(o.title,'Multimedia')
+order by o.id
+;

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/e856e1e8/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/dml/scan-delete-inverted-index-ngram-correlated-secondary-index-open/scan-delete-inverted-index-ngram-correlated-secondary-index-open.1.ddl.sqlpp
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/dml/scan-delete-inverted-index-ngram-correlated-secondary-index-open/scan-delete-inverted-index-ngram-correlated-secondary-index-open.1.ddl.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/dml/scan-delete-inverted-index-ngram-correlated-secondary-index-open/scan-delete-inverted-index-ngram-correlated-secondary-index-open.1.ddl.sqlpp
new file mode 100644
index 0000000..c59a9d3
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/dml/scan-delete-inverted-index-ngram-correlated-secondary-index-open/scan-delete-inverted-index-ngram-correlated-secondary-index-open.1.ddl.sqlpp
@@ -0,0 +1,56 @@
+/*
+ * 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.
+ */
+/*
+ * Test case Name  : scan-delete-inverted-index-ngram-correlated-secondary-index-open.sqlpp
+ * Description     : This test is intended to test deletion from correlated secondary ngram inverted index that is built on open field.
+ * Expected Result : Success
+ * Date            : June 21 2017
+ */
+
+drop  dataverse test if exists;
+create  dataverse test;
+
+use test;
+
+
+create type test.DBLPType as
+ closed {
+  id : bigint,
+  dblpid : string,
+  title : string,
+  authors : string,
+  misc : string
+}
+
+create type test.DBLPOpenType as
+{
+  id : bigint,
+  dblpid : string,
+  authors : string,
+  misc : string
+}
+
+create  dataset DBLP(DBLPType) primary key id
+using compaction policy `correlated-prefix`
+((`max-mergable-component-size`=`16384`),(`max-tolerance-component-count`=`3`));
+
+create  dataset DBLPOpen(DBLPOpenType) primary key id
+using compaction policy `correlated-prefix`
+((`max-mergable-component-size`=`16384`),(`max-tolerance-component-count`=`3`));
+

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/e856e1e8/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/dml/scan-delete-inverted-index-ngram-correlated-secondary-index-open/scan-delete-inverted-index-ngram-correlated-secondary-index-open.2.update.sqlpp
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/dml/scan-delete-inverted-index-ngram-correlated-secondary-index-open/scan-delete-inverted-index-ngram-correlated-secondary-index-open.2.update.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/dml/scan-delete-inverted-index-ngram-correlated-secondary-index-open/scan-delete-inverted-index-ngram-correlated-secondary-index-open.2.update.sqlpp
new file mode 100644
index 0000000..5865ca6
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/dml/scan-delete-inverted-index-ngram-correlated-secondary-index-open/scan-delete-inverted-index-ngram-correlated-secondary-index-open.2.update.sqlpp
@@ -0,0 +1,31 @@
+/*
+ * 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 test;
+
+
+load  dataset DBLP using localfs ((`path`=`asterix_nc1://data/dblp-small/dblp-small-id.txt`),(`format`=`delimited-text`),(`delimiter`=`:`)) pre-sorted;
+
+insert into test.DBLPOpen
+select element x
+from  `test.DBLP` as x
+;
+
+delete from DBLPOpen
+ where id > 50;

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/e856e1e8/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/dml/scan-delete-inverted-index-ngram-correlated-secondary-index-open/scan-delete-inverted-index-ngram-correlated-secondary-index-open.3.ddl.sqlpp
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/dml/scan-delete-inverted-index-ngram-correlated-secondary-index-open/scan-delete-inverted-index-ngram-correlated-secondary-index-open.3.ddl.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/dml/scan-delete-inverted-index-ngram-correlated-secondary-index-open/scan-delete-inverted-index-ngram-correlated-secondary-index-open.3.ddl.sqlpp
new file mode 100644
index 0000000..f0edc78
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/dml/scan-delete-inverted-index-ngram-correlated-secondary-index-open/scan-delete-inverted-index-ngram-correlated-secondary-index-open.3.ddl.sqlpp
@@ -0,0 +1,23 @@
+/*
+ * 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 test;
+
+create  index ngram_index  on DBLPOpen (title:string?) type ngram (3) enforced;
+

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/e856e1e8/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/dml/scan-delete-inverted-index-ngram-correlated-secondary-index-open/scan-delete-inverted-index-ngram-correlated-secondary-index-open.5.query.sqlpp
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/dml/scan-delete-inverted-index-ngram-correlated-secondary-index-open/scan-delete-inverted-index-ngram-correlated-secondary-index-open.5.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/dml/scan-delete-inverted-index-ngram-correlated-secondary-index-open/scan-delete-inverted-index-ngram-correlated-secondary-index-open.5.query.sqlpp
new file mode 100644
index 0000000..95ba079
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/dml/scan-delete-inverted-index-ngram-correlated-secondary-index-open/scan-delete-inverted-index-ngram-correlated-secondary-index-open.5.query.sqlpp
@@ -0,0 +1,26 @@
+/*
+ * 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 test;
+
+select element o
+from  DBLPOpen as o
+where test.contains(o.title,'Multimedia')
+order by o.id
+;

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/e856e1e8/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/dml/scan-delete-inverted-index-ngram-correlated-secondary-index/scan-delete-inverted-index-ngram-correlated-secondary-index.1.ddl.sqlpp
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/dml/scan-delete-inverted-index-ngram-correlated-secondary-index/scan-delete-inverted-index-ngram-correlated-secondary-index.1.ddl.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/dml/scan-delete-inverted-index-ngram-correlated-secondary-index/scan-delete-inverted-index-ngram-correlated-secondary-index.1.ddl.sqlpp
new file mode 100644
index 0000000..0ca47f4
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/dml/scan-delete-inverted-index-ngram-correlated-secondary-index/scan-delete-inverted-index-ngram-correlated-secondary-index.1.ddl.sqlpp
@@ -0,0 +1,51 @@
+/*
+ * 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.
+ */
+/*
+ * Test case Name  : scan-delete-inverted-index-ngram-correlated-secondary-index.sqlpp
+ * Description     : This test is intended to test deletion from correlated secondary ngram inverted index.
+ * Expected Result : Success
+ * Date            : June 21 2017
+ */
+
+drop  dataverse test if exists;
+create  dataverse test;
+
+use test;
+
+
+create type test.DBLPType as
+ closed {
+  id : bigint,
+  dblpid : string,
+  title : string,
+  authors : string,
+  misc : string
+}
+
+create  dataset DBLP(DBLPType) primary key id
+using compaction policy `correlated-prefix`
+((`max-mergable-component-size`=`16384`),(`max-tolerance-component-count`=`3`));
+
+create feed DBLPFeed
+using localfs
+((`path`=`asterix_nc1://data/dblp-small/dblp-small-id.txt`),
+(`format`=`delimited-text`),
+(`delimiter`=`:`),
+(`type-name`=`DBLPType`),
+(`tuple-interval`=`10`));

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/e856e1e8/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/dml/scan-delete-inverted-index-ngram-correlated-secondary-index/scan-delete-inverted-index-ngram-correlated-secondary-index.2.update.sqlpp
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/dml/scan-delete-inverted-index-ngram-correlated-secondary-index/scan-delete-inverted-index-ngram-correlated-secondary-index.2.update.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/dml/scan-delete-inverted-index-ngram-correlated-secondary-index/scan-delete-inverted-index-ngram-correlated-secondary-index.2.update.sqlpp
new file mode 100644
index 0000000..7dbad4f
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/dml/scan-delete-inverted-index-ngram-correlated-secondary-index/scan-delete-inverted-index-ngram-correlated-secondary-index.2.update.sqlpp
@@ -0,0 +1,31 @@
+/*
+ * 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 test;
+
+
+set `wait-for-completion-feed` "true";
+
+connect feed DBLPFeed to dataset DBLP;
+
+start feed DBLPFeed;
+
+delete from DBLP
+ where id > 50;
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/e856e1e8/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/dml/scan-delete-inverted-index-ngram-correlated-secondary-index/scan-delete-inverted-index-ngram-correlated-secondary-index.3.ddl.sqlpp
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/dml/scan-delete-inverted-index-ngram-correlated-secondary-index/scan-delete-inverted-index-ngram-correlated-secondary-index.3.ddl.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/dml/scan-delete-inverted-index-ngram-correlated-secondary-index/scan-delete-inverted-index-ngram-correlated-secondary-index.3.ddl.sqlpp
new file mode 100644
index 0000000..aedc027
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/dml/scan-delete-inverted-index-ngram-correlated-secondary-index/scan-delete-inverted-index-ngram-correlated-secondary-index.3.ddl.sqlpp
@@ -0,0 +1,23 @@
+/*
+ * 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 test;
+
+create  index ngram_index  on DBLP (title) type ngram (3);
+

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/e856e1e8/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/dml/scan-delete-inverted-index-ngram-correlated-secondary-index/scan-delete-inverted-index-ngram-correlated-secondary-index.4.query.sqlpp
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/dml/scan-delete-inverted-index-ngram-correlated-secondary-index/scan-delete-inverted-index-ngram-correlated-secondary-index.4.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/dml/scan-delete-inverted-index-ngram-correlated-secondary-index/scan-delete-inverted-index-ngram-correlated-secondary-index.4.query.sqlpp
new file mode 100644
index 0000000..0ac4ba6
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/dml/scan-delete-inverted-index-ngram-correlated-secondary-index/scan-delete-inverted-index-ngram-correlated-secondary-index.4.query.sqlpp
@@ -0,0 +1,27 @@
+/*
+ * 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 test;
+
+
+select element o
+from  DBLP as o
+where test.contains(o.title,'Multimedia')
+order by o.id
+;

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/e856e1e8/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/dml/scan-delete-inverted-index-word-correlated-secondary-index-nullable/scan-delete-inverted-index-word-correlated-secondary-index-nullable.1.ddl.sqlpp
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/dml/scan-delete-inverted-index-word-correlated-secondary-index-nullable/scan-delete-inverted-index-word-correlated-secondary-index-nullable.1.ddl.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/dml/scan-delete-inverted-index-word-correlated-secondary-index-nullable/scan-delete-inverted-index-word-correlated-secondary-index-nullable.1.ddl.sqlpp
new file mode 100644
index 0000000..8e63f7f
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/dml/scan-delete-inverted-index-word-correlated-secondary-index-nullable/scan-delete-inverted-index-word-correlated-secondary-index-nullable.1.ddl.sqlpp
@@ -0,0 +1,51 @@
+/*
+ * 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.
+ */
+/*
+ * Test case Name  : scan-delete-inverted-index-word-correlated-secondary-index-nullable.sqlpp
+ * Description     : This test is intended to test deletion from correlated secondary keyword inverted index
+ * that are built on nullable fields.
+ * Expected Result : Success
+ * Date            : Jun 21 2017
+ */
+
+drop  dataverse test if exists;
+create  dataverse test;
+
+use test;
+
+
+create type test.DBLPType as
+ closed {
+  id : bigint,
+  dblpid : string,
+  title : string?,
+  authors : string,
+  misc : string
+}
+
+create  dataset DBLP(DBLPType) primary key id
+using compaction policy `correlated-prefix`
+((`max-mergable-component-size`=`16384`),(`max-tolerance-component-count`=`3`));
+
+create feed DBLPFeed
+using localfs
+((`path`=`asterix_nc1://data/dblp-small/dblp-small-nulls.adm`),
+(`format`=`adm`),
+(`type-name`=`DBLPType`),
+(`tuple-interval`=`10`));
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/e856e1e8/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/dml/scan-delete-inverted-index-word-correlated-secondary-index-nullable/scan-delete-inverted-index-word-correlated-secondary-index-nullable.2.update.sqlpp
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/dml/scan-delete-inverted-index-word-correlated-secondary-index-nullable/scan-delete-inverted-index-word-correlated-secondary-index-nullable.2.update.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/dml/scan-delete-inverted-index-word-correlated-secondary-index-nullable/scan-delete-inverted-index-word-correlated-secondary-index-nullable.2.update.sqlpp
new file mode 100644
index 0000000..0caeb62
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/dml/scan-delete-inverted-index-word-correlated-secondary-index-nullable/scan-delete-inverted-index-word-correlated-secondary-index-nullable.2.update.sqlpp
@@ -0,0 +1,30 @@
+/*
+ * 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 test;
+
+
+set `wait-for-completion-feed` "true";
+
+connect feed DBLPFeed to dataset DBLP;
+
+start feed DBLPFeed;
+
+delete from DBLP
+ where id < 50;

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/e856e1e8/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/dml/scan-delete-inverted-index-word-correlated-secondary-index-nullable/scan-delete-inverted-index-word-correlated-secondary-index-nullable.3.ddl.sqlpp
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/dml/scan-delete-inverted-index-word-correlated-secondary-index-nullable/scan-delete-inverted-index-word-correlated-secondary-index-nullable.3.ddl.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/dml/scan-delete-inverted-index-word-correlated-secondary-index-nullable/scan-delete-inverted-index-word-correlated-secondary-index-nullable.3.ddl.sqlpp
new file mode 100644
index 0000000..c782c45
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/dml/scan-delete-inverted-index-word-correlated-secondary-index-nullable/scan-delete-inverted-index-word-correlated-secondary-index-nullable.3.ddl.sqlpp
@@ -0,0 +1,24 @@
+/*
+ * 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 test;
+
+
+create  index keyword_index  on DBLP (title) type keyword;
+

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/e856e1e8/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/dml/scan-delete-inverted-index-word-correlated-secondary-index-nullable/scan-delete-inverted-index-word-correlated-secondary-index-nullable.4.query.sqlpp
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/dml/scan-delete-inverted-index-word-correlated-secondary-index-nullable/scan-delete-inverted-index-word-correlated-secondary-index-nullable.4.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/dml/scan-delete-inverted-index-word-correlated-secondary-index-nullable/scan-delete-inverted-index-word-correlated-secondary-index-nullable.4.query.sqlpp
new file mode 100644
index 0000000..ef0cc9b
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/dml/scan-delete-inverted-index-word-correlated-secondary-index-nullable/scan-delete-inverted-index-word-correlated-secondary-index-nullable.4.query.sqlpp
@@ -0,0 +1,27 @@
+/*
+ * 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 test;
+
+
+select element o
+from  DBLP as o
+with  jacc as test.`similarity-jaccard-check`(test.`word-tokens`(o.title),test.`word-tokens`('Transactions for Cooperative Environments'),0.500000f)
+where jacc[0]
+;

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/e856e1e8/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/dml/scan-delete-inverted-index-word-correlated-secondary-index-open/scan-delete-inverted-index-word-correlated-secondary-index-open.1.ddl.sqlpp
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/dml/scan-delete-inverted-index-word-correlated-secondary-index-open/scan-delete-inverted-index-word-correlated-secondary-index-open.1.ddl.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/dml/scan-delete-inverted-index-word-correlated-secondary-index-open/scan-delete-inverted-index-word-correlated-secondary-index-open.1.ddl.sqlpp
new file mode 100644
index 0000000..929adc2
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/dml/scan-delete-inverted-index-word-correlated-secondary-index-open/scan-delete-inverted-index-word-correlated-secondary-index-open.1.ddl.sqlpp
@@ -0,0 +1,57 @@
+/*
+ * 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.
+ */
+/*
+ * Test case Name  : scan-delete-inverted-index-word-correlated-secondary-index-open.sqlpp
+ * Description     : This test is intended to test deletion from correlated secondary keyword inverted index
+ * that is built on open field.
+ * Expected Result : Success
+ * Date            : June 21 2017
+ */
+
+drop  dataverse test if exists;
+create  dataverse test;
+
+use test;
+
+
+create type test.DBLPType as
+ closed {
+  id : integer,
+  dblpid : string,
+  title : string,
+  authors : string,
+  misc : string
+}
+
+create type test.DBLPOpenType as
+{
+  id : integer,
+  dblpid : string,
+  authors : string,
+  misc : string
+}
+
+create  dataset DBLP(DBLPType) primary key id
+using compaction policy `correlated-prefix`
+((`max-mergable-component-size`=`16384`),(`max-tolerance-component-count`=`3`));
+
+create  dataset DBLPOpen(DBLPOpenType) primary key id
+using compaction policy `correlated-prefix`
+((`max-mergable-component-size`=`16384`),(`max-tolerance-component-count`=`3`));
+

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/e856e1e8/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/dml/scan-delete-inverted-index-word-correlated-secondary-index-open/scan-delete-inverted-index-word-correlated-secondary-index-open.2.update.sqlpp
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/dml/scan-delete-inverted-index-word-correlated-secondary-index-open/scan-delete-inverted-index-word-correlated-secondary-index-open.2.update.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/dml/scan-delete-inverted-index-word-correlated-secondary-index-open/scan-delete-inverted-index-word-correlated-secondary-index-open.2.update.sqlpp
new file mode 100644
index 0000000..878bdd0
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/dml/scan-delete-inverted-index-word-correlated-secondary-index-open/scan-delete-inverted-index-word-correlated-secondary-index-open.2.update.sqlpp
@@ -0,0 +1,31 @@
+/*
+ * 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 test;
+
+
+load  dataset DBLP using localfs ((`path`=`asterix_nc1://data/dblp-small/dblp-small-id.txt`),(`format`=`delimited-text`),(`delimiter`=`:`)) pre-sorted;
+
+insert into test.DBLPOpen
+select element x
+from  `test.DBLP` as x
+;
+
+delete from DBLPOpen
+ where id < 50;
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/e856e1e8/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/dml/scan-delete-inverted-index-word-correlated-secondary-index-open/scan-delete-inverted-index-word-correlated-secondary-index-open.3.ddl.sqlpp
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/dml/scan-delete-inverted-index-word-correlated-secondary-index-open/scan-delete-inverted-index-word-correlated-secondary-index-open.3.ddl.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/dml/scan-delete-inverted-index-word-correlated-secondary-index-open/scan-delete-inverted-index-word-correlated-secondary-index-open.3.ddl.sqlpp
new file mode 100644
index 0000000..1b26ca6
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/dml/scan-delete-inverted-index-word-correlated-secondary-index-open/scan-delete-inverted-index-word-correlated-secondary-index-open.3.ddl.sqlpp
@@ -0,0 +1,24 @@
+/*
+ * 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 test;
+
+
+create  index keyword_index  on DBLPOpen (title:string?) type keyword enforced;
+

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/e856e1e8/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/dml/scan-delete-inverted-index-word-correlated-secondary-index-open/scan-delete-inverted-index-word-correlated-secondary-index-open.4.query.sqlpp
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/dml/scan-delete-inverted-index-word-correlated-secondary-index-open/scan-delete-inverted-index-word-correlated-secondary-index-open.4.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/dml/scan-delete-inverted-index-word-correlated-secondary-index-open/scan-delete-inverted-index-word-correlated-secondary-index-open.4.query.sqlpp
new file mode 100644
index 0000000..414345c
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/dml/scan-delete-inverted-index-word-correlated-secondary-index-open/scan-delete-inverted-index-word-correlated-secondary-index-open.4.query.sqlpp
@@ -0,0 +1,27 @@
+/*
+ * 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 test;
+
+
+select element o
+from  DBLPOpen as o
+with  jacc as test.`similarity-jaccard-check`(test.`word-tokens`(o.title),test.`word-tokens`('Transactions for Cooperative Environments'),0.500000f)
+where jacc[0]
+;

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/e856e1e8/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/dml/scan-delete-inverted-index-word-correlated-secondary-index/scan-delete-inverted-index-word-correlated-secondary-index.1.ddl.sqlpp
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/dml/scan-delete-inverted-index-word-correlated-secondary-index/scan-delete-inverted-index-word-correlated-secondary-index.1.ddl.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/dml/scan-delete-inverted-index-word-correlated-secondary-index/scan-delete-inverted-index-word-correlated-secondary-index.1.ddl.sqlpp
new file mode 100644
index 0000000..58956d7
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/dml/scan-delete-inverted-index-word-correlated-secondary-index/scan-delete-inverted-index-word-correlated-secondary-index.1.ddl.sqlpp
@@ -0,0 +1,52 @@
+/*
+ * 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.
+ */
+/*
+ * Test case Name  : scan-delete-inverted-index-word-correlated-secondary-index.sqlpp
+ * Description     : This test is intended to test deletion from correlated secondary keyword inverted index.
+ * Expected Result : Success
+ * Date            : June 20 2017
+ */
+
+drop  dataverse test if exists;
+create  dataverse test;
+
+use test;
+
+
+create type test.DBLPType as
+ closed {
+  id : bigint,
+  dblpid : string,
+  title : string,
+  authors : string,
+  misc : string
+}
+
+create  dataset DBLP(DBLPType) primary key id
+using compaction policy `correlated-prefix`
+((`max-mergable-component-size`=`16384`),(`max-tolerance-component-count`=`3`));
+
+create feed DBLPFeed
+using localfs
+((`path`=`asterix_nc1://data/dblp-small/dblp-small-id.txt`),
+(`format`=`delimited-text`),
+(`delimiter`=`:`),
+(`type-name`=`DBLPType`),
+(`tuple-interval`=`10`));
+

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/e856e1e8/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/dml/scan-delete-inverted-index-word-correlated-secondary-index/scan-delete-inverted-index-word-correlated-secondary-index.2.update.sqlpp
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/dml/scan-delete-inverted-index-word-correlated-secondary-index/scan-delete-inverted-index-word-correlated-secondary-index.2.update.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/dml/scan-delete-inverted-index-word-correlated-secondary-index/scan-delete-inverted-index-word-correlated-secondary-index.2.update.sqlpp
new file mode 100644
index 0000000..46809c5
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/dml/scan-delete-inverted-index-word-correlated-secondary-index/scan-delete-inverted-index-word-correlated-secondary-index.2.update.sqlpp
@@ -0,0 +1,30 @@
+/*
+ * 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 test;
+
+
+set `wait-for-completion-feed` "true";
+
+connect feed DBLPFeed to dataset DBLP;
+
+start feed DBLPFeed;
+
+delete from DBLP
+ where id < 50;
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/e856e1e8/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/dml/scan-delete-inverted-index-word-correlated-secondary-index/scan-delete-inverted-index-word-correlated-secondary-index.3.ddl.sqlpp
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/dml/scan-delete-inverted-index-word-correlated-secondary-index/scan-delete-inverted-index-word-correlated-secondary-index.3.ddl.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/dml/scan-delete-inverted-index-word-correlated-secondary-index/scan-delete-inverted-index-word-correlated-secondary-index.3.ddl.sqlpp
new file mode 100644
index 0000000..c782c45
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/dml/scan-delete-inverted-index-word-correlated-secondary-index/scan-delete-inverted-index-word-correlated-secondary-index.3.ddl.sqlpp
@@ -0,0 +1,24 @@
+/*
+ * 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 test;
+
+
+create  index keyword_index  on DBLP (title) type keyword;
+

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/e856e1e8/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/dml/scan-delete-inverted-index-word-correlated-secondary-index/scan-delete-inverted-index-word-correlated-secondary-index.4.query.sqlpp
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/dml/scan-delete-inverted-index-word-correlated-secondary-index/scan-delete-inverted-index-word-correlated-secondary-index.4.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/dml/scan-delete-inverted-index-word-correlated-secondary-index/scan-delete-inverted-index-word-correlated-secondary-index.4.query.sqlpp
new file mode 100644
index 0000000..ef0cc9b
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/dml/scan-delete-inverted-index-word-correlated-secondary-index/scan-delete-inverted-index-word-correlated-secondary-index.4.query.sqlpp
@@ -0,0 +1,27 @@
+/*
+ * 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 test;
+
+
+select element o
+from  DBLP as o
+with  jacc as test.`similarity-jaccard-check`(test.`word-tokens`(o.title),test.`word-tokens`('Transactions for Cooperative Environments'),0.500000f)
+where jacc[0]
+;

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/e856e1e8/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/dml/scan-delete-rtree-correlated-secondary-index-nullable/scan-delete-rtree-correlated-secondary-index-nullable.1.ddl.sqlpp
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/dml/scan-delete-rtree-correlated-secondary-index-nullable/scan-delete-rtree-correlated-secondary-index-nullable.1.ddl.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/dml/scan-delete-rtree-correlated-secondary-index-nullable/scan-delete-rtree-correlated-secondary-index-nullable.1.ddl.sqlpp
new file mode 100644
index 0000000..bd93783
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/dml/scan-delete-rtree-correlated-secondary-index-nullable/scan-delete-rtree-correlated-secondary-index-nullable.1.ddl.sqlpp
@@ -0,0 +1,55 @@
+/*
+ * 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.
+ */
+/*
+ * Test case Name  : scan-delete-rtree-secondary-index-nullable.sqlpp
+ * Description     : This test is intended to test deletion from secondary correlated rtree indexes
+ * that are built on nullable fields
+ * Expected Result : Success
+ * Date            : June 20 2017
+ */
+
+drop  dataverse test if exists;
+create  dataverse test;
+
+use test;
+
+
+create type test.MyRecord as
+ closed {
+  id : bigint,
+  point : point?,
+  kwds : string,
+  line1 : line,
+  line2 : line,
+  poly1 : polygon,
+  poly2 : polygon,
+  rec : rectangle
+}
+
+create  dataset MyData(MyRecord) primary key id
+using compaction policy `correlated-prefix`
+((`max-mergable-component-size`=`16384`),(`max-tolerance-component-count`=`3`));
+
+create feed MyFeed
+using localfs
+((`path`=`asterix_nc1://data/spatial/spatialDataNulls.json`),
+(`format`=`adm`),
+(`type-name`=`MyRecord`),
+(`tuple-interval`=`10`));
+

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/e856e1e8/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/dml/scan-delete-rtree-correlated-secondary-index-nullable/scan-delete-rtree-correlated-secondary-index-nullable.2.update.sqlpp
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/dml/scan-delete-rtree-correlated-secondary-index-nullable/scan-delete-rtree-correlated-secondary-index-nullable.2.update.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/dml/scan-delete-rtree-correlated-secondary-index-nullable/scan-delete-rtree-correlated-secondary-index-nullable.2.update.sqlpp
new file mode 100644
index 0000000..7efdaae
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/dml/scan-delete-rtree-correlated-secondary-index-nullable/scan-delete-rtree-correlated-secondary-index-nullable.2.update.sqlpp
@@ -0,0 +1,29 @@
+/*
+ * 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 test;
+
+set `wait-for-completion-feed` "true";
+
+connect feed MyFeed to dataset MyData;
+
+start feed MyFeed;
+
+delete from MyData
+ where id > 10;

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/e856e1e8/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/dml/scan-delete-rtree-correlated-secondary-index-nullable/scan-delete-rtree-correlated-secondary-index-nullable.3.ddl.sqlpp
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/dml/scan-delete-rtree-correlated-secondary-index-nullable/scan-delete-rtree-correlated-secondary-index-nullable.3.ddl.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/dml/scan-delete-rtree-correlated-secondary-index-nullable/scan-delete-rtree-correlated-secondary-index-nullable.3.ddl.sqlpp
new file mode 100644
index 0000000..662b250
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/dml/scan-delete-rtree-correlated-secondary-index-nullable/scan-delete-rtree-correlated-secondary-index-nullable.3.ddl.sqlpp
@@ -0,0 +1,24 @@
+/*
+ * 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 test;
+
+
+create  index rtree_index_point  on MyData (point) type rtree;
+

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/e856e1e8/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/dml/scan-delete-rtree-correlated-secondary-index-nullable/scan-delete-rtree-correlated-secondary-index-nullable.4.query.sqlpp
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/dml/scan-delete-rtree-correlated-secondary-index-nullable/scan-delete-rtree-correlated-secondary-index-nullable.4.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/dml/scan-delete-rtree-correlated-secondary-index-nullable/scan-delete-rtree-correlated-secondary-index-nullable.4.query.sqlpp
new file mode 100644
index 0000000..f335262
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/dml/scan-delete-rtree-correlated-secondary-index-nullable/scan-delete-rtree-correlated-secondary-index-nullable.4.query.sqlpp
@@ -0,0 +1,27 @@
+/*
+ * 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 test;
+
+
+select element {'id':o.id}
+from  MyData as o
+where test.`spatial-intersect`(o.point,test.`create-polygon`([0.0,1.0,0.0,4.0,12.0,4.0,12.0,1.0]))
+order by o.id
+;

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/e856e1e8/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/dml/scan-delete-rtree-correlated-secondary-index-open/scan-delete-rtree-correlated-secondary-index-open.1.ddl.sqlpp
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/dml/scan-delete-rtree-correlated-secondary-index-open/scan-delete-rtree-correlated-secondary-index-open.1.ddl.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/dml/scan-delete-rtree-correlated-secondary-index-open/scan-delete-rtree-correlated-secondary-index-open.1.ddl.sqlpp
new file mode 100644
index 0000000..002228c
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/dml/scan-delete-rtree-correlated-secondary-index-open/scan-delete-rtree-correlated-secondary-index-open.1.ddl.sqlpp
@@ -0,0 +1,66 @@
+/*
+ * 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.
+ */
+/*
+ * Test case Name  : scan-delete-rtree-correlated-secondary-index-open.sqlpp
+ * Description     : This test is intended to test deletion from correlated secondary rtree index
+ * that is built on open field.
+ * Expected Result : Success
+ * Date            : June 20 2017
+ */
+
+drop  dataverse test if exists;
+create  dataverse test;
+
+use test;
+
+
+create type test.MyRecord as
+ closed {
+  id : bigint,
+  point : point,
+  kwds : string,
+  line1 : line,
+  line2 : line,
+  poly1 : polygon,
+  poly2 : polygon,
+  rec : rectangle,
+  circle : circle
+}
+
+create type test.MyRecordOpen as
+{
+  id : bigint,
+  kwds : string,
+  line1 : line,
+  line2 : line,
+  poly1 : polygon,
+  poly2 : polygon,
+  rec : rectangle,
+  circle : circle
+}
+
+create  dataset MyData(MyRecord) primary key id
+using compaction policy `correlated-prefix`
+((`max-mergable-component-size`=`16384`),(`max-tolerance-component-count`=`3`));
+
+create  dataset MyDataOpen(MyRecordOpen) primary key id
+using compaction policy `correlated-prefix`
+((`max-mergable-component-size`=`16384`),(`max-tolerance-component-count`=`3`));
+
+

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/e856e1e8/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/dml/scan-delete-rtree-correlated-secondary-index-open/scan-delete-rtree-correlated-secondary-index-open.2.update.sqlpp
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/dml/scan-delete-rtree-correlated-secondary-index-open/scan-delete-rtree-correlated-secondary-index-open.2.update.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/dml/scan-delete-rtree-correlated-secondary-index-open/scan-delete-rtree-correlated-secondary-index-open.2.update.sqlpp
new file mode 100644
index 0000000..3fae91c
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/dml/scan-delete-rtree-correlated-secondary-index-open/scan-delete-rtree-correlated-secondary-index-open.2.update.sqlpp
@@ -0,0 +1,30 @@
+/*
+ * 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 test;
+
+load  dataset MyData using localfs ((`path`=`asterix_nc1://data/spatial/spatialData.json`),(`format`=`adm`)) pre-sorted;
+
+insert into test.MyDataOpen
+select element x
+from  `test.MyData` as x
+;
+
+delete from MyDataOpen
+ where id > 10;
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/e856e1e8/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/dml/scan-delete-rtree-correlated-secondary-index-open/scan-delete-rtree-correlated-secondary-index-open.3.ddl.sqlpp
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/dml/scan-delete-rtree-correlated-secondary-index-open/scan-delete-rtree-correlated-secondary-index-open.3.ddl.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/dml/scan-delete-rtree-correlated-secondary-index-open/scan-delete-rtree-correlated-secondary-index-open.3.ddl.sqlpp
new file mode 100644
index 0000000..83625e6
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/dml/scan-delete-rtree-correlated-secondary-index-open/scan-delete-rtree-correlated-secondary-index-open.3.ddl.sqlpp
@@ -0,0 +1,24 @@
+/*
+ * 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 test;
+
+
+create  index rtree_index_point  on MyDataOpen (point:point?) type rtree enforced;
+

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/e856e1e8/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/dml/scan-delete-rtree-correlated-secondary-index-open/scan-delete-rtree-correlated-secondary-index-open.4.query.sqlpp
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/dml/scan-delete-rtree-correlated-secondary-index-open/scan-delete-rtree-correlated-secondary-index-open.4.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/dml/scan-delete-rtree-correlated-secondary-index-open/scan-delete-rtree-correlated-secondary-index-open.4.query.sqlpp
new file mode 100644
index 0000000..ec7c725
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/dml/scan-delete-rtree-correlated-secondary-index-open/scan-delete-rtree-correlated-secondary-index-open.4.query.sqlpp
@@ -0,0 +1,27 @@
+/*
+ * 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 test;
+
+
+select element {'id':o.id}
+from  MyDataOpen as o
+where test.`spatial-intersect`(o.point,test.`create-polygon`([0.0,1.0,0.0,4.0,12.0,4.0,12.0,1.0]))
+order by o.id
+;

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/e856e1e8/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/dml/scan-delete-rtree-correlated-secondary-index/scan-delete-rtree-correlated-secondary-index.1.ddl.sqlpp
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/dml/scan-delete-rtree-correlated-secondary-index/scan-delete-rtree-correlated-secondary-index.1.ddl.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/dml/scan-delete-rtree-correlated-secondary-index/scan-delete-rtree-correlated-secondary-index.1.ddl.sqlpp
new file mode 100644
index 0000000..d2fa3db
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/dml/scan-delete-rtree-correlated-secondary-index/scan-delete-rtree-correlated-secondary-index.1.ddl.sqlpp
@@ -0,0 +1,56 @@
+/*
+ * 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.
+ */
+
+/*
+ * Test case Name  : scan-delete-rtree-correlated-secondary-index.sqlpp
+ * Description     : This test is intended to test deletion from correlated secondary rtree indexes
+ * Expected Result : Success
+ * Date            : June 20 2017
+ */
+
+drop  dataverse test if exists;
+create  dataverse test;
+
+use test;
+
+
+create type test.MyRecord as
+ closed {
+  id : bigint,
+  point : point,
+  kwds : string,
+  line1 : line,
+  line2 : line,
+  poly1 : polygon,
+  poly2 : polygon,
+  rec : rectangle,
+  circle : circle
+}
+
+create dataset MyData(MyRecord) primary key id
+using compaction policy `correlated-prefix`
+((`max-mergable-component-size`=`16384`),(`max-tolerance-component-count`=`3`));
+
+
+create feed MyFeed
+using localfs
+((`path`=`asterix_nc1://data/spatial/spatialData.json`),
+(`format`=`adm`),
+(`type-name`=`MyRecord`),
+(`tuple-interval`=`10`));

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/e856e1e8/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/dml/scan-delete-rtree-correlated-secondary-index/scan-delete-rtree-correlated-secondary-index.2.update.sqlpp
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/dml/scan-delete-rtree-correlated-secondary-index/scan-delete-rtree-correlated-secondary-index.2.update.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/dml/scan-delete-rtree-correlated-secondary-index/scan-delete-rtree-correlated-secondary-index.2.update.sqlpp
new file mode 100644
index 0000000..7efdaae
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/dml/scan-delete-rtree-correlated-secondary-index/scan-delete-rtree-correlated-secondary-index.2.update.sqlpp
@@ -0,0 +1,29 @@
+/*
+ * 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 test;
+
+set `wait-for-completion-feed` "true";
+
+connect feed MyFeed to dataset MyData;
+
+start feed MyFeed;
+
+delete from MyData
+ where id > 10;

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/e856e1e8/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/dml/scan-delete-rtree-correlated-secondary-index/scan-delete-rtree-correlated-secondary-index.3.ddl.sqlpp
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/dml/scan-delete-rtree-correlated-secondary-index/scan-delete-rtree-correlated-secondary-index.3.ddl.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/dml/scan-delete-rtree-correlated-secondary-index/scan-delete-rtree-correlated-secondary-index.3.ddl.sqlpp
new file mode 100644
index 0000000..662b250
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/dml/scan-delete-rtree-correlated-secondary-index/scan-delete-rtree-correlated-secondary-index.3.ddl.sqlpp
@@ -0,0 +1,24 @@
+/*
+ * 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 test;
+
+
+create  index rtree_index_point  on MyData (point) type rtree;
+


Mime
View raw message