[ASTERIXDB-2967][IDX] Force EXCLUDE UNKNOWN for array indexes

- user model changes: no
- storage format changes: no
- interface changes: no

Force EXCLUDE UNKNOWN for array indexes, and some slight refactoring of
the tests (to reduce the array index test footprint).

Change-Id: Ic3b82df0d1f98a55a484cde3a18c59e59ffcd50e
Reviewed-on: https://asterix-gerrit.ics.uci.edu/c/asterixdb/+/13344
Tested-by: Jenkins <jenkins@fulliautomatix.ics.uci.edu>
Integration-Tests: Jenkins <jenkins@fulliautomatix.ics.uci.edu>
Reviewed-by: Dmitry Lychagin <dmitry.lychagin@couchbase.com>
diff --git a/asterixdb/asterix-app/src/main/java/org/apache/asterix/app/translator/QueryTranslator.java b/asterixdb/asterix-app/src/main/java/org/apache/asterix/app/translator/QueryTranslator.java
index ca749df..740454b 100644
--- a/asterixdb/asterix-app/src/main/java/org/apache/asterix/app/translator/QueryTranslator.java
+++ b/asterixdb/asterix-app/src/main/java/org/apache/asterix/app/translator/QueryTranslator.java
@@ -1239,13 +1239,19 @@
                 indexFieldTypes.add(fieldTypes);
             }
 
-            boolean unknownKeyOptionAllowed = indexType == IndexType.BTREE && !isSecondaryPrimary;
+            boolean unknownKeyOptionAllowed =
+                    (indexType == IndexType.BTREE || indexType == IndexType.ARRAY) && !isSecondaryPrimary;
             if (stmtCreateIndex.hasExcludeUnknownKey() && !unknownKeyOptionAllowed) {
                 throw new CompilationException(ErrorCode.COMPILATION_ERROR, sourceLoc,
-                        "can only specify exclude/include unknown key for B-Tree indexes");
+                        "can only specify exclude/include unknown key for B-Tree & Array indexes");
             }
             Index.IIndexDetails indexDetails;
             if (Index.IndexCategory.of(indexType) == Index.IndexCategory.ARRAY) {
+                if (!stmtCreateIndex.hasExcludeUnknownKey()
+                        || !stmtCreateIndex.isExcludeUnknownKey().getOrElse(false)) {
+                    throw new CompilationException(ErrorCode.COMPILATION_ERROR, sourceLoc,
+                            "Array indexes must specify EXCLUDE UNKNOWN KEY.");
+                }
                 if (!hadUnnest) {
                     // prohibited by the grammar
                     throw new CompilationException(ErrorCode.COMPILATION_ILLEGAL_STATE, sourceLoc,
diff --git a/asterixdb/asterix-app/src/test/java/org/apache/asterix/test/array/ArrayIndex.java b/asterixdb/asterix-app/src/test/java/org/apache/asterix/test/array/ArrayIndex.java
index 1d7d973..f49cdb0 100644
--- a/asterixdb/asterix-app/src/test/java/org/apache/asterix/test/array/ArrayIndex.java
+++ b/asterixdb/asterix-app/src/test/java/org/apache/asterix/test/array/ArrayIndex.java
@@ -190,7 +190,7 @@
                     sb.append(", ");
                 }
             }
-            sb.append(" );\n");
+            sb.append(" ) EXCLUDE UNKNOWN KEY;\n");
             return sb.toString();
         }
     }
diff --git a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/array-index/atomic-and-array-queries/query1.sqlpp b/asterixdb/asterix-app/src/test/resources/optimizerts/queries/array-index/atomic-and-array-queries/query1.sqlpp
index e12eeaf..29b6012 100644
--- a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/array-index/atomic-and-array-queries/query1.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/optimizerts/queries/array-index/atomic-and-array-queries/query1.sqlpp
@@ -35,7 +35,7 @@
       SELECT field2 : bigint,
              field3 : bigint ),
     field4 : bigint
-);
+) EXCLUDE UNKNOWN KEY;
 
 -- Explicit UNNEST query with all fields of a composite index.
 FROM    Dataset1 D
diff --git a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/array-index/atomic-and-array-queries/query2.sqlpp b/asterixdb/asterix-app/src/test/resources/optimizerts/queries/array-index/atomic-and-array-queries/query2.sqlpp
index f832a76..cd56abc 100644
--- a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/array-index/atomic-and-array-queries/query2.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/optimizerts/queries/array-index/atomic-and-array-queries/query2.sqlpp
@@ -35,7 +35,7 @@
       SELECT field2 : bigint,
              field3 : bigint ),
     field4 : bigint
-);
+) EXCLUDE UNKNOWN KEY;
 
 -- Explicit UNNEST query with all fields of a composite index, with extra clauses on non-indexed fields.
 FROM    Dataset1 D
diff --git a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/array-index/atomic-and-array-queries/query3.sqlpp b/asterixdb/asterix-app/src/test/resources/optimizerts/queries/array-index/atomic-and-array-queries/query3.sqlpp
index 6c1f9b7..6f0cca8 100644
--- a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/array-index/atomic-and-array-queries/query3.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/optimizerts/queries/array-index/atomic-and-array-queries/query3.sqlpp
@@ -36,7 +36,7 @@
       SELECT field2 : bigint,
              field3 : bigint ),
     field4 : bigint
-);
+) EXCLUDE UNKNOWN KEY;
 
 -- Explicit UNNEST query with all fields of a composite index, with extra clauses on non-indexed fields (2).
 FROM    Dataset1 D
diff --git a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/array-index/atomic-and-array-queries/query4.sqlpp b/asterixdb/asterix-app/src/test/resources/optimizerts/queries/array-index/atomic-and-array-queries/query4.sqlpp
index 135a563..d0ff566 100644
--- a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/array-index/atomic-and-array-queries/query4.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/optimizerts/queries/array-index/atomic-and-array-queries/query4.sqlpp
@@ -35,7 +35,7 @@
       SELECT field2 : bigint,
              field3 : bigint ),
     field4 : bigint
-);
+) EXCLUDE UNKNOWN KEY;
 
 -- Existential quantification query with all fields of a composite index.
 FROM    Dataset1 D
diff --git a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/array-index/atomic-and-array-queries/query5.sqlpp b/asterixdb/asterix-app/src/test/resources/optimizerts/queries/array-index/atomic-and-array-queries/query5.sqlpp
index 8ce7532..0668251 100644
--- a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/array-index/atomic-and-array-queries/query5.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/optimizerts/queries/array-index/atomic-and-array-queries/query5.sqlpp
@@ -36,7 +36,7 @@
       SELECT field2 : bigint,
              field3 : bigint ),
     field4 : bigint
-);
+) EXCLUDE UNKNOWN KEY;
 
 -- Existential quantification query with all fields of a composite index, with extra clauses on non-indexed fields.
 FROM    Dataset1 D
diff --git a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/array-index/atomic-and-array-queries/query6.sqlpp b/asterixdb/asterix-app/src/test/resources/optimizerts/queries/array-index/atomic-and-array-queries/query6.sqlpp
index 39f2687..d5bb4ed 100644
--- a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/array-index/atomic-and-array-queries/query6.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/optimizerts/queries/array-index/atomic-and-array-queries/query6.sqlpp
@@ -37,7 +37,7 @@
       SELECT field2 : bigint,
              field3 : bigint ),
     field4 : bigint
-);
+) EXCLUDE UNKNOWN KEY;
 
 -- Explicit UNNEST join query with all fields of a composite index.
 FROM    Dataset2 D2
diff --git a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/array-index/atomic-and-array-queries/query7.sqlpp b/asterixdb/asterix-app/src/test/resources/optimizerts/queries/array-index/atomic-and-array-queries/query7.sqlpp
index 5d0dece..7d257ce 100644
--- a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/array-index/atomic-and-array-queries/query7.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/optimizerts/queries/array-index/atomic-and-array-queries/query7.sqlpp
@@ -37,7 +37,7 @@
       SELECT field2 : bigint,
              field3 : bigint ),
     field4 : bigint
-);
+) EXCLUDE UNKNOWN KEY;
 
 -- Explicit UNNEST join query with all fields of a composite index, with extra clauses on non-indexed fields.
 FROM    Dataset2 D2
diff --git a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/array-index/atomic-and-array-queries/query8.sqlpp b/asterixdb/asterix-app/src/test/resources/optimizerts/queries/array-index/atomic-and-array-queries/query8.sqlpp
index 8801212..96e5040 100644
--- a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/array-index/atomic-and-array-queries/query8.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/optimizerts/queries/array-index/atomic-and-array-queries/query8.sqlpp
@@ -37,7 +37,7 @@
       SELECT field2 : bigint,
              field3 : bigint ),
     field4 : bigint
-);
+) EXCLUDE UNKNOWN KEY;
 
 -- Existential quantification join query with all fields of a composite index.
 FROM    Dataset2 D2,
diff --git a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/array-index/atomic-and-array-queries/query9.sqlpp b/asterixdb/asterix-app/src/test/resources/optimizerts/queries/array-index/atomic-and-array-queries/query9.sqlpp
index ac2c8c9..f16885e 100644
--- a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/array-index/atomic-and-array-queries/query9.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/optimizerts/queries/array-index/atomic-and-array-queries/query9.sqlpp
@@ -38,7 +38,7 @@
       SELECT field2 : bigint,
              field3 : bigint ),
     field4 : bigint
-);
+) EXCLUDE UNKNOWN KEY;
 
 -- Existential quantification query with all fields of a composite index, with extra clauses on non-indexed fields.
 FROM    Dataset2 D2,
diff --git a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/array-index/join-quantified-queries/use-case-1/query1.sqlpp b/asterixdb/asterix-app/src/test/resources/optimizerts/queries/array-index/join-quantified-queries/use-case-1/query1.sqlpp
index a03397d..e5448d4 100644
--- a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/array-index/join-quantified-queries/use-case-1/query1.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/optimizerts/queries/array-index/join-quantified-queries/use-case-1/query1.sqlpp
@@ -36,7 +36,7 @@
 
 CREATE DATASET YelpCheckin(CheckinType) PRIMARY KEY checkin_id AUTOGENERATED;
 CREATE DATASET YelpCheckinDateMarkers (CheckinDatesToMarkersType) PRIMARY KEY marker;
-CREATE INDEX IdxYelpCheckinDates ON YelpCheckin (UNNEST dates);
+CREATE INDEX IdxYelpCheckinDates ON YelpCheckin (UNNEST dates) EXCLUDE UNKNOWN KEY;
 
 FROM    YelpCheckinDateMarkers M, YelpCheckin C
 WHERE   M.date /*+ indexnl */ IN C.dates AND
diff --git a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/array-index/join-quantified-queries/use-case-1/query2.sqlpp b/asterixdb/asterix-app/src/test/resources/optimizerts/queries/array-index/join-quantified-queries/use-case-1/query2.sqlpp
index d3ca985..99b0c17 100644
--- a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/array-index/join-quantified-queries/use-case-1/query2.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/optimizerts/queries/array-index/join-quantified-queries/use-case-1/query2.sqlpp
@@ -36,7 +36,7 @@
 
 CREATE DATASET YelpCheckin(CheckinType) PRIMARY KEY checkin_id AUTOGENERATED;
 CREATE DATASET YelpCheckinDateMarkers (CheckinDatesToMarkersType) PRIMARY KEY marker;
-CREATE INDEX IdxYelpCheckinDates ON YelpCheckin (UNNEST dates);
+CREATE INDEX IdxYelpCheckinDates ON YelpCheckin (UNNEST dates) EXCLUDE UNKNOWN KEY;
 
 FROM    YelpCheckinDateMarkers M, YelpCheckin C
 WHERE   C.business_id = "--Ni3oJ4VOqfOEu7Sj2Vzg" AND
diff --git a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/array-index/join-quantified-queries/use-case-1/query3.sqlpp b/asterixdb/asterix-app/src/test/resources/optimizerts/queries/array-index/join-quantified-queries/use-case-1/query3.sqlpp
index 3b0f70f..bde1c66 100644
--- a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/array-index/join-quantified-queries/use-case-1/query3.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/optimizerts/queries/array-index/join-quantified-queries/use-case-1/query3.sqlpp
@@ -36,7 +36,7 @@
 
 CREATE DATASET YelpCheckin(CheckinType) PRIMARY KEY checkin_id AUTOGENERATED;
 CREATE DATASET YelpCheckinDateMarkers (CheckinDatesToMarkersType) PRIMARY KEY marker;
-CREATE INDEX IdxYelpCheckinDates ON YelpCheckin (UNNEST dates);
+CREATE INDEX IdxYelpCheckinDates ON YelpCheckin (UNNEST dates) EXCLUDE UNKNOWN KEY;
 
 FROM    YelpCheckinDateMarkers M, YelpCheckin C
 WHERE   C.business_id = "--Ni3oJ4VOqfOEu7Sj2Vzg" AND
diff --git a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/array-index/join-quantified-queries/use-case-1/query4.sqlpp b/asterixdb/asterix-app/src/test/resources/optimizerts/queries/array-index/join-quantified-queries/use-case-1/query4.sqlpp
index 5607661..bd14312 100644
--- a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/array-index/join-quantified-queries/use-case-1/query4.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/optimizerts/queries/array-index/join-quantified-queries/use-case-1/query4.sqlpp
@@ -37,8 +37,8 @@
 CREATE DATASET YelpCheckinA(CheckinType) PRIMARY KEY checkin_id AUTOGENERATED;
 CREATE DATASET YelpCheckinB(CheckinType) PRIMARY KEY checkin_id AUTOGENERATED;
 CREATE DATASET YelpCheckinDateMarkers (CheckinDatesToMarkersType) PRIMARY KEY marker;
-CREATE INDEX IdxYelpCheckinADates ON YelpCheckinA (UNNEST dates);
-CREATE INDEX IdxYelpCheckinBDates ON YelpCheckinB (UNNEST dates);
+CREATE INDEX IdxYelpCheckinADates ON YelpCheckinA (UNNEST dates) EXCLUDE UNKNOWN KEY;
+CREATE INDEX IdxYelpCheckinBDates ON YelpCheckinB (UNNEST dates) EXCLUDE UNKNOWN KEY;
 
 FROM    YelpCheckinDateMarkers M, YelpCheckinA A, YelpCheckinB B
 WHERE   M.date /*+ indexnl */ IN A.dates AND
diff --git a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/array-index/join-quantified-queries/use-case-1/query5.sqlpp b/asterixdb/asterix-app/src/test/resources/optimizerts/queries/array-index/join-quantified-queries/use-case-1/query5.sqlpp
index 3da4d0c..5c78253 100644
--- a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/array-index/join-quantified-queries/use-case-1/query5.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/optimizerts/queries/array-index/join-quantified-queries/use-case-1/query5.sqlpp
@@ -36,7 +36,7 @@
 
 CREATE DATASET YelpCheckin(CheckinType) PRIMARY KEY checkin_id AUTOGENERATED;
 CREATE DATASET YelpCheckinDateMarkers (CheckinDatesToMarkersType) PRIMARY KEY marker;
-CREATE INDEX IdxYelpCheckinDates ON YelpCheckin (UNNEST dates);
+CREATE INDEX IdxYelpCheckinDates ON YelpCheckin (UNNEST dates) EXCLUDE UNKNOWN KEY;
 
 FROM    YelpCheckinDateMarkers M, YelpCheckin C
 WHERE   C.business_id = "--Ni3oJ4VOqfOEu7Sj2Vzg" AND
diff --git a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/array-index/join-quantified-queries/use-case-2/query1.sqlpp b/asterixdb/asterix-app/src/test/resources/optimizerts/queries/array-index/join-quantified-queries/use-case-2/query1.sqlpp
index d7e8956..2cc0978 100644
--- a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/array-index/join-quantified-queries/use-case-2/query1.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/optimizerts/queries/array-index/join-quantified-queries/use-case-2/query1.sqlpp
@@ -39,7 +39,7 @@
 
 CREATE DATASET YelpCheckin(CheckinType) PRIMARY KEY checkin_id AUTOGENERATED;
 CREATE DATASET YelpCheckinDateMarkers (CheckinDatesToMarkersType) PRIMARY KEY marker;
-CREATE INDEX IdxYelpCheckinDates ON YelpCheckin (UNNEST checkin_times.dates);
+CREATE INDEX IdxYelpCheckinDates ON YelpCheckin (UNNEST checkin_times.dates) EXCLUDE UNKNOWN KEY;
 
 FROM    YelpCheckinDateMarkers M, YelpCheckin C
 WHERE   M.date /*+ indexnl */ IN C.checkin_times.dates AND
diff --git a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/array-index/join-quantified-queries/use-case-2/query2.sqlpp b/asterixdb/asterix-app/src/test/resources/optimizerts/queries/array-index/join-quantified-queries/use-case-2/query2.sqlpp
index 9e317ac..a7ac426 100644
--- a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/array-index/join-quantified-queries/use-case-2/query2.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/optimizerts/queries/array-index/join-quantified-queries/use-case-2/query2.sqlpp
@@ -39,7 +39,7 @@
 
 CREATE DATASET YelpCheckin(CheckinType) PRIMARY KEY checkin_id AUTOGENERATED;
 CREATE DATASET YelpCheckinDateMarkers (CheckinDatesToMarkersType) PRIMARY KEY marker;
-CREATE INDEX IdxYelpCheckinDates ON YelpCheckin (UNNEST checkin_times.dates);
+CREATE INDEX IdxYelpCheckinDates ON YelpCheckin (UNNEST checkin_times.dates) EXCLUDE UNKNOWN KEY;
 
 FROM    YelpCheckinDateMarkers M, YelpCheckin C
 WHERE   C.business_id = "--Ni3oJ4VOqfOEu7Sj2Vzg" AND
diff --git a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/array-index/join-quantified-queries/use-case-2/query3.sqlpp b/asterixdb/asterix-app/src/test/resources/optimizerts/queries/array-index/join-quantified-queries/use-case-2/query3.sqlpp
index 7270986..6c0487f 100644
--- a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/array-index/join-quantified-queries/use-case-2/query3.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/optimizerts/queries/array-index/join-quantified-queries/use-case-2/query3.sqlpp
@@ -39,7 +39,7 @@
 
 CREATE DATASET YelpCheckin(CheckinType) PRIMARY KEY checkin_id AUTOGENERATED;
 CREATE DATASET YelpCheckinDateMarkers (CheckinDatesToMarkersType) PRIMARY KEY marker;
-CREATE INDEX IdxYelpCheckinDates ON YelpCheckin (UNNEST checkin_times.dates);
+CREATE INDEX IdxYelpCheckinDates ON YelpCheckin (UNNEST checkin_times.dates) EXCLUDE UNKNOWN KEY;
 
 -- This should NOT be optimized, there is no non-array-emptiness clause.
 FROM    YelpCheckinDateMarkers M, YelpCheckin C
diff --git a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/array-index/join-quantified-queries/use-case-3/query1.sqlpp b/asterixdb/asterix-app/src/test/resources/optimizerts/queries/array-index/join-quantified-queries/use-case-3/query1.sqlpp
index fd3a846..6d8615e 100644
--- a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/array-index/join-quantified-queries/use-case-3/query1.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/optimizerts/queries/array-index/join-quantified-queries/use-case-3/query1.sqlpp
@@ -39,7 +39,7 @@
 
 CREATE DATASET YelpCheckin(CheckinType) PRIMARY KEY checkin_id AUTOGENERATED;
 CREATE DATASET YelpCheckinDateMarkers (CheckinDatesToMarkersType) PRIMARY KEY marker;
-CREATE INDEX IdxYelpCheckinDates ON YelpCheckin (UNNEST checkin_times SELECT date);
+CREATE INDEX IdxYelpCheckinDates ON YelpCheckin (UNNEST checkin_times SELECT date) EXCLUDE UNKNOWN KEY;
 
 FROM    YelpCheckinDateMarkers M, YelpCheckin C
 WHERE   ( SOME D IN C.checkin_times
diff --git a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/array-index/join-quantified-queries/use-case-3/query2.sqlpp b/asterixdb/asterix-app/src/test/resources/optimizerts/queries/array-index/join-quantified-queries/use-case-3/query2.sqlpp
index badd2cb..3c712f6 100644
--- a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/array-index/join-quantified-queries/use-case-3/query2.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/optimizerts/queries/array-index/join-quantified-queries/use-case-3/query2.sqlpp
@@ -39,7 +39,7 @@
 
 CREATE DATASET YelpCheckin(CheckinType) PRIMARY KEY checkin_id AUTOGENERATED;
 CREATE DATASET YelpCheckinDateMarkers (CheckinDatesToMarkersType) PRIMARY KEY marker;
-CREATE INDEX IdxYelpCheckinDates ON YelpCheckin (UNNEST checkin_times SELECT date);
+CREATE INDEX IdxYelpCheckinDates ON YelpCheckin (UNNEST checkin_times SELECT date) EXCLUDE UNKNOWN KEY;
 
 FROM    YelpCheckinDateMarkers M, YelpCheckin C
 WHERE   ( SOME AND EVERY D IN C.checkin_times
diff --git a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/array-index/join-quantified-queries/use-case-4/query1.sqlpp b/asterixdb/asterix-app/src/test/resources/optimizerts/queries/array-index/join-quantified-queries/use-case-4/query1.sqlpp
index bbafaa9..9e809de 100644
--- a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/array-index/join-quantified-queries/use-case-4/query1.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/optimizerts/queries/array-index/join-quantified-queries/use-case-4/query1.sqlpp
@@ -40,7 +40,7 @@
 
 CREATE DATASET YelpCheckin(CheckinType) PRIMARY KEY checkin_id AUTOGENERATED;
 CREATE DATASET YelpCheckinDateMarkers (CheckinDatesToMarkersType) PRIMARY KEY marker;
-CREATE INDEX IdxYelpCheckinDates ON YelpCheckin (UNNEST checkin_times UNNEST dates);
+CREATE INDEX IdxYelpCheckinDates ON YelpCheckin (UNNEST checkin_times UNNEST dates) EXCLUDE UNKNOWN KEY;
 
 FROM    YelpCheckinDateMarkers M, YelpCheckin C
 WHERE   ( SOME CT IN C.checkin_times
diff --git a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/array-index/join-quantified-queries/use-case-4/query2.sqlpp b/asterixdb/asterix-app/src/test/resources/optimizerts/queries/array-index/join-quantified-queries/use-case-4/query2.sqlpp
index d7eccc3..1023a24 100644
--- a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/array-index/join-quantified-queries/use-case-4/query2.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/optimizerts/queries/array-index/join-quantified-queries/use-case-4/query2.sqlpp
@@ -40,7 +40,7 @@
 
 CREATE DATASET YelpCheckin(CheckinType) PRIMARY KEY checkin_id AUTOGENERATED;
 CREATE DATASET YelpCheckinDateMarkers (CheckinDatesToMarkersType) PRIMARY KEY marker;
-CREATE INDEX IdxYelpCheckinDates ON YelpCheckin (UNNEST checkin_times UNNEST dates);
+CREATE INDEX IdxYelpCheckinDates ON YelpCheckin (UNNEST checkin_times UNNEST dates) EXCLUDE UNKNOWN KEY;
 
 FROM    YelpCheckinDateMarkers M, YelpCheckin C
 WHERE   ( EVERY CT IN C.checkin_times
diff --git a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/array-index/join-quantified-queries/use-case-4/query3.sqlpp b/asterixdb/asterix-app/src/test/resources/optimizerts/queries/array-index/join-quantified-queries/use-case-4/query3.sqlpp
index da8a388..7305666 100644
--- a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/array-index/join-quantified-queries/use-case-4/query3.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/optimizerts/queries/array-index/join-quantified-queries/use-case-4/query3.sqlpp
@@ -40,7 +40,7 @@
 
 CREATE DATASET YelpCheckin(CheckinType) PRIMARY KEY checkin_id AUTOGENERATED;
 CREATE DATASET YelpCheckinDateMarkers (CheckinDatesToMarkersType) PRIMARY KEY marker;
-CREATE INDEX IdxYelpCheckinDates ON YelpCheckin (UNNEST checkin_times UNNEST dates);
+CREATE INDEX IdxYelpCheckinDates ON YelpCheckin (UNNEST checkin_times UNNEST dates) EXCLUDE UNKNOWN KEY;
 
 FROM    YelpCheckinDateMarkers M, YelpCheckin C
 WHERE   ( SOME AND EVERY CT IN C.checkin_times
diff --git a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/array-index/join-quantified-queries/use-case-4/query4.sqlpp b/asterixdb/asterix-app/src/test/resources/optimizerts/queries/array-index/join-quantified-queries/use-case-4/query4.sqlpp
index cf1ea46..a7ab028 100644
--- a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/array-index/join-quantified-queries/use-case-4/query4.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/optimizerts/queries/array-index/join-quantified-queries/use-case-4/query4.sqlpp
@@ -41,8 +41,8 @@
 CREATE DATASET YelpCheckinA(CheckinType) PRIMARY KEY checkin_id AUTOGENERATED;
 CREATE DATASET YelpCheckinB(CheckinType) PRIMARY KEY checkin_id AUTOGENERATED;
 CREATE DATASET YelpCheckinDateMarkers (CheckinDatesToMarkersType) PRIMARY KEY marker;
-CREATE INDEX IdxYelpCheckinDatesA ON YelpCheckinA (UNNEST checkin_times UNNEST dates);
-CREATE INDEX IdxYelpCheckinDatesB ON YelpCheckinB (UNNEST checkin_times UNNEST dates);
+CREATE INDEX IdxYelpCheckinDatesA ON YelpCheckinA (UNNEST checkin_times UNNEST dates) EXCLUDE UNKNOWN KEY;
+CREATE INDEX IdxYelpCheckinDatesB ON YelpCheckinB (UNNEST checkin_times UNNEST dates) EXCLUDE UNKNOWN KEY;
 
 FROM    YelpCheckinDateMarkers M, YelpCheckinA A, YelpCheckinB B
 WHERE   ( SOME AND EVERY CT IN A.checkin_times
diff --git a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/array-index/join-unnest-queries/use-case-1/query1.sqlpp b/asterixdb/asterix-app/src/test/resources/optimizerts/queries/array-index/join-unnest-queries/use-case-1/query1.sqlpp
index 3960ee6..653a84f 100644
--- a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/array-index/join-unnest-queries/use-case-1/query1.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/optimizerts/queries/array-index/join-unnest-queries/use-case-1/query1.sqlpp
@@ -36,7 +36,7 @@
 
 CREATE DATASET YelpCheckin(CheckinType) PRIMARY KEY checkin_id AUTOGENERATED;
 CREATE DATASET YelpCheckinDateMarkers (CheckinDatesToMarkersType) PRIMARY KEY marker;
-CREATE INDEX IdxYelpCheckinDates ON YelpCheckin (UNNEST dates);
+CREATE INDEX IdxYelpCheckinDates ON YelpCheckin (UNNEST dates) EXCLUDE UNKNOWN KEY;
 
 SELECT M.marker
 FROM YelpCheckinDateMarkers M, YelpCheckin C, C.dates D
diff --git a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/array-index/join-unnest-queries/use-case-1/query2.sqlpp b/asterixdb/asterix-app/src/test/resources/optimizerts/queries/array-index/join-unnest-queries/use-case-1/query2.sqlpp
index a231ac7..f190af9 100644
--- a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/array-index/join-unnest-queries/use-case-1/query2.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/optimizerts/queries/array-index/join-unnest-queries/use-case-1/query2.sqlpp
@@ -36,7 +36,7 @@
 
 CREATE DATASET YelpCheckin(CheckinType) PRIMARY KEY checkin_id AUTOGENERATED;
 CREATE DATASET YelpCheckinDateMarkers (CheckinDatesToMarkersType) PRIMARY KEY marker;
-CREATE INDEX IdxYelpCheckinDates ON YelpCheckin (UNNEST dates);
+CREATE INDEX IdxYelpCheckinDates ON YelpCheckin (UNNEST dates) EXCLUDE UNKNOWN KEY;
 
 SELECT M.marker
 FROM YelpCheckinDateMarkers M, YelpCheckin C, C.dates D
diff --git a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/array-index/join-unnest-queries/use-case-1/query3.sqlpp b/asterixdb/asterix-app/src/test/resources/optimizerts/queries/array-index/join-unnest-queries/use-case-1/query3.sqlpp
index 8fe3c15..db22a1e 100644
--- a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/array-index/join-unnest-queries/use-case-1/query3.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/optimizerts/queries/array-index/join-unnest-queries/use-case-1/query3.sqlpp
@@ -36,7 +36,7 @@
 
 CREATE DATASET YelpCheckin(CheckinType) PRIMARY KEY checkin_id AUTOGENERATED;
 CREATE DATASET YelpCheckinDateMarkers (CheckinDatesToMarkersType) PRIMARY KEY marker;
-CREATE INDEX IdxYelpCheckinDates ON YelpCheckin (UNNEST dates);
+CREATE INDEX IdxYelpCheckinDates ON YelpCheckin (UNNEST dates) EXCLUDE UNKNOWN KEY;
 
 SELECT COUNT(*)
 FROM YelpCheckinDateMarkers M
diff --git a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/array-index/join-unnest-queries/use-case-1/query4.sqlpp b/asterixdb/asterix-app/src/test/resources/optimizerts/queries/array-index/join-unnest-queries/use-case-1/query4.sqlpp
index 6147325..909affd 100644
--- a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/array-index/join-unnest-queries/use-case-1/query4.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/optimizerts/queries/array-index/join-unnest-queries/use-case-1/query4.sqlpp
@@ -36,7 +36,7 @@
 
 CREATE DATASET YelpCheckin(CheckinType) PRIMARY KEY checkin_id AUTOGENERATED;
 CREATE DATASET YelpCheckinDateMarkers (CheckinDatesToMarkersType) PRIMARY KEY marker;
-CREATE INDEX IdxYelpCheckinDates ON YelpCheckin (UNNEST dates);
+CREATE INDEX IdxYelpCheckinDates ON YelpCheckin (UNNEST dates) EXCLUDE UNKNOWN KEY;
 
 SELECT COUNT(*)
 FROM YelpCheckinDateMarkers M
diff --git a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/array-index/join-unnest-queries/use-case-2/query1.sqlpp b/asterixdb/asterix-app/src/test/resources/optimizerts/queries/array-index/join-unnest-queries/use-case-2/query1.sqlpp
index c10c2a9..bf99dff 100644
--- a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/array-index/join-unnest-queries/use-case-2/query1.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/optimizerts/queries/array-index/join-unnest-queries/use-case-2/query1.sqlpp
@@ -39,7 +39,7 @@
 
 CREATE DATASET YelpCheckin(CheckinType) PRIMARY KEY checkin_id AUTOGENERATED;
 CREATE DATASET YelpCheckinDateMarkers (CheckinDatesToMarkersType) PRIMARY KEY marker;
-CREATE INDEX IdxYelpCheckinDates ON YelpCheckin (UNNEST checkin_times.dates);
+CREATE INDEX IdxYelpCheckinDates ON YelpCheckin (UNNEST checkin_times.dates) EXCLUDE UNKNOWN KEY;
 
 SELECT M.marker
 FROM YelpCheckinDateMarkers M, YelpCheckin C, C.checkin_times.dates D
diff --git a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/array-index/join-unnest-queries/use-case-2/query2.sqlpp b/asterixdb/asterix-app/src/test/resources/optimizerts/queries/array-index/join-unnest-queries/use-case-2/query2.sqlpp
index 8e5cf1e..3d9f1d6 100644
--- a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/array-index/join-unnest-queries/use-case-2/query2.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/optimizerts/queries/array-index/join-unnest-queries/use-case-2/query2.sqlpp
@@ -39,7 +39,7 @@
 
 CREATE DATASET YelpCheckin(CheckinType) PRIMARY KEY checkin_id AUTOGENERATED;
 CREATE DATASET YelpCheckinDateMarkers (CheckinDatesToMarkersType) PRIMARY KEY marker;
-CREATE INDEX IdxYelpCheckinDates ON YelpCheckin (UNNEST checkin_times.dates);
+CREATE INDEX IdxYelpCheckinDates ON YelpCheckin (UNNEST checkin_times.dates) EXCLUDE UNKNOWN KEY;
 
 SELECT M.marker
 FROM YelpCheckinDateMarkers M, YelpCheckin C, C.checkin_times.dates D
diff --git a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/array-index/join-unnest-queries/use-case-2/query3.sqlpp b/asterixdb/asterix-app/src/test/resources/optimizerts/queries/array-index/join-unnest-queries/use-case-2/query3.sqlpp
index b8e9b49..10538b8 100644
--- a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/array-index/join-unnest-queries/use-case-2/query3.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/optimizerts/queries/array-index/join-unnest-queries/use-case-2/query3.sqlpp
@@ -39,7 +39,7 @@
 
 CREATE DATASET YelpCheckin(CheckinType) PRIMARY KEY checkin_id AUTOGENERATED;
 CREATE DATASET YelpCheckinDateMarkers (CheckinDatesToMarkersType) PRIMARY KEY marker;
-CREATE INDEX IdxYelpCheckinDates ON YelpCheckin (UNNEST checkin_times.dates);
+CREATE INDEX IdxYelpCheckinDates ON YelpCheckin (UNNEST checkin_times.dates) EXCLUDE UNKNOWN KEY;
 
 SELECT COUNT(*)
 FROM YelpCheckinDateMarkers M
diff --git a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/array-index/join-unnest-queries/use-case-2/query4.sqlpp b/asterixdb/asterix-app/src/test/resources/optimizerts/queries/array-index/join-unnest-queries/use-case-2/query4.sqlpp
index 5be3ede..6f33b3c 100644
--- a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/array-index/join-unnest-queries/use-case-2/query4.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/optimizerts/queries/array-index/join-unnest-queries/use-case-2/query4.sqlpp
@@ -39,7 +39,7 @@
 
 CREATE DATASET YelpCheckin(CheckinType) PRIMARY KEY checkin_id AUTOGENERATED;
 CREATE DATASET YelpCheckinDateMarkers (CheckinDatesToMarkersType) PRIMARY KEY marker;
-CREATE INDEX IdxYelpCheckinDates ON YelpCheckin (UNNEST checkin_times.dates);
+CREATE INDEX IdxYelpCheckinDates ON YelpCheckin (UNNEST checkin_times.dates) EXCLUDE UNKNOWN KEY;
 
 SELECT COUNT(*)
 FROM YelpCheckinDateMarkers M
diff --git a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/array-index/join-unnest-queries/use-case-3/query1.sqlpp b/asterixdb/asterix-app/src/test/resources/optimizerts/queries/array-index/join-unnest-queries/use-case-3/query1.sqlpp
index 91f6d8a..9551441 100644
--- a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/array-index/join-unnest-queries/use-case-3/query1.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/optimizerts/queries/array-index/join-unnest-queries/use-case-3/query1.sqlpp
@@ -39,7 +39,7 @@
 
 CREATE DATASET YelpCheckin(CheckinType) PRIMARY KEY checkin_id AUTOGENERATED;
 CREATE DATASET YelpCheckinDateMarkers (CheckinDatesToMarkersType) PRIMARY KEY marker;
-CREATE INDEX IdxYelpCheckinDates ON YelpCheckin (UNNEST checkin_times SELECT date);
+CREATE INDEX IdxYelpCheckinDates ON YelpCheckin (UNNEST checkin_times SELECT date) EXCLUDE UNKNOWN KEY;
 
 SELECT M.marker
 FROM YelpCheckinDateMarkers M, YelpCheckin C, C.checkin_times D
diff --git a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/array-index/join-unnest-queries/use-case-3/query2.sqlpp b/asterixdb/asterix-app/src/test/resources/optimizerts/queries/array-index/join-unnest-queries/use-case-3/query2.sqlpp
index d4742ce..b8ef5ec 100644
--- a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/array-index/join-unnest-queries/use-case-3/query2.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/optimizerts/queries/array-index/join-unnest-queries/use-case-3/query2.sqlpp
@@ -39,7 +39,7 @@
 
 CREATE DATASET YelpCheckin(CheckinType) PRIMARY KEY checkin_id AUTOGENERATED;
 CREATE DATASET YelpCheckinDateMarkers (CheckinDatesToMarkersType) PRIMARY KEY marker;
-CREATE INDEX IdxYelpCheckinDates ON YelpCheckin (UNNEST checkin_times SELECT date);
+CREATE INDEX IdxYelpCheckinDates ON YelpCheckin (UNNEST checkin_times SELECT date) EXCLUDE UNKNOWN KEY;
 
 SELECT M.marker
 FROM YelpCheckinDateMarkers M, YelpCheckin C, C.checkin_times D
diff --git a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/array-index/join-unnest-queries/use-case-3/query3.sqlpp b/asterixdb/asterix-app/src/test/resources/optimizerts/queries/array-index/join-unnest-queries/use-case-3/query3.sqlpp
index e3afa1e..2a3337c 100644
--- a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/array-index/join-unnest-queries/use-case-3/query3.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/optimizerts/queries/array-index/join-unnest-queries/use-case-3/query3.sqlpp
@@ -39,7 +39,7 @@
 
 CREATE DATASET YelpCheckin(CheckinType) PRIMARY KEY checkin_id AUTOGENERATED;
 CREATE DATASET YelpCheckinDateMarkers (CheckinDatesToMarkersType) PRIMARY KEY marker;
-CREATE INDEX IdxYelpCheckinDates ON YelpCheckin (UNNEST checkin_times SELECT date);
+CREATE INDEX IdxYelpCheckinDates ON YelpCheckin (UNNEST checkin_times SELECT date) EXCLUDE UNKNOWN KEY;
 
 SELECT M.marker
 FROM YelpCheckinDateMarkers M, YelpCheckin C, C.checkin_times D
diff --git a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/array-index/join-unnest-queries/use-case-3/query4.sqlpp b/asterixdb/asterix-app/src/test/resources/optimizerts/queries/array-index/join-unnest-queries/use-case-3/query4.sqlpp
index f5d3c52..20cfec9 100644
--- a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/array-index/join-unnest-queries/use-case-3/query4.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/optimizerts/queries/array-index/join-unnest-queries/use-case-3/query4.sqlpp
@@ -39,7 +39,7 @@
 
 CREATE DATASET YelpCheckin(CheckinType) PRIMARY KEY checkin_id AUTOGENERATED;
 CREATE DATASET YelpCheckinDateMarkers (CheckinDatesToMarkersType) PRIMARY KEY marker;
-CREATE INDEX IdxYelpCheckinDates ON YelpCheckin (UNNEST checkin_times SELECT date);
+CREATE INDEX IdxYelpCheckinDates ON YelpCheckin (UNNEST checkin_times SELECT date) EXCLUDE UNKNOWN KEY;
 
 SELECT COUNT(*)
 FROM YelpCheckinDateMarkers M
diff --git a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/array-index/join-unnest-queries/use-case-3/query5.sqlpp b/asterixdb/asterix-app/src/test/resources/optimizerts/queries/array-index/join-unnest-queries/use-case-3/query5.sqlpp
index 0b595d7..1888ba4 100644
--- a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/array-index/join-unnest-queries/use-case-3/query5.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/optimizerts/queries/array-index/join-unnest-queries/use-case-3/query5.sqlpp
@@ -39,7 +39,7 @@
 
 CREATE DATASET YelpCheckin(CheckinType) PRIMARY KEY checkin_id AUTOGENERATED;
 CREATE DATASET YelpCheckinDateMarkers (CheckinDatesToMarkersType) PRIMARY KEY marker;
-CREATE INDEX IdxYelpCheckinDates ON YelpCheckin (UNNEST checkin_times SELECT date);
+CREATE INDEX IdxYelpCheckinDates ON YelpCheckin (UNNEST checkin_times SELECT date) EXCLUDE UNKNOWN KEY;
 
 SELECT COUNT(*)
 FROM YelpCheckinDateMarkers M
diff --git a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/array-index/join-unnest-queries/use-case-4/query1.sqlpp b/asterixdb/asterix-app/src/test/resources/optimizerts/queries/array-index/join-unnest-queries/use-case-4/query1.sqlpp
index 1afd508..ebef766 100644
--- a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/array-index/join-unnest-queries/use-case-4/query1.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/optimizerts/queries/array-index/join-unnest-queries/use-case-4/query1.sqlpp
@@ -40,7 +40,7 @@
 
 CREATE DATASET YelpCheckin(CheckinType) PRIMARY KEY checkin_id AUTOGENERATED;
 CREATE DATASET YelpCheckinDateMarkers (CheckinDatesToMarkersType) PRIMARY KEY marker;
-CREATE INDEX IdxYelpCheckinDates ON YelpCheckin (UNNEST checkin_times UNNEST dates);
+CREATE INDEX IdxYelpCheckinDates ON YelpCheckin (UNNEST checkin_times UNNEST dates) EXCLUDE UNKNOWN KEY;
 
 SELECT M.marker
 FROM YelpCheckinDateMarkers M, YelpCheckin C, C.checkin_times CT, CT.dates D
diff --git a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/array-index/join-unnest-queries/use-case-4/query2.sqlpp b/asterixdb/asterix-app/src/test/resources/optimizerts/queries/array-index/join-unnest-queries/use-case-4/query2.sqlpp
index b911a20..042bad1 100644
--- a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/array-index/join-unnest-queries/use-case-4/query2.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/optimizerts/queries/array-index/join-unnest-queries/use-case-4/query2.sqlpp
@@ -40,7 +40,7 @@
 
 CREATE DATASET YelpCheckin(CheckinType) PRIMARY KEY checkin_id AUTOGENERATED;
 CREATE DATASET YelpCheckinDateMarkers (CheckinDatesToMarkersType) PRIMARY KEY marker;
-CREATE INDEX IdxYelpCheckinDates ON YelpCheckin (UNNEST checkin_times UNNEST dates);
+CREATE INDEX IdxYelpCheckinDates ON YelpCheckin (UNNEST checkin_times UNNEST dates) EXCLUDE UNKNOWN KEY;
 
 SELECT M.marker
 FROM YelpCheckinDateMarkers M, YelpCheckin C, C.checkin_times CT, CT.dates D
diff --git a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/array-index/join-unnest-queries/use-case-4/query3.sqlpp b/asterixdb/asterix-app/src/test/resources/optimizerts/queries/array-index/join-unnest-queries/use-case-4/query3.sqlpp
index 5a23cb4..5b7a47e 100644
--- a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/array-index/join-unnest-queries/use-case-4/query3.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/optimizerts/queries/array-index/join-unnest-queries/use-case-4/query3.sqlpp
@@ -40,7 +40,7 @@
 
 CREATE DATASET YelpCheckin(CheckinType) PRIMARY KEY checkin_id AUTOGENERATED;
 CREATE DATASET YelpCheckinDateMarkers (CheckinDatesToMarkersType) PRIMARY KEY marker;
-CREATE INDEX IdxYelpCheckinDates ON YelpCheckin (UNNEST checkin_times UNNEST dates);
+CREATE INDEX IdxYelpCheckinDates ON YelpCheckin (UNNEST checkin_times UNNEST dates) EXCLUDE UNKNOWN KEY;
 
 SELECT M.marker
 FROM YelpCheckinDateMarkers M, YelpCheckin C, C.checkin_times CT, CT.dates D
diff --git a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/array-index/join-unnest-queries/use-case-4/query4.sqlpp b/asterixdb/asterix-app/src/test/resources/optimizerts/queries/array-index/join-unnest-queries/use-case-4/query4.sqlpp
index c142d1a..7e21e98 100644
--- a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/array-index/join-unnest-queries/use-case-4/query4.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/optimizerts/queries/array-index/join-unnest-queries/use-case-4/query4.sqlpp
@@ -40,7 +40,7 @@
 
 CREATE DATASET YelpCheckin(CheckinType) PRIMARY KEY checkin_id AUTOGENERATED;
 CREATE DATASET YelpCheckinDateMarkers (CheckinDatesToMarkersType) PRIMARY KEY marker;
-CREATE INDEX IdxYelpCheckinDates ON YelpCheckin (UNNEST checkin_times UNNEST dates);
+CREATE INDEX IdxYelpCheckinDates ON YelpCheckin (UNNEST checkin_times UNNEST dates) EXCLUDE UNKNOWN KEY;
 
 SELECT COUNT(*)
 FROM YelpCheckinDateMarkers M
diff --git a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/array-index/join-unnest-queries/use-case-4/query5.sqlpp b/asterixdb/asterix-app/src/test/resources/optimizerts/queries/array-index/join-unnest-queries/use-case-4/query5.sqlpp
index d5c3295..f34dc23 100644
--- a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/array-index/join-unnest-queries/use-case-4/query5.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/optimizerts/queries/array-index/join-unnest-queries/use-case-4/query5.sqlpp
@@ -40,7 +40,7 @@
 
 CREATE DATASET YelpCheckin(CheckinType) PRIMARY KEY checkin_id AUTOGENERATED;
 CREATE DATASET YelpCheckinDateMarkers (CheckinDatesToMarkersType) PRIMARY KEY marker;
-CREATE INDEX IdxYelpCheckinDates ON YelpCheckin (UNNEST checkin_times UNNEST dates);
+CREATE INDEX IdxYelpCheckinDates ON YelpCheckin (UNNEST checkin_times UNNEST dates) EXCLUDE UNKNOWN KEY;
 
 SELECT COUNT(*)
 FROM YelpCheckinDateMarkers M
diff --git a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/array-index/select-quantified-queries/multiple-quantifiers/query1.sqlpp b/asterixdb/asterix-app/src/test/resources/optimizerts/queries/array-index/select-quantified-queries/multiple-quantifiers/query1.sqlpp
index 3327bd6..6094af8 100644
--- a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/array-index/select-quantified-queries/multiple-quantifiers/query1.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/optimizerts/queries/array-index/select-quantified-queries/multiple-quantifiers/query1.sqlpp
@@ -28,7 +28,7 @@
 CREATE DATASET    Dataset1 (TestType)
 PRIMARY KEY        _id AUTOGENERATED;
 CREATE INDEX      d1Idx
-ON                Dataset1 ( UNNEST items : bigint );
+ON                Dataset1 ( UNNEST items : bigint ) EXCLUDE UNKNOWN KEY;
 
 -- Single UNNEST, open index.
 FROM       Dataset1 D1
diff --git a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/array-index/select-quantified-queries/multiple-quantifiers/query2.sqlpp b/asterixdb/asterix-app/src/test/resources/optimizerts/queries/array-index/select-quantified-queries/multiple-quantifiers/query2.sqlpp
index bf46296..8199a40 100644
--- a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/array-index/select-quantified-queries/multiple-quantifiers/query2.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/optimizerts/queries/array-index/select-quantified-queries/multiple-quantifiers/query2.sqlpp
@@ -29,7 +29,7 @@
 CREATE DATASET    Dataset1 (TestType)
 PRIMARY KEY        _id AUTOGENERATED;
 CREATE INDEX      d1Idx
-ON                Dataset1 ( UNNEST items );
+ON                Dataset1 ( UNNEST items ) EXCLUDE UNKNOWN KEY;
 
 -- Single UNNEST, closed index.
 FROM       Dataset1 D1
diff --git a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/array-index/select-quantified-queries/multiple-quantifiers/query3.sqlpp b/asterixdb/asterix-app/src/test/resources/optimizerts/queries/array-index/select-quantified-queries/multiple-quantifiers/query3.sqlpp
index 03b0d72..9dcba5e 100644
--- a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/array-index/select-quantified-queries/multiple-quantifiers/query3.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/optimizerts/queries/array-index/select-quantified-queries/multiple-quantifiers/query3.sqlpp
@@ -29,7 +29,8 @@
 PRIMARY KEY        _id AUTOGENERATED;
 CREATE INDEX      d1Idx
 ON                Dataset1 ( UNNEST items
-                             SELECT item : bigint );
+                             SELECT item : bigint )
+EXCLUDE UNKNOWN KEY;
 
 -- Single UNNEST w/ SELECT, open index.
 FROM       Dataset1 D1
diff --git a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/array-index/select-quantified-queries/multiple-quantifiers/query4.sqlpp b/asterixdb/asterix-app/src/test/resources/optimizerts/queries/array-index/select-quantified-queries/multiple-quantifiers/query4.sqlpp
index 0bef658..30f36c8 100644
--- a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/array-index/select-quantified-queries/multiple-quantifiers/query4.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/optimizerts/queries/array-index/select-quantified-queries/multiple-quantifiers/query4.sqlpp
@@ -32,7 +32,8 @@
 PRIMARY KEY        _id AUTOGENERATED;
 CREATE INDEX      d1Idx
 ON                Dataset1 ( UNNEST items
-                             SELECT item );
+                             SELECT item )
+EXCLUDE UNKNOWN KEY;
 
 -- Single UNNEST w/ SELECT, closed index.
 FROM       Dataset1 D1
diff --git a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/array-index/select-quantified-queries/multiple-quantifiers/query5.sqlpp b/asterixdb/asterix-app/src/test/resources/optimizerts/queries/array-index/select-quantified-queries/multiple-quantifiers/query5.sqlpp
index 5f6fcb4..1fdabbd 100644
--- a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/array-index/select-quantified-queries/multiple-quantifiers/query5.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/optimizerts/queries/array-index/select-quantified-queries/multiple-quantifiers/query5.sqlpp
@@ -30,7 +30,8 @@
 CREATE INDEX      d1Idx
 ON                Dataset1 ( UNNEST outer_items
                              UNNEST inner_items
-                             SELECT item : bigint );
+                             SELECT item : bigint )
+EXCLUDE UNKNOWN KEY;
 
 -- Double UNNEST w/ SELECT, open index.
 FROM       Dataset1 D1
diff --git a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/array-index/select-quantified-queries/multiple-quantifiers/query6.sqlpp b/asterixdb/asterix-app/src/test/resources/optimizerts/queries/array-index/select-quantified-queries/multiple-quantifiers/query6.sqlpp
index 7e529dc..dee73ad 100644
--- a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/array-index/select-quantified-queries/multiple-quantifiers/query6.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/optimizerts/queries/array-index/select-quantified-queries/multiple-quantifiers/query6.sqlpp
@@ -35,7 +35,8 @@
 CREATE INDEX      d1Idx
 ON                Dataset1 ( UNNEST outer_items
                              UNNEST inner_items
-                             SELECT item );
+                             SELECT item )
+EXCLUDE UNKNOWN KEY;
 
 -- Double UNNEST w/ SELECT, open index.
 FROM       Dataset1 D1
diff --git a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/array-index/select-quantified-queries/multiple-quantifiers/query7.sqlpp b/asterixdb/asterix-app/src/test/resources/optimizerts/queries/array-index/select-quantified-queries/multiple-quantifiers/query7.sqlpp
index cbef4a7..7b5c221 100644
--- a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/array-index/select-quantified-queries/multiple-quantifiers/query7.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/optimizerts/queries/array-index/select-quantified-queries/multiple-quantifiers/query7.sqlpp
@@ -32,7 +32,8 @@
 PRIMARY KEY        _id AUTOGENERATED;
 CREATE INDEX      d1Idx
 ON                Dataset1 ( UNNEST items
-                             SELECT item );
+                             SELECT item )
+EXCLUDE UNKNOWN KEY;
 
 -- Single UNNEST w/ SELECT, closed index.
 FROM       Dataset1 D1
diff --git a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/array-index/select-quantified-queries/multiple-quantifiers/query8.sqlpp b/asterixdb/asterix-app/src/test/resources/optimizerts/queries/array-index/select-quantified-queries/multiple-quantifiers/query8.sqlpp
index 27080e4..e930ac9 100644
--- a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/array-index/select-quantified-queries/multiple-quantifiers/query8.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/optimizerts/queries/array-index/select-quantified-queries/multiple-quantifiers/query8.sqlpp
@@ -35,7 +35,8 @@
 CREATE INDEX      d1Idx
 ON                Dataset1 ( UNNEST outer_items
                              UNNEST inner_items
-                             SELECT item );
+                             SELECT item )
+EXCLUDE UNKNOWN KEY;
 
 -- Double UNNEST w/ SELECT, open index.
 FROM       Dataset1 D1
diff --git a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/array-index/select-quantified-queries/multiple-quantifiers/query9.sqlpp b/asterixdb/asterix-app/src/test/resources/optimizerts/queries/array-index/select-quantified-queries/multiple-quantifiers/query9.sqlpp
index 32ae924..8a48b3d 100644
--- a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/array-index/select-quantified-queries/multiple-quantifiers/query9.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/optimizerts/queries/array-index/select-quantified-queries/multiple-quantifiers/query9.sqlpp
@@ -36,7 +36,8 @@
 CREATE INDEX      d1Idx
 ON                Dataset1 ( UNNEST outer_items
                              UNNEST inner_items
-                             SELECT item );
+                             SELECT item )
+EXCLUDE UNKNOWN KEY;
 
 -- Double UNNEST w/ SELECT, open index and multiple quantification.
 FROM       Dataset1 D1
diff --git a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/array-index/select-quantified-queries/use-case-1/query1.sqlpp b/asterixdb/asterix-app/src/test/resources/optimizerts/queries/array-index/select-quantified-queries/use-case-1/query1.sqlpp
index f267701..2f61919 100644
--- a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/array-index/select-quantified-queries/use-case-1/query1.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/optimizerts/queries/array-index/select-quantified-queries/use-case-1/query1.sqlpp
@@ -29,7 +29,7 @@
 };
 
 CREATE DATASET YelpCheckin(CheckinType) PRIMARY KEY checkin_id AUTOGENERATED;
-CREATE INDEX IdxYelpCheckinDates ON YelpCheckin (UNNEST dates);
+CREATE INDEX IdxYelpCheckinDates ON YelpCheckin (UNNEST dates) EXCLUDE UNKNOWN KEY;
 
 SELECT C.business_id
 FROM YelpCheckin C 
diff --git a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/array-index/select-quantified-queries/use-case-1/query2.sqlpp b/asterixdb/asterix-app/src/test/resources/optimizerts/queries/array-index/select-quantified-queries/use-case-1/query2.sqlpp
index 6cbfdff..710fcea 100644
--- a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/array-index/select-quantified-queries/use-case-1/query2.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/optimizerts/queries/array-index/select-quantified-queries/use-case-1/query2.sqlpp
@@ -29,7 +29,7 @@
 };
 
 CREATE DATASET YelpCheckin(CheckinType) PRIMARY KEY checkin_id AUTOGENERATED;
-CREATE INDEX IdxYelpCheckinDates ON YelpCheckin (UNNEST dates);
+CREATE INDEX IdxYelpCheckinDates ON YelpCheckin (UNNEST dates) EXCLUDE UNKNOWN KEY;
 
 SELECT COUNT(*)
 FROM YelpCheckin C
diff --git a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/array-index/select-quantified-queries/use-case-1/query3.sqlpp b/asterixdb/asterix-app/src/test/resources/optimizerts/queries/array-index/select-quantified-queries/use-case-1/query3.sqlpp
index cc2346c..25174e9 100644
--- a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/array-index/select-quantified-queries/use-case-1/query3.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/optimizerts/queries/array-index/select-quantified-queries/use-case-1/query3.sqlpp
@@ -29,7 +29,7 @@
 };
 
 CREATE DATASET YelpCheckin(CheckinType) PRIMARY KEY checkin_id AUTOGENERATED;
-CREATE INDEX IdxYelpCheckinDates ON YelpCheckin (UNNEST dates);
+CREATE INDEX IdxYelpCheckinDates ON YelpCheckin (UNNEST dates) EXCLUDE UNKNOWN KEY;
 
 SELECT COUNT(*)
 FROM YelpCheckin C
diff --git a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/array-index/select-quantified-queries/use-case-1/query4.sqlpp b/asterixdb/asterix-app/src/test/resources/optimizerts/queries/array-index/select-quantified-queries/use-case-1/query4.sqlpp
index 0fa7d07..2082e73 100644
--- a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/array-index/select-quantified-queries/use-case-1/query4.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/optimizerts/queries/array-index/select-quantified-queries/use-case-1/query4.sqlpp
@@ -29,7 +29,7 @@
 };
 
 CREATE DATASET YelpCheckin(CheckinType) PRIMARY KEY checkin_id AUTOGENERATED;
-CREATE INDEX IdxYelpCheckinDates ON YelpCheckin (UNNEST dates);
+CREATE INDEX IdxYelpCheckinDates ON YelpCheckin (UNNEST dates) EXCLUDE UNKNOWN KEY;
 
 SELECT COUNT(*)
 FROM YelpCheckin C
diff --git a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/array-index/select-quantified-queries/use-case-1/query5.sqlpp b/asterixdb/asterix-app/src/test/resources/optimizerts/queries/array-index/select-quantified-queries/use-case-1/query5.sqlpp
index b2407a8..11a5929 100644
--- a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/array-index/select-quantified-queries/use-case-1/query5.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/optimizerts/queries/array-index/select-quantified-queries/use-case-1/query5.sqlpp
@@ -31,7 +31,8 @@
 CREATE DATASET    YelpCheckin(CheckinType)
 PRIMARY KEY       checkin_id AUTOGENERATED;
 CREATE INDEX      IdxYelpCheckinDates
-ON                YelpCheckin (UNNEST dates);
+ON                YelpCheckin (UNNEST dates)
+EXCLUDE UNKNOWN KEY;
 
 -- The following query should NOT be optimized.
 FROM     YelpCheckin C
diff --git a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/array-index/select-quantified-queries/use-case-2/query1.sqlpp b/asterixdb/asterix-app/src/test/resources/optimizerts/queries/array-index/select-quantified-queries/use-case-2/query1.sqlpp
index 145f8f21..34396bf 100644
--- a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/array-index/select-quantified-queries/use-case-2/query1.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/optimizerts/queries/array-index/select-quantified-queries/use-case-2/query1.sqlpp
@@ -32,7 +32,7 @@
 };
 
 CREATE DATASET YelpCheckin(CheckinType) PRIMARY KEY checkin_id AUTOGENERATED;
-CREATE INDEX IdxYelpCheckinDates ON YelpCheckin (UNNEST checkin_times.dates);
+CREATE INDEX IdxYelpCheckinDates ON YelpCheckin (UNNEST checkin_times.dates) EXCLUDE UNKNOWN KEY;
 
 SELECT C.business_id
 FROM YelpCheckin C
diff --git a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/array-index/select-quantified-queries/use-case-2/query2.sqlpp b/asterixdb/asterix-app/src/test/resources/optimizerts/queries/array-index/select-quantified-queries/use-case-2/query2.sqlpp
index 65e15fc..b8e1a49 100644
--- a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/array-index/select-quantified-queries/use-case-2/query2.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/optimizerts/queries/array-index/select-quantified-queries/use-case-2/query2.sqlpp
@@ -32,7 +32,7 @@
 };
 
 CREATE DATASET YelpCheckin(CheckinType) PRIMARY KEY checkin_id AUTOGENERATED;
-CREATE INDEX IdxYelpCheckinDates ON YelpCheckin (UNNEST checkin_times.dates);
+CREATE INDEX IdxYelpCheckinDates ON YelpCheckin (UNNEST checkin_times.dates) EXCLUDE UNKNOWN KEY;
 
 SELECT COUNT(*)
 FROM YelpCheckin C
diff --git a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/array-index/select-quantified-queries/use-case-2/query3.sqlpp b/asterixdb/asterix-app/src/test/resources/optimizerts/queries/array-index/select-quantified-queries/use-case-2/query3.sqlpp
index 0a08372..a344125 100644
--- a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/array-index/select-quantified-queries/use-case-2/query3.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/optimizerts/queries/array-index/select-quantified-queries/use-case-2/query3.sqlpp
@@ -32,7 +32,7 @@
 };
 
 CREATE DATASET YelpCheckin(CheckinType) PRIMARY KEY checkin_id AUTOGENERATED;
-CREATE INDEX IdxYelpCheckinDates ON YelpCheckin (UNNEST checkin_times.dates);
+CREATE INDEX IdxYelpCheckinDates ON YelpCheckin (UNNEST checkin_times.dates) EXCLUDE UNKNOWN KEY;
 
 SELECT COUNT(*)
 FROM YelpCheckin C
diff --git a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/array-index/select-quantified-queries/use-case-2/query4.sqlpp b/asterixdb/asterix-app/src/test/resources/optimizerts/queries/array-index/select-quantified-queries/use-case-2/query4.sqlpp
index 4a4a322..760f1f2 100644
--- a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/array-index/select-quantified-queries/use-case-2/query4.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/optimizerts/queries/array-index/select-quantified-queries/use-case-2/query4.sqlpp
@@ -34,7 +34,8 @@
 CREATE DATASET    YelpCheckin(CheckinType)
 PRIMARY KEY       checkin_id AUTOGENERATED;
 CREATE INDEX      IdxYelpCheckinDates
-ON                YelpCheckin ( UNNEST checkin_times.dates );
+ON                YelpCheckin ( UNNEST checkin_times.dates )
+EXCLUDE UNKNOWN KEY;
 
 -- This query should NOT be optimized.
 FROM     YelpCheckin C
diff --git a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/array-index/select-quantified-queries/use-case-2/query5.sqlpp b/asterixdb/asterix-app/src/test/resources/optimizerts/queries/array-index/select-quantified-queries/use-case-2/query5.sqlpp
index 7f67c73..a3e6912 100644
--- a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/array-index/select-quantified-queries/use-case-2/query5.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/optimizerts/queries/array-index/select-quantified-queries/use-case-2/query5.sqlpp
@@ -34,7 +34,8 @@
 CREATE DATASET    YelpCheckin(CheckinType)
 PRIMARY KEY       checkin_id AUTOGENERATED;
 CREATE INDEX      IdxYelpCheckinDates
-ON                YelpCheckin ( UNNEST checkin_times.dates );
+ON                YelpCheckin ( UNNEST checkin_times.dates )
+EXCLUDE UNKNOWN KEY;
 
 -- This query should NOT be optimized.
 FROM     YelpCheckin C
diff --git a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/array-index/select-quantified-queries/use-case-3/query1.sqlpp b/asterixdb/asterix-app/src/test/resources/optimizerts/queries/array-index/select-quantified-queries/use-case-3/query1.sqlpp
index 3c07b9d..eb78853 100644
--- a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/array-index/select-quantified-queries/use-case-3/query1.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/optimizerts/queries/array-index/select-quantified-queries/use-case-3/query1.sqlpp
@@ -32,7 +32,7 @@
 };
 
 CREATE DATASET YelpCheckin(CheckinType) PRIMARY KEY checkin_id AUTOGENERATED;
-CREATE INDEX IdxYelpCheckinDates ON YelpCheckin (UNNEST checkin_times SELECT date);
+CREATE INDEX IdxYelpCheckinDates ON YelpCheckin (UNNEST checkin_times SELECT date) EXCLUDE UNKNOWN KEY;
 
 SELECT C.business_id
 FROM YelpCheckin C
diff --git a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/array-index/select-quantified-queries/use-case-3/query2.sqlpp b/asterixdb/asterix-app/src/test/resources/optimizerts/queries/array-index/select-quantified-queries/use-case-3/query2.sqlpp
index c8d5c23..de5e160 100644
--- a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/array-index/select-quantified-queries/use-case-3/query2.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/optimizerts/queries/array-index/select-quantified-queries/use-case-3/query2.sqlpp
@@ -32,7 +32,7 @@
 };
 
 CREATE DATASET YelpCheckin(CheckinType) PRIMARY KEY checkin_id AUTOGENERATED;
-CREATE INDEX IdxYelpCheckinDates ON YelpCheckin (UNNEST checkin_times SELECT date);
+CREATE INDEX IdxYelpCheckinDates ON YelpCheckin (UNNEST checkin_times SELECT date) EXCLUDE UNKNOWN KEY;
 
 SELECT C.business_id
 FROM YelpCheckin C
diff --git a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/array-index/select-quantified-queries/use-case-3/query3.sqlpp b/asterixdb/asterix-app/src/test/resources/optimizerts/queries/array-index/select-quantified-queries/use-case-3/query3.sqlpp
index d1fe997..fbdc728 100644
--- a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/array-index/select-quantified-queries/use-case-3/query3.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/optimizerts/queries/array-index/select-quantified-queries/use-case-3/query3.sqlpp
@@ -32,7 +32,7 @@
 };
 
 CREATE DATASET YelpCheckin(CheckinType) PRIMARY KEY checkin_id AUTOGENERATED;
-CREATE INDEX IdxYelpCheckinDates ON YelpCheckin (UNNEST checkin_times SELECT date);
+CREATE INDEX IdxYelpCheckinDates ON YelpCheckin (UNNEST checkin_times SELECT date) EXCLUDE UNKNOWN KEY;
 
 SELECT C.business_id
 FROM YelpCheckin C
diff --git a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/array-index/select-quantified-queries/use-case-3/query4.sqlpp b/asterixdb/asterix-app/src/test/resources/optimizerts/queries/array-index/select-quantified-queries/use-case-3/query4.sqlpp
index 129f151..6660a35 100644
--- a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/array-index/select-quantified-queries/use-case-3/query4.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/optimizerts/queries/array-index/select-quantified-queries/use-case-3/query4.sqlpp
@@ -34,7 +34,8 @@
 CREATE DATASET    YelpCheckin(CheckinType)
 PRIMARY KEY       checkin_id AUTOGENERATED;
 CREATE INDEX      IdxYelpCheckinDates
-ON                YelpCheckin ( UNNEST checkin_times SELECT date );
+ON                YelpCheckin ( UNNEST checkin_times SELECT date )
+EXCLUDE UNKNOWN KEY;
 
 -- The following query should NOT be optimized.
 FROM    YelpCheckin C
diff --git a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/array-index/select-quantified-queries/use-case-4/query1.sqlpp b/asterixdb/asterix-app/src/test/resources/optimizerts/queries/array-index/select-quantified-queries/use-case-4/query1.sqlpp
index 1bd9564..1ab22fe 100644
--- a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/array-index/select-quantified-queries/use-case-4/query1.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/optimizerts/queries/array-index/select-quantified-queries/use-case-4/query1.sqlpp
@@ -32,7 +32,7 @@
 };
 
 CREATE DATASET YelpCheckin(CheckinType) PRIMARY KEY checkin_id AUTOGENERATED;
-CREATE INDEX IdxYelpCheckinDates ON YelpCheckin (UNNEST checkin_times UNNEST dates);
+CREATE INDEX IdxYelpCheckinDates ON YelpCheckin (UNNEST checkin_times UNNEST dates) EXCLUDE UNKNOWN KEY;
 
 SELECT C.business_id
 FROM YelpCheckin C
diff --git a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/array-index/select-quantified-queries/use-case-4/query2.sqlpp b/asterixdb/asterix-app/src/test/resources/optimizerts/queries/array-index/select-quantified-queries/use-case-4/query2.sqlpp
index 204e589..4f3b19c 100644
--- a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/array-index/select-quantified-queries/use-case-4/query2.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/optimizerts/queries/array-index/select-quantified-queries/use-case-4/query2.sqlpp
@@ -32,7 +32,7 @@
 };
 
 CREATE DATASET YelpCheckin(CheckinType) PRIMARY KEY checkin_id AUTOGENERATED;
-CREATE INDEX IdxYelpCheckinDates ON YelpCheckin (UNNEST checkin_times UNNEST dates);
+CREATE INDEX IdxYelpCheckinDates ON YelpCheckin (UNNEST checkin_times UNNEST dates) EXCLUDE UNKNOWN KEY;
 
 SELECT C.business_id
 FROM YelpCheckin C
diff --git a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/array-index/select-quantified-queries/use-case-4/query3.sqlpp b/asterixdb/asterix-app/src/test/resources/optimizerts/queries/array-index/select-quantified-queries/use-case-4/query3.sqlpp
index 160805a..4bd2d75 100644
--- a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/array-index/select-quantified-queries/use-case-4/query3.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/optimizerts/queries/array-index/select-quantified-queries/use-case-4/query3.sqlpp
@@ -32,7 +32,7 @@
 };
 
 CREATE DATASET YelpCheckin(CheckinType) PRIMARY KEY checkin_id AUTOGENERATED;
-CREATE INDEX IdxYelpCheckinDates ON YelpCheckin (UNNEST checkin_times UNNEST dates);
+CREATE INDEX IdxYelpCheckinDates ON YelpCheckin (UNNEST checkin_times UNNEST dates) EXCLUDE UNKNOWN KEY;
 
 SELECT C.business_id
 FROM YelpCheckin C
diff --git a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/array-index/select-quantified-queries/use-case-4/query4.sqlpp b/asterixdb/asterix-app/src/test/resources/optimizerts/queries/array-index/select-quantified-queries/use-case-4/query4.sqlpp
index 4d094a1..1a9d72b 100644
--- a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/array-index/select-quantified-queries/use-case-4/query4.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/optimizerts/queries/array-index/select-quantified-queries/use-case-4/query4.sqlpp
@@ -32,7 +32,7 @@
 };
 
 CREATE DATASET YelpCheckin(CheckinType) PRIMARY KEY checkin_id AUTOGENERATED;
-CREATE INDEX IdxYelpCheckinDates ON YelpCheckin (UNNEST checkin_times UNNEST dates);
+CREATE INDEX IdxYelpCheckinDates ON YelpCheckin (UNNEST checkin_times UNNEST dates) EXCLUDE UNKNOWN KEY;
 
 FROM    YelpCheckin C
 WHERE   SOME CT IN C.checkin_times
diff --git a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/array-index/select-quantified-queries/use-case-4/query5.sqlpp b/asterixdb/asterix-app/src/test/resources/optimizerts/queries/array-index/select-quantified-queries/use-case-4/query5.sqlpp
index e63747f..809dd09 100644
--- a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/array-index/select-quantified-queries/use-case-4/query5.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/optimizerts/queries/array-index/select-quantified-queries/use-case-4/query5.sqlpp
@@ -32,7 +32,7 @@
 };
 
 CREATE DATASET YelpCheckin(CheckinType) PRIMARY KEY checkin_id AUTOGENERATED;
-CREATE INDEX IdxYelpCheckinDates ON YelpCheckin (UNNEST checkin_times UNNEST dates);
+CREATE INDEX IdxYelpCheckinDates ON YelpCheckin (UNNEST checkin_times UNNEST dates) EXCLUDE UNKNOWN KEY;
 
 FROM    YelpCheckin C
 WHERE   SOME AND EVERY CT IN C.checkin_times
diff --git a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/array-index/select-quantified-queries/use-case-4/query6.sqlpp b/asterixdb/asterix-app/src/test/resources/optimizerts/queries/array-index/select-quantified-queries/use-case-4/query6.sqlpp
index 1426b3b..5b53678 100644
--- a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/array-index/select-quantified-queries/use-case-4/query6.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/optimizerts/queries/array-index/select-quantified-queries/use-case-4/query6.sqlpp
@@ -32,7 +32,7 @@
 };
 
 CREATE DATASET YelpCheckin(CheckinType) PRIMARY KEY checkin_id AUTOGENERATED;
-CREATE INDEX IdxYelpCheckinDates ON YelpCheckin (UNNEST checkin_times UNNEST dates);
+CREATE INDEX IdxYelpCheckinDates ON YelpCheckin (UNNEST checkin_times UNNEST dates) EXCLUDE UNKNOWN KEY;
 
 // This should NOT be optimized, we are missing the non-emptiness conjunct.
 FROM    YelpCheckin C
diff --git a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/array-index/select-quantified-queries/use-case-4/query7.sqlpp b/asterixdb/asterix-app/src/test/resources/optimizerts/queries/array-index/select-quantified-queries/use-case-4/query7.sqlpp
index 0d54915..f2887a1 100644
--- a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/array-index/select-quantified-queries/use-case-4/query7.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/optimizerts/queries/array-index/select-quantified-queries/use-case-4/query7.sqlpp
@@ -32,7 +32,7 @@
 };
 
 CREATE DATASET YelpCheckin(CheckinType) PRIMARY KEY checkin_id AUTOGENERATED;
-CREATE INDEX IdxYelpCheckinDates ON YelpCheckin (UNNEST checkin_times UNNEST dates);
+CREATE INDEX IdxYelpCheckinDates ON YelpCheckin (UNNEST checkin_times UNNEST dates) EXCLUDE UNKNOWN KEY;
 
 FROM    YelpCheckin C
 WHERE   0 < LEN(C.checkin_times) AND 
diff --git a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/array-index/select-unnest-queries/closed/use-case-1/query1.sqlpp b/asterixdb/asterix-app/src/test/resources/optimizerts/queries/array-index/select-unnest-queries/closed/use-case-1/query1.sqlpp
index d4bb5ff..522e988 100644
--- a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/array-index/select-unnest-queries/closed/use-case-1/query1.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/optimizerts/queries/array-index/select-unnest-queries/closed/use-case-1/query1.sqlpp
@@ -29,7 +29,7 @@
 };
 
 CREATE DATASET YelpCheckin(CheckinType) PRIMARY KEY checkin_id AUTOGENERATED;
-CREATE INDEX IdxYelpCheckinDates ON YelpCheckin (UNNEST dates);
+CREATE INDEX IdxYelpCheckinDates ON YelpCheckin (UNNEST dates) EXCLUDE UNKNOWN KEY;
 
 SELECT C.business_id
 FROM YelpCheckin C, C.dates D
diff --git a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/array-index/select-unnest-queries/closed/use-case-1/query2.sqlpp b/asterixdb/asterix-app/src/test/resources/optimizerts/queries/array-index/select-unnest-queries/closed/use-case-1/query2.sqlpp
index ae997b3..d097dcc 100644
--- a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/array-index/select-unnest-queries/closed/use-case-1/query2.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/optimizerts/queries/array-index/select-unnest-queries/closed/use-case-1/query2.sqlpp
@@ -29,7 +29,7 @@
 };
 
 CREATE DATASET YelpCheckin(CheckinType) PRIMARY KEY checkin_id AUTOGENERATED;
-CREATE INDEX IdxYelpCheckinDates ON YelpCheckin (UNNEST dates);
+CREATE INDEX IdxYelpCheckinDates ON YelpCheckin (UNNEST dates) EXCLUDE UNKNOWN KEY;
 
 SELECT COUNT(*)
 FROM YelpCheckin C, C.dates D
diff --git a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/array-index/select-unnest-queries/closed/use-case-2/query1.sqlpp b/asterixdb/asterix-app/src/test/resources/optimizerts/queries/array-index/select-unnest-queries/closed/use-case-2/query1.sqlpp
index 602e924..7f2967c 100644
--- a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/array-index/select-unnest-queries/closed/use-case-2/query1.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/optimizerts/queries/array-index/select-unnest-queries/closed/use-case-2/query1.sqlpp
@@ -32,7 +32,7 @@
 };
 
 CREATE DATASET YelpCheckin(CheckinType) PRIMARY KEY checkin_id AUTOGENERATED;
-CREATE INDEX IdxYelpCheckinDates ON YelpCheckin (UNNEST checkin_times.dates);
+CREATE INDEX IdxYelpCheckinDates ON YelpCheckin (UNNEST checkin_times.dates) EXCLUDE UNKNOWN KEY;
 
 SELECT C.business_id
 FROM YelpCheckin C, C.checkin_times.dates D
diff --git a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/array-index/select-unnest-queries/closed/use-case-2/query2.sqlpp b/asterixdb/asterix-app/src/test/resources/optimizerts/queries/array-index/select-unnest-queries/closed/use-case-2/query2.sqlpp
index 0d94cce..ed7fffb 100644
--- a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/array-index/select-unnest-queries/closed/use-case-2/query2.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/optimizerts/queries/array-index/select-unnest-queries/closed/use-case-2/query2.sqlpp
@@ -32,7 +32,7 @@
 };
 
 CREATE DATASET YelpCheckin(CheckinType) PRIMARY KEY checkin_id AUTOGENERATED;
-CREATE INDEX IdxYelpCheckinDates ON YelpCheckin (UNNEST checkin_times.dates);
+CREATE INDEX IdxYelpCheckinDates ON YelpCheckin (UNNEST checkin_times.dates) EXCLUDE UNKNOWN KEY;
 
 SELECT COUNT(*)
 FROM YelpCheckin C, C.checkin_times.dates D
diff --git a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/array-index/select-unnest-queries/closed/use-case-3/query1.sqlpp b/asterixdb/asterix-app/src/test/resources/optimizerts/queries/array-index/select-unnest-queries/closed/use-case-3/query1.sqlpp
index 52d826a..9d86aab 100644
--- a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/array-index/select-unnest-queries/closed/use-case-3/query1.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/optimizerts/queries/array-index/select-unnest-queries/closed/use-case-3/query1.sqlpp
@@ -32,7 +32,7 @@
 };
 
 CREATE DATASET YelpCheckin(CheckinType) PRIMARY KEY checkin_id AUTOGENERATED;
-CREATE INDEX IdxYelpCheckinDates ON YelpCheckin (UNNEST checkin_times SELECT date);
+CREATE INDEX IdxYelpCheckinDates ON YelpCheckin (UNNEST checkin_times SELECT date) EXCLUDE UNKNOWN KEY;
 
 SELECT C.business_id
 FROM YelpCheckin C, C.checkin_times D
diff --git a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/array-index/select-unnest-queries/closed/use-case-3/query2.sqlpp b/asterixdb/asterix-app/src/test/resources/optimizerts/queries/array-index/select-unnest-queries/closed/use-case-3/query2.sqlpp
index 0755f55..5e89ea4 100644
--- a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/array-index/select-unnest-queries/closed/use-case-3/query2.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/optimizerts/queries/array-index/select-unnest-queries/closed/use-case-3/query2.sqlpp
@@ -32,7 +32,7 @@
 };
 
 CREATE DATASET YelpCheckin(CheckinType) PRIMARY KEY checkin_id AUTOGENERATED;
-CREATE INDEX IdxYelpCheckinDates ON YelpCheckin (UNNEST checkin_times SELECT date);
+CREATE INDEX IdxYelpCheckinDates ON YelpCheckin (UNNEST checkin_times SELECT date) EXCLUDE UNKNOWN KEY;
 
 SELECT COUNT(*)
 FROM YelpCheckin C, C.checkin_times D
diff --git a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/array-index/select-unnest-queries/closed/use-case-3/query3.sqlpp b/asterixdb/asterix-app/src/test/resources/optimizerts/queries/array-index/select-unnest-queries/closed/use-case-3/query3.sqlpp
index 49949a0..d8ec1ab 100644
--- a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/array-index/select-unnest-queries/closed/use-case-3/query3.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/optimizerts/queries/array-index/select-unnest-queries/closed/use-case-3/query3.sqlpp
@@ -32,7 +32,7 @@
 };
 
 CREATE DATASET YelpCheckin(CheckinType) PRIMARY KEY checkin_id AUTOGENERATED;
-CREATE INDEX IdxYelpCheckinDates ON YelpCheckin (UNNEST checkin_times SELECT date);
+CREATE INDEX IdxYelpCheckinDates ON YelpCheckin (UNNEST checkin_times SELECT date) EXCLUDE UNKNOWN KEY;
 
 SELECT C.business_id
 FROM YelpCheckin C, C.checkin_times D
diff --git a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/array-index/select-unnest-queries/closed/use-case-4/query1.sqlpp b/asterixdb/asterix-app/src/test/resources/optimizerts/queries/array-index/select-unnest-queries/closed/use-case-4/query1.sqlpp
index 2e3c0a8..6009d3d 100644
--- a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/array-index/select-unnest-queries/closed/use-case-4/query1.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/optimizerts/queries/array-index/select-unnest-queries/closed/use-case-4/query1.sqlpp
@@ -32,7 +32,7 @@
 };
 
 CREATE DATASET YelpCheckin(CheckinType) PRIMARY KEY checkin_id AUTOGENERATED;
-CREATE INDEX IdxYelpCheckinDates ON YelpCheckin (UNNEST checkin_times UNNEST dates);
+CREATE INDEX IdxYelpCheckinDates ON YelpCheckin (UNNEST checkin_times UNNEST dates) EXCLUDE UNKNOWN KEY;
 
 SELECT C.business_id
 FROM YelpCheckin C, C.checkin_times CT, CT.dates D
diff --git a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/array-index/select-unnest-queries/closed/use-case-4/query2.sqlpp b/asterixdb/asterix-app/src/test/resources/optimizerts/queries/array-index/select-unnest-queries/closed/use-case-4/query2.sqlpp
index 89dc790..0f2cfc6 100644
--- a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/array-index/select-unnest-queries/closed/use-case-4/query2.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/optimizerts/queries/array-index/select-unnest-queries/closed/use-case-4/query2.sqlpp
@@ -32,7 +32,7 @@
 };
 
 CREATE DATASET YelpCheckin(CheckinType) PRIMARY KEY checkin_id AUTOGENERATED;
-CREATE INDEX IdxYelpCheckinDates ON YelpCheckin (UNNEST checkin_times UNNEST dates);
+CREATE INDEX IdxYelpCheckinDates ON YelpCheckin (UNNEST checkin_times UNNEST dates) EXCLUDE UNKNOWN KEY;
 
 SELECT COUNT(*)
 FROM YelpCheckin C, C.checkin_times CT, CT.dates D
diff --git a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/array-index/select-unnest-queries/closed/with-3-level-record-path/query1.sqlpp b/asterixdb/asterix-app/src/test/resources/optimizerts/queries/array-index/select-unnest-queries/closed/with-3-level-record-path/query1.sqlpp
index 660f62b..8baedb2 100644
--- a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/array-index/select-unnest-queries/closed/with-3-level-record-path/query1.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/optimizerts/queries/array-index/select-unnest-queries/closed/with-3-level-record-path/query1.sqlpp
@@ -36,7 +36,8 @@
 };
 
 CREATE DATASET YelpCheckin(CheckinType) PRIMARY KEY checkin_id AUTOGENERATED;
-CREATE INDEX IdxYelpCheckinDates ON YelpCheckin (UNNEST checkin_data.checkin_temporal.checkin_times.dates);
+CREATE INDEX IdxYelpCheckinDates ON YelpCheckin (UNNEST checkin_data.checkin_temporal.checkin_times.dates)
+EXCLUDE UNKNOWN KEY;
 
 SELECT C.business_id
 FROM YelpCheckin C, C.checkin_data.checkin_temporal.checkin_times.dates D
diff --git a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/array-index/select-unnest-queries/closed/with-3-level-record-path/query2.sqlpp b/asterixdb/asterix-app/src/test/resources/optimizerts/queries/array-index/select-unnest-queries/closed/with-3-level-record-path/query2.sqlpp
index ce7fad8..8868afb 100644
--- a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/array-index/select-unnest-queries/closed/with-3-level-record-path/query2.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/optimizerts/queries/array-index/select-unnest-queries/closed/with-3-level-record-path/query2.sqlpp
@@ -36,7 +36,8 @@
 };
 
 CREATE DATASET YelpCheckin(CheckinType) PRIMARY KEY checkin_id AUTOGENERATED;
-CREATE INDEX IdxYelpCheckinDates ON YelpCheckin (UNNEST checkin_data.checkin_temporal.checkin_times.dates);
+CREATE INDEX IdxYelpCheckinDates ON YelpCheckin (UNNEST checkin_data.checkin_temporal.checkin_times.dates)
+EXCLUDE UNKNOWN KEY;
 
 SELECT COUNT(*)
 FROM YelpCheckin C, C.checkin_data.checkin_temporal.checkin_times.dates D
diff --git a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/array-index/select-unnest-queries/closed/with-composite-pk/query1.sqlpp b/asterixdb/asterix-app/src/test/resources/optimizerts/queries/array-index/select-unnest-queries/closed/with-composite-pk/query1.sqlpp
index 80a6bcc..5592328 100644
--- a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/array-index/select-unnest-queries/closed/with-composite-pk/query1.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/optimizerts/queries/array-index/select-unnest-queries/closed/with-composite-pk/query1.sqlpp
@@ -29,7 +29,7 @@
 };
 
 CREATE DATASET YelpCheckin(CheckinType) PRIMARY KEY checkin_id, business_id;
-CREATE INDEX IdxYelpCheckinDates ON YelpCheckin (UNNEST dates);
+CREATE INDEX IdxYelpCheckinDates ON YelpCheckin (UNNEST dates) EXCLUDE UNKNOWN KEY;
 
 SELECT C.business_id
 FROM YelpCheckin C, C.dates D
diff --git a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/array-index/select-unnest-queries/closed/with-composite-pk/query2.sqlpp b/asterixdb/asterix-app/src/test/resources/optimizerts/queries/array-index/select-unnest-queries/closed/with-composite-pk/query2.sqlpp
index 3ea8ac2..c8e894f 100644
--- a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/array-index/select-unnest-queries/closed/with-composite-pk/query2.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/optimizerts/queries/array-index/select-unnest-queries/closed/with-composite-pk/query2.sqlpp
@@ -29,7 +29,7 @@
 };
 
 CREATE DATASET YelpCheckin(CheckinType) PRIMARY KEY checkin_id, business_id;
-CREATE INDEX IdxYelpCheckinDates ON YelpCheckin (UNNEST dates);
+CREATE INDEX IdxYelpCheckinDates ON YelpCheckin (UNNEST dates) EXCLUDE UNKNOWN KEY;
 
 SELECT COUNT(*)
 FROM YelpCheckin C, C.dates D
diff --git a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/array-index/select-unnest-queries/closed/with-composite-sk/query1.sqlpp b/asterixdb/asterix-app/src/test/resources/optimizerts/queries/array-index/select-unnest-queries/closed/with-composite-sk/query1.sqlpp
index b9970c5..6520acf 100644
--- a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/array-index/select-unnest-queries/closed/with-composite-sk/query1.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/optimizerts/queries/array-index/select-unnest-queries/closed/with-composite-sk/query1.sqlpp
@@ -32,7 +32,7 @@
 };
 
 CREATE DATASET YelpCheckin(CheckinType) PRIMARY KEY checkin_id AUTOGENERATED;
-CREATE INDEX IdxYelpCheckinDatesTimes ON YelpCheckin (UNNEST checkin_times SELECT date, time);
+CREATE INDEX IdxYelpCheckinDatesTimes ON YelpCheckin (UNNEST checkin_times SELECT date, time) EXCLUDE UNKNOWN KEY;
 
 SELECT C.business_id
 FROM YelpCheckin C, C.checkin_times D
diff --git a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/array-index/select-unnest-queries/closed/with-composite-sk/query2.sqlpp b/asterixdb/asterix-app/src/test/resources/optimizerts/queries/array-index/select-unnest-queries/closed/with-composite-sk/query2.sqlpp
index 022d5ea..71f6787 100644
--- a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/array-index/select-unnest-queries/closed/with-composite-sk/query2.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/optimizerts/queries/array-index/select-unnest-queries/closed/with-composite-sk/query2.sqlpp
@@ -32,7 +32,7 @@
 };
 
 CREATE DATASET YelpCheckin(CheckinType) PRIMARY KEY checkin_id AUTOGENERATED;
-CREATE INDEX IdxYelpCheckinDatesTimes ON YelpCheckin (UNNEST checkin_times SELECT date, time);
+CREATE INDEX IdxYelpCheckinDatesTimes ON YelpCheckin (UNNEST checkin_times SELECT date, time) EXCLUDE UNKNOWN KEY;
 
 SELECT COUNT(*)
 FROM YelpCheckin C, C.checkin_times D
diff --git a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/array-index/select-unnest-queries/closed/with-composite-sk/query3.sqlpp b/asterixdb/asterix-app/src/test/resources/optimizerts/queries/array-index/select-unnest-queries/closed/with-composite-sk/query3.sqlpp
index b37fe19..31e3ef4 100644
--- a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/array-index/select-unnest-queries/closed/with-composite-sk/query3.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/optimizerts/queries/array-index/select-unnest-queries/closed/with-composite-sk/query3.sqlpp
@@ -34,7 +34,8 @@
 CREATE DATASET    YelpCheckin(CheckinType)
 PRIMARY KEY       checkin_id AUTOGENERATED;
 CREATE INDEX      IdxYelpCheckinDatesTimes
-ON                YelpCheckin ( UNNEST checkin_times SELECT date, time );
+ON                YelpCheckin ( UNNEST checkin_times SELECT date, time )
+EXCLUDE UNKNOWN KEY;
 
 -- The following query should NOT be optimized.
 FROM     YelpCheckin C,
diff --git a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/array-index/select-unnest-queries/closed/with-filter-fields/query1.sqlpp b/asterixdb/asterix-app/src/test/resources/optimizerts/queries/array-index/select-unnest-queries/closed/with-filter-fields/query1.sqlpp
index 9b36d62..c34af5c 100644
--- a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/array-index/select-unnest-queries/closed/with-filter-fields/query1.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/optimizerts/queries/array-index/select-unnest-queries/closed/with-filter-fields/query1.sqlpp
@@ -29,7 +29,7 @@
 };
 
 CREATE DATASET YelpCheckin(CheckinType) PRIMARY KEY checkin_id AUTOGENERATED WITH FILTER ON business_id;
-CREATE INDEX IdxYelpCheckinDates ON YelpCheckin (UNNEST dates);
+CREATE INDEX IdxYelpCheckinDates ON YelpCheckin (UNNEST dates) EXCLUDE UNKNOWN KEY;
 
 SELECT C.business_id
 FROM YelpCheckin C, C.dates D
diff --git a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/array-index/select-unnest-queries/closed/with-filter-fields/query2.sqlpp b/asterixdb/asterix-app/src/test/resources/optimizerts/queries/array-index/select-unnest-queries/closed/with-filter-fields/query2.sqlpp
index 2cffd50..32f426c 100644
--- a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/array-index/select-unnest-queries/closed/with-filter-fields/query2.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/optimizerts/queries/array-index/select-unnest-queries/closed/with-filter-fields/query2.sqlpp
@@ -29,7 +29,7 @@
 };
 
 CREATE DATASET YelpCheckin(CheckinType) PRIMARY KEY checkin_id AUTOGENERATED WITH FILTER ON business_id;
-CREATE INDEX IdxYelpCheckinDates ON YelpCheckin (UNNEST dates);
+CREATE INDEX IdxYelpCheckinDates ON YelpCheckin (UNNEST dates) EXCLUDE UNKNOWN KEY;
 
 SELECT COUNT(*)
 FROM YelpCheckin C, C.dates D
diff --git a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/array-index/select-unnest-queries/open/complex-structures/query1.sqlpp b/asterixdb/asterix-app/src/test/resources/optimizerts/queries/array-index/select-unnest-queries/open/complex-structures/query1.sqlpp
index 3ecf642..8cde896 100644
--- a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/array-index/select-unnest-queries/open/complex-structures/query1.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/optimizerts/queries/array-index/select-unnest-queries/open/complex-structures/query1.sqlpp
@@ -41,7 +41,8 @@
 -- Fully open index 1. Unnest flags: [0, 1, 0]
 CREATE INDEX      testIndex1
 ON                TestDataset ( UNNEST open_field_1.open_field_2
-                                SELECT open_field_3a : bigint );
+                                SELECT open_field_3a : bigint )
+EXCLUDE UNKNOWN KEY;
 
 FROM    TestDataset D
 UNNEST  D.open_field_1.open_field_2 F
diff --git a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/array-index/select-unnest-queries/open/complex-structures/query2.sqlpp b/asterixdb/asterix-app/src/test/resources/optimizerts/queries/array-index/select-unnest-queries/open/complex-structures/query2.sqlpp
index d2eef20..9bd14cd 100644
--- a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/array-index/select-unnest-queries/open/complex-structures/query2.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/optimizerts/queries/array-index/select-unnest-queries/open/complex-structures/query2.sqlpp
@@ -41,7 +41,8 @@
 -- Fully open index 2. Unnest flags: [0, 1, 0, 0]
 CREATE INDEX      testIndex2
 ON                TestDataset ( UNNEST open_field_1.open_field_2
-                                SELECT open_field_3b.open_field_4 : bigint );
+                                SELECT open_field_3b.open_field_4 : bigint )
+EXCLUDE UNKNOWN KEY;
 
 FROM    TestDataset D
 UNNEST  D.open_field_1.open_field_2 F
diff --git a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/array-index/select-unnest-queries/open/complex-structures/query3.sqlpp b/asterixdb/asterix-app/src/test/resources/optimizerts/queries/array-index/select-unnest-queries/open/complex-structures/query3.sqlpp
index 39e504c..e9b5fdd 100644
--- a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/array-index/select-unnest-queries/open/complex-structures/query3.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/optimizerts/queries/array-index/select-unnest-queries/open/complex-structures/query3.sqlpp
@@ -41,7 +41,8 @@
 -- Fully open index 3. Unnest flags: [0, 1, 0, 1]
 CREATE INDEX      testIndex3
 ON                TestDataset ( UNNEST open_field_1.open_field_2
-                                UNNEST open_field_3c.open_field_4a : bigint );
+                                UNNEST open_field_3c.open_field_4a : bigint )
+EXCLUDE UNKNOWN KEY;
 
 FROM    TestDataset D
 UNNEST  D.open_field_1.open_field_2 F1
diff --git a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/array-index/select-unnest-queries/open/complex-structures/query4.sqlpp b/asterixdb/asterix-app/src/test/resources/optimizerts/queries/array-index/select-unnest-queries/open/complex-structures/query4.sqlpp
index fea1d41..b99644c 100644
--- a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/array-index/select-unnest-queries/open/complex-structures/query4.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/optimizerts/queries/array-index/select-unnest-queries/open/complex-structures/query4.sqlpp
@@ -42,7 +42,8 @@
 CREATE INDEX      testIndex4
 ON                TestDataset ( UNNEST open_field_1.open_field_2
                                 UNNEST open_field_3c.open_field_4b
-                                SELECT open_field_5 : bigint );
+                                SELECT open_field_5 : bigint )
+EXCLUDE UNKNOWN KEY;
 
 FROM    TestDataset D
 UNNEST  D.open_field_1.open_field_2 F1
diff --git a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/array-index/select-unnest-queries/open/complex-structures/query5.sqlpp b/asterixdb/asterix-app/src/test/resources/optimizerts/queries/array-index/select-unnest-queries/open/complex-structures/query5.sqlpp
index 10f7ab7..bb23de6 100644
--- a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/array-index/select-unnest-queries/open/complex-structures/query5.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/optimizerts/queries/array-index/select-unnest-queries/open/complex-structures/query5.sqlpp
@@ -41,7 +41,8 @@
 -- Partially open index 1.  [0, 1, 0]
 CREATE INDEX      testIndex1c
 ON                TestDataset ( UNNEST closed_field_1.open_field_2
-                                SELECT open_field_3a : bigint );
+                                SELECT open_field_3a : bigint )
+EXCLUDE UNKNOWN KEY;
 
 FROM    TestDataset D
 UNNEST  D.closed_field_1.open_field_2 F
diff --git a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/array-index/select-unnest-queries/open/complex-structures/query6.sqlpp b/asterixdb/asterix-app/src/test/resources/optimizerts/queries/array-index/select-unnest-queries/open/complex-structures/query6.sqlpp
index 637c458..905df22 100644
--- a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/array-index/select-unnest-queries/open/complex-structures/query6.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/optimizerts/queries/array-index/select-unnest-queries/open/complex-structures/query6.sqlpp
@@ -41,7 +41,8 @@
 -- Partially open index 2. Unnest flags: [0, 1, 0, 0]
 CREATE INDEX      testIndex2c
 ON                TestDataset ( UNNEST closed_field_1.closed_field_2
-                                SELECT open_field_3b.open_field_4 : bigint );
+                                SELECT open_field_3b.open_field_4 : bigint )
+EXCLUDE UNKNOWN KEY;
 
 FROM    TestDataset D
 UNNEST  D.closed_field_1.closed_field_2 F
diff --git a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/array-index/select-unnest-queries/open/complex-structures/query7.sqlpp b/asterixdb/asterix-app/src/test/resources/optimizerts/queries/array-index/select-unnest-queries/open/complex-structures/query7.sqlpp
index ba97b1b..c0d8b30 100644
--- a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/array-index/select-unnest-queries/open/complex-structures/query7.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/optimizerts/queries/array-index/select-unnest-queries/open/complex-structures/query7.sqlpp
@@ -41,7 +41,8 @@
 -- Partially open index 3. Unnest flags: [0, 1, 0, 1]
 CREATE INDEX      testIndex3c
 ON                TestDataset ( UNNEST closed_field_1.closed_field_2
-                                UNNEST closed_field_3.open_field_4a : bigint );
+                                UNNEST closed_field_3.open_field_4a : bigint )
+EXCLUDE UNKNOWN KEY;
 
 FROM    TestDataset D
 UNNEST  D.closed_field_1.closed_field_2 F1
diff --git a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/array-index/select-unnest-queries/open/complex-structures/query8.sqlpp b/asterixdb/asterix-app/src/test/resources/optimizerts/queries/array-index/select-unnest-queries/open/complex-structures/query8.sqlpp
index f36ac3a..6731591 100644
--- a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/array-index/select-unnest-queries/open/complex-structures/query8.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/optimizerts/queries/array-index/select-unnest-queries/open/complex-structures/query8.sqlpp
@@ -42,7 +42,8 @@
 CREATE INDEX      testIndex4c
 ON                TestDataset ( UNNEST closed_field_1.closed_field_2
                                 UNNEST closed_field_3.closed_field_4
-                                SELECT open_field_5 : bigint );
+                                SELECT open_field_5 : bigint )
+EXCLUDE UNKNOWN KEY;
 
 FROM    TestDataset D
 UNNEST  D.closed_field_1.closed_field_2 F1
diff --git a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/array-index/select-unnest-queries/open/use-case-1/query1.sqlpp b/asterixdb/asterix-app/src/test/resources/optimizerts/queries/array-index/select-unnest-queries/open/use-case-1/query1.sqlpp
index 8520db5..4cd0e07 100644
--- a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/array-index/select-unnest-queries/open/use-case-1/query1.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/optimizerts/queries/array-index/select-unnest-queries/open/use-case-1/query1.sqlpp
@@ -25,7 +25,7 @@
 };
 
 CREATE DATASET YelpCheckin(CheckinType) PRIMARY KEY checkin_id AUTOGENERATED;
-CREATE INDEX IdxYelpCheckinDates ON YelpCheckin (UNNEST dates : string) ;
+CREATE INDEX IdxYelpCheckinDates ON YelpCheckin (UNNEST dates : string) EXCLUDE UNKNOWN KEY;
 
 SELECT C.business_id
 FROM YelpCheckin C, C.dates D
diff --git a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/array-index/select-unnest-queries/open/use-case-1/query2.sqlpp b/asterixdb/asterix-app/src/test/resources/optimizerts/queries/array-index/select-unnest-queries/open/use-case-1/query2.sqlpp
index bdc0089..1afdbf6 100644
--- a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/array-index/select-unnest-queries/open/use-case-1/query2.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/optimizerts/queries/array-index/select-unnest-queries/open/use-case-1/query2.sqlpp
@@ -27,7 +27,7 @@
 };
 
 CREATE DATASET YelpCheckin(CheckinType) PRIMARY KEY checkin_id AUTOGENERATED;
-CREATE INDEX IdxYelpCheckinDates ON YelpCheckin (UNNEST dates : string) ;
+CREATE INDEX IdxYelpCheckinDates ON YelpCheckin (UNNEST dates : string) EXCLUDE UNKNOWN KEY;
 
 SELECT COUNT(*)
 FROM YelpCheckin C, C.dates D
diff --git a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/array-index/select-unnest-queries/open/use-case-2/query1.sqlpp b/asterixdb/asterix-app/src/test/resources/optimizerts/queries/array-index/select-unnest-queries/open/use-case-2/query1.sqlpp
index 2a8e0ba..37aa59a 100644
--- a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/array-index/select-unnest-queries/open/use-case-2/query1.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/optimizerts/queries/array-index/select-unnest-queries/open/use-case-2/query1.sqlpp
@@ -27,7 +27,7 @@
 };
 
 CREATE DATASET YelpCheckin(CheckinType) PRIMARY KEY checkin_id AUTOGENERATED;
-CREATE INDEX IdxYelpCheckinDates ON YelpCheckin (UNNEST checkin_times.dates : string) ;
+CREATE INDEX IdxYelpCheckinDates ON YelpCheckin (UNNEST checkin_times.dates : string) EXCLUDE UNKNOWN KEY;
 
 SELECT C.business_id
 FROM YelpCheckin C, C.checkin_times.dates D
diff --git a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/array-index/select-unnest-queries/open/use-case-2/query2.sqlpp b/asterixdb/asterix-app/src/test/resources/optimizerts/queries/array-index/select-unnest-queries/open/use-case-2/query2.sqlpp
index 6eaeb8b..b617001 100644
--- a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/array-index/select-unnest-queries/open/use-case-2/query2.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/optimizerts/queries/array-index/select-unnest-queries/open/use-case-2/query2.sqlpp
@@ -27,7 +27,7 @@
 };
 
 CREATE DATASET YelpCheckin(CheckinType) PRIMARY KEY checkin_id AUTOGENERATED;
-CREATE INDEX IdxYelpCheckinDates ON YelpCheckin (UNNEST checkin_times.dates : string) ;
+CREATE INDEX IdxYelpCheckinDates ON YelpCheckin (UNNEST checkin_times.dates : string) EXCLUDE UNKNOWN KEY;
 
 SELECT COUNT(*)
 FROM YelpCheckin C, C.checkin_times.dates D
diff --git a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/array-index/select-unnest-queries/open/use-case-3/query1.sqlpp b/asterixdb/asterix-app/src/test/resources/optimizerts/queries/array-index/select-unnest-queries/open/use-case-3/query1.sqlpp
index ff8aaf2..3a82e48 100644
--- a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/array-index/select-unnest-queries/open/use-case-3/query1.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/optimizerts/queries/array-index/select-unnest-queries/open/use-case-3/query1.sqlpp
@@ -27,7 +27,7 @@
 };
 
 CREATE DATASET YelpCheckin(CheckinType) PRIMARY KEY checkin_id AUTOGENERATED;
-CREATE INDEX IdxYelpCheckinDates ON YelpCheckin (UNNEST checkin_times SELECT date : string) ;
+CREATE INDEX IdxYelpCheckinDates ON YelpCheckin (UNNEST checkin_times SELECT date : string) EXCLUDE UNKNOWN KEY;
 
 SELECT C.business_id
 FROM YelpCheckin C, C.checkin_times D
diff --git a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/array-index/select-unnest-queries/open/use-case-3/query2.sqlpp b/asterixdb/asterix-app/src/test/resources/optimizerts/queries/array-index/select-unnest-queries/open/use-case-3/query2.sqlpp
index cf4dbe7..1014a6f 100644
--- a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/array-index/select-unnest-queries/open/use-case-3/query2.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/optimizerts/queries/array-index/select-unnest-queries/open/use-case-3/query2.sqlpp
@@ -27,7 +27,7 @@
 };
 
 CREATE DATASET YelpCheckin(CheckinType) PRIMARY KEY checkin_id AUTOGENERATED;
-CREATE INDEX IdxYelpCheckinDates ON YelpCheckin (UNNEST checkin_times SELECT date : string) ;
+CREATE INDEX IdxYelpCheckinDates ON YelpCheckin (UNNEST checkin_times SELECT date : string) EXCLUDE UNKNOWN KEY;
 
 SELECT COUNT(*)
 FROM YelpCheckin C, C.checkin_times D
diff --git a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/array-index/select-unnest-queries/open/use-case-3/query3.sqlpp b/asterixdb/asterix-app/src/test/resources/optimizerts/queries/array-index/select-unnest-queries/open/use-case-3/query3.sqlpp
index e2bc739..a218f25 100644
--- a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/array-index/select-unnest-queries/open/use-case-3/query3.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/optimizerts/queries/array-index/select-unnest-queries/open/use-case-3/query3.sqlpp
@@ -27,7 +27,7 @@
 };
 
 CREATE DATASET YelpCheckin(CheckinType) PRIMARY KEY checkin_id AUTOGENERATED;
-CREATE INDEX IdxYelpCheckinDates ON YelpCheckin (UNNEST checkin_times SELECT date : string) ;
+CREATE INDEX IdxYelpCheckinDates ON YelpCheckin (UNNEST checkin_times SELECT date : string) EXCLUDE UNKNOWN KEY;
 
 SELECT C.business_id
 FROM YelpCheckin C, C.checkin_times D
diff --git a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/array-index/select-unnest-queries/open/use-case-4/query1.sqlpp b/asterixdb/asterix-app/src/test/resources/optimizerts/queries/array-index/select-unnest-queries/open/use-case-4/query1.sqlpp
index 4037a3b..1b44f26 100644
--- a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/array-index/select-unnest-queries/open/use-case-4/query1.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/optimizerts/queries/array-index/select-unnest-queries/open/use-case-4/query1.sqlpp
@@ -27,7 +27,7 @@
 };
 
 CREATE DATASET YelpCheckin(CheckinType) PRIMARY KEY checkin_id AUTOGENERATED;
-CREATE INDEX IdxYelpCheckinDates ON YelpCheckin (UNNEST checkin_times UNNEST dates : string) ;
+CREATE INDEX IdxYelpCheckinDates ON YelpCheckin (UNNEST checkin_times UNNEST dates : string) EXCLUDE UNKNOWN KEY;
 
 SELECT C.business_id
 FROM YelpCheckin C, C.checkin_times CT, CT.dates D
diff --git a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/array-index/select-unnest-queries/open/use-case-4/query2.sqlpp b/asterixdb/asterix-app/src/test/resources/optimizerts/queries/array-index/select-unnest-queries/open/use-case-4/query2.sqlpp
index 0435f33..2cd7334 100644
--- a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/array-index/select-unnest-queries/open/use-case-4/query2.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/optimizerts/queries/array-index/select-unnest-queries/open/use-case-4/query2.sqlpp
@@ -27,7 +27,7 @@
 };
 
 CREATE DATASET YelpCheckin(CheckinType) PRIMARY KEY checkin_id AUTOGENERATED;
-CREATE INDEX IdxYelpCheckinDates ON YelpCheckin (UNNEST checkin_times UNNEST dates : string) ;
+CREATE INDEX IdxYelpCheckinDates ON YelpCheckin (UNNEST checkin_times UNNEST dates : string) EXCLUDE UNKNOWN KEY;
 
 SELECT COUNT(*)
 FROM YelpCheckin C, C.checkin_times CT, CT.dates D
diff --git a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/array-index/select-unnest-queries/open/with-3-level-record-path/query1.sqlpp b/asterixdb/asterix-app/src/test/resources/optimizerts/queries/array-index/select-unnest-queries/open/with-3-level-record-path/query1.sqlpp
index 2855490..c57acae 100644
--- a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/array-index/select-unnest-queries/open/with-3-level-record-path/query1.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/optimizerts/queries/array-index/select-unnest-queries/open/with-3-level-record-path/query1.sqlpp
@@ -27,7 +27,8 @@
 };
 
 CREATE DATASET YelpCheckin(CheckinType) PRIMARY KEY checkin_id AUTOGENERATED;
-CREATE INDEX IdxYelpCheckinDates ON YelpCheckin (UNNEST checkin_data.checkin_temporal.checkin_times.dates : string) ;
+CREATE INDEX IdxYelpCheckinDates ON YelpCheckin (UNNEST checkin_data.checkin_temporal.checkin_times.dates : string)
+EXCLUDE UNKNOWN KEY;
 
 SELECT C.business_id
 FROM YelpCheckin C, C.checkin_data.checkin_temporal.checkin_times.dates D
diff --git a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/array-index/select-unnest-queries/open/with-3-level-record-path/query2.sqlpp b/asterixdb/asterix-app/src/test/resources/optimizerts/queries/array-index/select-unnest-queries/open/with-3-level-record-path/query2.sqlpp
index fb0bc10..eea4fc3 100644
--- a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/array-index/select-unnest-queries/open/with-3-level-record-path/query2.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/optimizerts/queries/array-index/select-unnest-queries/open/with-3-level-record-path/query2.sqlpp
@@ -27,7 +27,8 @@
 };
 
 CREATE DATASET YelpCheckin(CheckinType) PRIMARY KEY checkin_id AUTOGENERATED;
-CREATE INDEX IdxYelpCheckinDates ON YelpCheckin (UNNEST checkin_data.checkin_temporal.checkin_times.dates : string) ;
+CREATE INDEX IdxYelpCheckinDates ON YelpCheckin (UNNEST checkin_data.checkin_temporal.checkin_times.dates : string)
+EXCLUDE UNKNOWN KEY;
 
 SELECT COUNT(*)
 FROM YelpCheckin C, C.checkin_data.checkin_temporal.checkin_times.dates D
diff --git a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/array-index/select-unnest-queries/open/with-composite-sk/query1.sqlpp b/asterixdb/asterix-app/src/test/resources/optimizerts/queries/array-index/select-unnest-queries/open/with-composite-sk/query1.sqlpp
index 37ef7a7..265017c 100644
--- a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/array-index/select-unnest-queries/open/with-composite-sk/query1.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/optimizerts/queries/array-index/select-unnest-queries/open/with-composite-sk/query1.sqlpp
@@ -27,7 +27,8 @@
 };
 
 CREATE DATASET YelpCheckin(CheckinType) PRIMARY KEY checkin_id AUTOGENERATED;
-CREATE INDEX IdxYelpCheckinDatesTimes ON YelpCheckin (UNNEST checkin_times SELECT date : string , time : string);
+CREATE INDEX IdxYelpCheckinDatesTimes ON YelpCheckin (UNNEST checkin_times SELECT date : string , time : string)
+EXCLUDE UNKNOWN KEY;
 
 SELECT C.business_id
 FROM YelpCheckin C, C.checkin_times D
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/array-index/bulk-loading/after-index-creation/use-case-1/use-case-1.1.ddl.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/array-index/bulk-loading/after-index-creation/use-case-1/use-case-1.1.ddl.sqlpp
index 3e2eeda..2b75805 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/array-index/bulk-loading/after-index-creation/use-case-1/use-case-1.1.ddl.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/array-index/bulk-loading/after-index-creation/use-case-1/use-case-1.1.ddl.sqlpp
@@ -32,7 +32,7 @@
 };
 
 CREATE DATASET YelpCheckin(CheckinType) PRIMARY KEY checkin_id AUTOGENERATED;
-CREATE INDEX IdxYelpCheckinDates ON YelpCheckin (UNNEST dates);
-// CREATE INDEX IdxYelpCheckinDatesBusinessID ON YelpCheckin (UNNEST dates, business_id);
-// CREATE INDEX IdxYelpCheckinBusinessIDDates ON YelpCheckin (business_id, UNNEST dates);
-CREATE INDEX IdxYelpCheckinBusinessID ON YelpCheckin (business_id);
\ No newline at end of file
+CREATE INDEX IdxYelpCheckinDates ON YelpCheckin (UNNEST dates) EXCLUDE UNKNOWN KEY;
+CREATE INDEX IdxYelpCheckinDatesBusinessID ON YelpCheckin (UNNEST dates, business_id) EXCLUDE UNKNOWN KEY;
+CREATE INDEX IdxYelpCheckinBusinessIDDates ON YelpCheckin (business_id, UNNEST dates) EXCLUDE UNKNOWN KEY;
+CREATE INDEX IdxYelpCheckinBusinessID ON YelpCheckin (business_id) EXCLUDE UNKNOWN KEY;
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/array-index/bulk-loading/after-index-creation/use-case-2/use-case-2.1.ddl.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/array-index/bulk-loading/after-index-creation/use-case-2/use-case-2.1.ddl.sqlpp
index ecef50a..5e214f1 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/array-index/bulk-loading/after-index-creation/use-case-2/use-case-2.1.ddl.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/array-index/bulk-loading/after-index-creation/use-case-2/use-case-2.1.ddl.sqlpp
@@ -35,6 +35,6 @@
 };
 
 CREATE DATASET YelpCheckin(CheckinType) PRIMARY KEY checkin_id AUTOGENERATED;
-CREATE INDEX IdxYelpCheckinDates ON YelpCheckin (UNNEST checkin_times.dates);
-// CREATE INDEX IdxYelpCheckinDatesBusiness ON YelpCheckin (UNNEST checkin_times.dates, (business_id));
-// CREATE INDEX IdxYelpCheckinBusinessDates ON YelpCheckin (business_id, UNNEST checkin_times.dates);
\ No newline at end of file
+CREATE INDEX IdxYelpCheckinDates ON YelpCheckin (UNNEST checkin_times.dates) EXCLUDE UNKNOWN KEY;
+CREATE INDEX IdxYelpCheckinDatesBusiness ON YelpCheckin (UNNEST checkin_times.dates, (business_id)) EXCLUDE UNKNOWN KEY;
+CREATE INDEX IdxYelpCheckinBusinessDates ON YelpCheckin (business_id, UNNEST checkin_times.dates) EXCLUDE UNKNOWN KEY;
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/array-index/bulk-loading/after-index-creation/use-case-3/use-case-3.1.ddl.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/array-index/bulk-loading/after-index-creation/use-case-3/use-case-3.1.ddl.sqlpp
index abd1c6c..94d914c 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/array-index/bulk-loading/after-index-creation/use-case-3/use-case-3.1.ddl.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/array-index/bulk-loading/after-index-creation/use-case-3/use-case-3.1.ddl.sqlpp
@@ -35,8 +35,15 @@
 };
 
 CREATE DATASET YelpCheckin(CheckinType) PRIMARY KEY checkin_id AUTOGENERATED;
-CREATE INDEX IdxYelpCheckinDates ON YelpCheckin (UNNEST checkin_times SELECT date);
-CREATE INDEX IdxYelpCheckinDatesTimes ON YelpCheckin (UNNEST checkin_times SELECT date, time);
-CREATE INDEX IdxYelpCheckinBusinessID ON YelpCheckin (business_id);
-// CREATE INDEX IdxYelpCheckinDatesTimesBusiness ON YelpCheckin ((UNNEST checkin_times SELECT date, time), (business_id));
-// CREATE INDEX IdxYelpCheckinBusinessDatesTimes ON YelpCheckin (business_id, UNNEST checkin_times SELECT date, time);
\ No newline at end of file
+CREATE INDEX IdxYelpCheckinDates ON YelpCheckin (UNNEST checkin_times SELECT date) EXCLUDE UNKNOWN KEY;
+CREATE INDEX IdxYelpCheckinDatesTimes ON YelpCheckin (UNNEST checkin_times SELECT date, time) EXCLUDE UNKNOWN KEY;
+CREATE INDEX IdxYelpCheckinBusinessID ON YelpCheckin (business_id) EXCLUDE UNKNOWN KEY;
+
+CREATE INDEX  IdxYelpCheckinDatesTimesBusiness
+ON            YelpCheckin  ((UNNEST checkin_times SELECT date, time),
+                           (business_id))
+EXCLUDE UNKNOWN KEY;
+CREATE INDEX  IdxYelpCheckinBusinessDatesTimes
+ON            YelpCheckin (business_id,
+                           UNNEST checkin_times SELECT date, time)
+EXCLUDE UNKNOWN KEY;
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/array-index/bulk-loading/after-index-creation/use-case-4/use-case-4.1.ddl.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/array-index/bulk-loading/after-index-creation/use-case-4/use-case-4.1.ddl.sqlpp
index 626e797..4b8297f 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/array-index/bulk-loading/after-index-creation/use-case-4/use-case-4.1.ddl.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/array-index/bulk-loading/after-index-creation/use-case-4/use-case-4.1.ddl.sqlpp
@@ -35,6 +35,13 @@
 };
 
 CREATE DATASET YelpCheckin(CheckinType) PRIMARY KEY checkin_id AUTOGENERATED;
-CREATE INDEX IdxYelpCheckinDates ON YelpCheckin (UNNEST checkin_times UNNEST dates);
-// CREATE INDEX IdxYelpCheckinDatesBusiness ON YelpCheckin ((UNNEST checkin_times UNNEST dates), business_id);
-// CREATE INDEX IdxYelpCheckinBusinessDates ON YelpCheckin (business_id, UNNEST checkin_times UNNEST dates);
\ No newline at end of file
+CREATE INDEX IdxYelpCheckinDates ON YelpCheckin (UNNEST checkin_times UNNEST dates) EXCLUDE UNKNOWN KEY;
+
+CREATE INDEX  IdxYelpCheckinDatesBusiness
+ON            YelpCheckin ((UNNEST checkin_times UNNEST dates),
+                           business_id)
+EXCLUDE UNKNOWN KEY;
+CREATE INDEX  IdxYelpCheckinBusinessDates
+ON            YelpCheckin (business_id,
+                           UNNEST checkin_times UNNEST dates)
+EXCLUDE UNKNOWN KEY;
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/array-index/bulk-loading/after-index-creation/with-3-level-record-path/with-3-level-record-path.1.ddl.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/array-index/bulk-loading/after-index-creation/with-3-level-record-path/with-3-level-record-path.1.ddl.sqlpp
index 47b4d5b..58f62e5 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/array-index/bulk-loading/after-index-creation/with-3-level-record-path/with-3-level-record-path.1.ddl.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/array-index/bulk-loading/after-index-creation/with-3-level-record-path/with-3-level-record-path.1.ddl.sqlpp
@@ -40,4 +40,6 @@
 };
 
 CREATE DATASET YelpCheckin(CheckinType) PRIMARY KEY checkin_id AUTOGENERATED;
-CREATE INDEX IdxYelpCheckinDates ON YelpCheckin (UNNEST checkin_data.checkin_temporal.checkin_times.dates);
\ No newline at end of file
+CREATE INDEX   IdxYelpCheckinDates
+ON             YelpCheckin (UNNEST checkin_data.checkin_temporal.checkin_times.dates)
+EXCLUDE UNKNOWN KEY;
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/array-index/bulk-loading/after-index-creation/with-composite-pk/with-composite-pk.1.ddl.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/array-index/bulk-loading/after-index-creation/with-composite-pk/with-composite-pk.1.ddl.sqlpp
index 415054c..1c444c6 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/array-index/bulk-loading/after-index-creation/with-composite-pk/with-composite-pk.1.ddl.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/array-index/bulk-loading/after-index-creation/with-composite-pk/with-composite-pk.1.ddl.sqlpp
@@ -32,4 +32,4 @@
 };
 
 CREATE DATASET YelpCheckin(CheckinType) PRIMARY KEY checkin_id, business_id;
-CREATE INDEX IdxYelpCheckinDates ON YelpCheckin (UNNEST dates);
\ No newline at end of file
+CREATE INDEX IdxYelpCheckinDates ON YelpCheckin (UNNEST dates) EXCLUDE UNKNOWN KEY;
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/array-index/bulk-loading/after-index-creation/with-filter-fields/with-filter-fields.1.ddl.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/array-index/bulk-loading/after-index-creation/with-filter-fields/with-filter-fields.1.ddl.sqlpp
index 1de5989..89a1142 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/array-index/bulk-loading/after-index-creation/with-filter-fields/with-filter-fields.1.ddl.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/array-index/bulk-loading/after-index-creation/with-filter-fields/with-filter-fields.1.ddl.sqlpp
@@ -32,4 +32,4 @@
 };
 
 CREATE DATASET YelpCheckin(CheckinType) PRIMARY KEY checkin_id WITH FILTER ON business_id;
-CREATE INDEX IdxYelpCheckinDates ON YelpCheckin (UNNEST dates);
\ No newline at end of file
+CREATE INDEX IdxYelpCheckinDates ON YelpCheckin (UNNEST dates) EXCLUDE UNKNOWN KEY;
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/array-index/bulk-loading/after-index-creation/with-open-index/with-open-index.1.ddl.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/array-index/bulk-loading/after-index-creation/with-open-index/with-open-index.1.ddl.sqlpp
index aa3a456..b678952 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/array-index/bulk-loading/after-index-creation/with-open-index/with-open-index.1.ddl.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/array-index/bulk-loading/after-index-creation/with-open-index/with-open-index.1.ddl.sqlpp
@@ -30,4 +30,4 @@
 };
 
 CREATE DATASET YelpCheckin(CheckinType) PRIMARY KEY checkin_id AUTOGENERATED;
-CREATE INDEX IdxYelpCheckinDates ON YelpCheckin (UNNEST dates : string ) ;
+CREATE INDEX IdxYelpCheckinDates ON YelpCheckin (UNNEST dates : string ) EXCLUDE UNKNOWN KEY;
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/array-index/bulk-loading/on-index-creation/closed/use-case-1/use-case-1.3.ddl.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/array-index/bulk-loading/on-index-creation/closed/use-case-1/use-case-1.3.ddl.sqlpp
index dbf055c..1e44b75 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/array-index/bulk-loading/on-index-creation/closed/use-case-1/use-case-1.3.ddl.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/array-index/bulk-loading/on-index-creation/closed/use-case-1/use-case-1.3.ddl.sqlpp
@@ -19,6 +19,6 @@
 
 USE TestYelp;
 
-CREATE INDEX IdxYelpCheckinDates ON YelpCheckin (UNNEST dates);
-// CREATE INDEX IdxYelpCheckinDatesBusinessID ON YelpCheckin (UNNEST dates, business_id);
-// CREATE INDEX IdxYelpCheckinBusinessID ON YelpCheckin (business_id, UNNEST dates);
+CREATE INDEX IdxYelpCheckinDates ON YelpCheckin (UNNEST dates) EXCLUDE UNKNOWN KEY;
+CREATE INDEX IdxYelpCheckinDatesBusinessID ON YelpCheckin (UNNEST dates, business_id) EXCLUDE UNKNOWN KEY;
+CREATE INDEX IdxYelpCheckinBusinessID ON YelpCheckin (business_id, UNNEST dates) EXCLUDE UNKNOWN KEY;
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/array-index/bulk-loading/on-index-creation/closed/use-case-2/use-case-2.3.ddl.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/array-index/bulk-loading/on-index-creation/closed/use-case-2/use-case-2.3.ddl.sqlpp
index 0452c4a..5f9cbe3 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/array-index/bulk-loading/on-index-creation/closed/use-case-2/use-case-2.3.ddl.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/array-index/bulk-loading/on-index-creation/closed/use-case-2/use-case-2.3.ddl.sqlpp
@@ -19,9 +19,9 @@
 
 USE TestYelp;
 
-CREATE INDEX IdxYelpCheckinDates ON YelpCheckin (UNNEST checkin_times.dates);
+CREATE INDEX IdxYelpCheckinDates ON YelpCheckin (UNNEST checkin_times.dates) EXCLUDE UNKNOWN KEY;
 
 /* It would be more user-friendly to use (UNNEST checkin_times.dates), (business_id), but we are able to infer this
    from our grammar alone. We leave this in to also exercise our parser. */
-// CREATE INDEX IdxYelpCheckinDatesBusiness ON YelpCheckin (UNNEST checkin_times.dates, business_id);
-// CREATE INDEX IdxYelpCheckinBusinessDates ON YelpCheckin (business_id, UNNEST checkin_times.dates);
+CREATE INDEX IdxYelpCheckinDatesBusiness ON YelpCheckin (UNNEST checkin_times.dates, business_id) EXCLUDE UNKNOWN KEY;
+CREATE INDEX IdxYelpCheckinBusinessDates ON YelpCheckin (business_id, UNNEST checkin_times.dates) EXCLUDE UNKNOWN KEY;
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/array-index/bulk-loading/on-index-creation/closed/use-case-3/use-case-3.3.ddl.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/array-index/bulk-loading/on-index-creation/closed/use-case-3/use-case-3.3.ddl.sqlpp
index ee911b4..4154d37 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/array-index/bulk-loading/on-index-creation/closed/use-case-3/use-case-3.3.ddl.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/array-index/bulk-loading/on-index-creation/closed/use-case-3/use-case-3.3.ddl.sqlpp
@@ -19,4 +19,4 @@
 
 USE TestYelp;
 
-CREATE INDEX IdxYelpCheckinDates ON YelpCheckin (UNNEST checkin_times SELECT date);
+CREATE INDEX IdxYelpCheckinDates ON YelpCheckin (UNNEST checkin_times SELECT date) EXCLUDE UNKNOWN KEY;
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/array-index/bulk-loading/on-index-creation/closed/use-case-3/use-case-3.5.ddl.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/array-index/bulk-loading/on-index-creation/closed/use-case-3/use-case-3.5.ddl.sqlpp
index ad50985..0cfbc1f 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/array-index/bulk-loading/on-index-creation/closed/use-case-3/use-case-3.5.ddl.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/array-index/bulk-loading/on-index-creation/closed/use-case-3/use-case-3.5.ddl.sqlpp
@@ -20,6 +20,13 @@
 USE TestYelp;
 
 DROP INDEX YelpCheckin.IdxYelpCheckinDates;
-CREATE INDEX IdxYelpCheckinDatesTimes ON YelpCheckin (UNNEST checkin_times SELECT date, time);
-// CREATE INDEX IdxYelpCheckinDatesTimesBusiness ON YelpCheckin ((UNNEST checkin_times SELECT date, time), (business_id));
-// CREATE INDEX IdxYelpCheckinBusinessDatesTimes ON YelpCheckin (business_id, UNNEST checkin_times SELECT date, time);
+CREATE INDEX IdxYelpCheckinDatesTimes ON YelpCheckin (UNNEST checkin_times SELECT date, time) EXCLUDE UNKNOWN KEY;
+
+CREATE INDEX  IdxYelpCheckinDatesTimesBusiness
+ON            YelpCheckin ((UNNEST checkin_times SELECT date, time),
+                           (business_id))
+EXCLUDE UNKNOWN KEY;
+CREATE INDEX  IdxYelpCheckinBusinessDatesTimes
+ON            YelpCheckin (business_id,
+                           UNNEST checkin_times SELECT date, time)
+EXCLUDE UNKNOWN KEY;
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/array-index/bulk-loading/on-index-creation/closed/use-case-4/use-case-4.3.ddl.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/array-index/bulk-loading/on-index-creation/closed/use-case-4/use-case-4.3.ddl.sqlpp
index f571dbc..cd79b9b 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/array-index/bulk-loading/on-index-creation/closed/use-case-4/use-case-4.3.ddl.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/array-index/bulk-loading/on-index-creation/closed/use-case-4/use-case-4.3.ddl.sqlpp
@@ -19,6 +19,13 @@
 
 USE TestYelp;
 
-CREATE INDEX IdxYelpCheckinDates ON YelpCheckin (UNNEST checkin_times UNNEST dates);
-// CREATE INDEX IdxYelpCheckinDatesBusiness ON YelpCheckin ((UNNEST checkin_times UNNEST dates), business_id);
-// CREATE INDEX IdxYelpCheckinBusinessDates ON YelpCheckin (business_id, UNNEST checkin_times UNNEST dates);
+CREATE INDEX IdxYelpCheckinDates ON YelpCheckin (UNNEST checkin_times UNNEST dates) EXCLUDE UNKNOWN KEY;
+
+CREATE INDEX  IdxYelpCheckinDatesBusiness
+ON            YelpCheckin ((UNNEST checkin_times UNNEST dates),
+                           business_id)
+EXCLUDE UNKNOWN KEY;
+CREATE INDEX  IdxYelpCheckinBusinessDates
+ON            YelpCheckin (business_id,
+                           UNNEST checkin_times UNNEST dates)
+EXCLUDE UNKNOWN KEY;
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/array-index/bulk-loading/on-index-creation/closed/with-3-level-record-path/with-3-level-record-path.3.ddl.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/array-index/bulk-loading/on-index-creation/closed/with-3-level-record-path/with-3-level-record-path.3.ddl.sqlpp
index 5ef37bc..01be97a 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/array-index/bulk-loading/on-index-creation/closed/with-3-level-record-path/with-3-level-record-path.3.ddl.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/array-index/bulk-loading/on-index-creation/closed/with-3-level-record-path/with-3-level-record-path.3.ddl.sqlpp
@@ -19,4 +19,6 @@
 
 USE TestYelp;
 
-CREATE INDEX IdxYelpCheckinDates ON YelpCheckin (UNNEST checkin_data.checkin_temporal.checkin_times.dates);
+CREATE INDEX  IdxYelpCheckinDates
+ON            YelpCheckin (UNNEST checkin_data.checkin_temporal.checkin_times.dates)
+EXCLUDE UNKNOWN KEY;
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/array-index/bulk-loading/on-index-creation/closed/with-composite-pk/with-composite-pk.3.ddl.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/array-index/bulk-loading/on-index-creation/closed/with-composite-pk/with-composite-pk.3.ddl.sqlpp
index a0fc1bf..6fa8e96 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/array-index/bulk-loading/on-index-creation/closed/with-composite-pk/with-composite-pk.3.ddl.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/array-index/bulk-loading/on-index-creation/closed/with-composite-pk/with-composite-pk.3.ddl.sqlpp
@@ -19,4 +19,4 @@
 
 USE TestYelp;
 
-CREATE INDEX IdxYelpCheckinDates ON YelpCheckin (UNNEST dates);
+CREATE INDEX IdxYelpCheckinDates ON YelpCheckin (UNNEST dates) EXCLUDE UNKNOWN KEY;
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/array-index/bulk-loading/on-index-creation/closed/with-filter-fields/with-filter-fields.3.ddl.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/array-index/bulk-loading/on-index-creation/closed/with-filter-fields/with-filter-fields.3.ddl.sqlpp
index a0fc1bf..6fa8e96 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/array-index/bulk-loading/on-index-creation/closed/with-filter-fields/with-filter-fields.3.ddl.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/array-index/bulk-loading/on-index-creation/closed/with-filter-fields/with-filter-fields.3.ddl.sqlpp
@@ -19,4 +19,4 @@
 
 USE TestYelp;
 
-CREATE INDEX IdxYelpCheckinDates ON YelpCheckin (UNNEST dates);
+CREATE INDEX IdxYelpCheckinDates ON YelpCheckin (UNNEST dates) EXCLUDE UNKNOWN KEY;
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/array-index/bulk-loading/on-index-creation/open/composite-atomic/composite-atomic.3.ddl.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/array-index/bulk-loading/on-index-creation/open/composite-atomic/composite-atomic.3.ddl.sqlpp
index 8bcf2c5..8e4091e 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/array-index/bulk-loading/on-index-creation/open/composite-atomic/composite-atomic.3.ddl.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/array-index/bulk-loading/on-index-creation/open/composite-atomic/composite-atomic.3.ddl.sqlpp
@@ -23,4 +23,4 @@
     f : bigint,
     UNNEST a.b
     SELECT c.d : bigint
-);
\ No newline at end of file
+) EXCLUDE UNKNOWN KEY;
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/array-index/bulk-loading/on-index-creation/open/use-case-1/use-case-1.3.ddl.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/array-index/bulk-loading/on-index-creation/open/use-case-1/use-case-1.3.ddl.sqlpp
index 0d37224..5a6513a 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/array-index/bulk-loading/on-index-creation/open/use-case-1/use-case-1.3.ddl.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/array-index/bulk-loading/on-index-creation/open/use-case-1/use-case-1.3.ddl.sqlpp
@@ -19,4 +19,4 @@
 
 USE TestYelp;
 
-CREATE INDEX IdxYelpCheckinDates ON YelpCheckin (UNNEST dates : string ) ;
+CREATE INDEX IdxYelpCheckinDates ON YelpCheckin (UNNEST dates : string ) EXCLUDE UNKNOWN KEY;
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/array-index/bulk-loading/on-index-creation/open/use-case-2/use-case-2.3.ddl.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/array-index/bulk-loading/on-index-creation/open/use-case-2/use-case-2.3.ddl.sqlpp
index abacfe8..be8f99d 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/array-index/bulk-loading/on-index-creation/open/use-case-2/use-case-2.3.ddl.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/array-index/bulk-loading/on-index-creation/open/use-case-2/use-case-2.3.ddl.sqlpp
@@ -19,4 +19,4 @@
 
 USE TestYelp;
 
-CREATE INDEX IdxYelpCheckinDates ON YelpCheckin (UNNEST checkin_times.dates : string ) ;
+CREATE INDEX IdxYelpCheckinDates ON YelpCheckin (UNNEST checkin_times.dates : string ) EXCLUDE UNKNOWN KEY;
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/array-index/bulk-loading/on-index-creation/open/use-case-3/use-case-3.3.ddl.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/array-index/bulk-loading/on-index-creation/open/use-case-3/use-case-3.3.ddl.sqlpp
index 9594cf9..4c7e924 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/array-index/bulk-loading/on-index-creation/open/use-case-3/use-case-3.3.ddl.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/array-index/bulk-loading/on-index-creation/open/use-case-3/use-case-3.3.ddl.sqlpp
@@ -19,4 +19,4 @@
 
 USE TestYelp;
 
-CREATE INDEX IdxYelpCheckinDates ON YelpCheckin (UNNEST checkin_times SELECT date : string ) ;
+CREATE INDEX IdxYelpCheckinDates ON YelpCheckin (UNNEST checkin_times SELECT date : string ) EXCLUDE UNKNOWN KEY;
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/array-index/bulk-loading/on-index-creation/open/use-case-3/use-case-3.5.ddl.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/array-index/bulk-loading/on-index-creation/open/use-case-3/use-case-3.5.ddl.sqlpp
index 982affc..f5eddd5 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/array-index/bulk-loading/on-index-creation/open/use-case-3/use-case-3.5.ddl.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/array-index/bulk-loading/on-index-creation/open/use-case-3/use-case-3.5.ddl.sqlpp
@@ -20,4 +20,6 @@
 USE TestYelp;
 
 DROP INDEX YelpCheckin.IdxYelpCheckinDates;
-CREATE INDEX IdxYelpCheckinDates ON YelpCheckin (UNNEST checkin_times SELECT date : string , time : string ) ;
+CREATE INDEX  IdxYelpCheckinDates
+ON            YelpCheckin (UNNEST checkin_times SELECT date : string , time : string )
+EXCLUDE UNKNOWN KEY;
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/array-index/bulk-loading/on-index-creation/open/use-case-4/use-case-4.3.ddl.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/array-index/bulk-loading/on-index-creation/open/use-case-4/use-case-4.3.ddl.sqlpp
index c590ecb..176da7e 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/array-index/bulk-loading/on-index-creation/open/use-case-4/use-case-4.3.ddl.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/array-index/bulk-loading/on-index-creation/open/use-case-4/use-case-4.3.ddl.sqlpp
@@ -19,4 +19,4 @@
 
 USE TestYelp;
 
-CREATE INDEX IdxYelpCheckinDates ON YelpCheckin (UNNEST checkin_times UNNEST dates : string ) ;
+CREATE INDEX IdxYelpCheckinDates ON YelpCheckin (UNNEST checkin_times UNNEST dates : string ) EXCLUDE UNKNOWN KEY;
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/array-index/composite-index-queries/composite-index-queries.1.ddl.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/array-index/composite-index-queries/composite-index-queries.1.ddl.sqlpp
index a650bd0..e3a2e46 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/array-index/composite-index-queries/composite-index-queries.1.ddl.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/array-index/composite-index-queries/composite-index-queries.1.ddl.sqlpp
@@ -35,7 +35,7 @@
       SELECT field2 : bigint,
              field3 : bigint ),
     field4 : bigint
-);
+) EXCLUDE UNKNOWN KEY;
 CREATE INDEX      d2Idx
 ON                Dataset1 (
     field1 : bigint,
@@ -44,4 +44,4 @@
       SELECT field2 : bigint,
              field3 : bigint ),
     field4 : bigint
-);
+) EXCLUDE UNKNOWN KEY;
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/array-index/error-handling/index-include-unknown-key/index-include-unknown-key.1.ddl.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/array-index/error-handling/index-include-unknown-key/index-include-unknown-key.1.ddl.sqlpp
new file mode 100644
index 0000000..5929898
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/array-index/error-handling/index-include-unknown-key/index-include-unknown-key.1.ddl.sqlpp
@@ -0,0 +1,28 @@
+/*
+ * 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 TestDataverse IF EXISTS;
+CREATE DATAVERSE TestDataverse;
+USE TestDataverse;
+
+CREATE TYPE TestType AS { _id: bigint };
+CREATE DATASET IndexedDataset (TestType) PRIMARY KEY _id;
+
+// We MUST specify EXCLUDE UNKNOWN KEY for array indexes.
+CREATE INDEX testIndex ON IndexedDataset ( UNNEST items SELECT item: bigint );
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/array-index/error-handling/index-include-unknown-key/index-include-unknown-key.2.ddl.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/array-index/error-handling/index-include-unknown-key/index-include-unknown-key.2.ddl.sqlpp
new file mode 100644
index 0000000..192c64b
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/array-index/error-handling/index-include-unknown-key/index-include-unknown-key.2.ddl.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.
+ */
+
+DROP DATAVERSE TestDataverse IF EXISTS;
+CREATE DATAVERSE TestDataverse;
+USE TestDataverse;
+
+CREATE TYPE TestType AS { _id: bigint };
+CREATE DATASET IndexedDataset (TestType) PRIMARY KEY _id;
+
+CREATE INDEX testIndex ON IndexedDataset ( UNNEST items SELECT item: bigint ) INCLUDE UNKNOWN KEY;
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/array-index/error-handling/index-on-closed-array/index-on-closed-array.1.ddl.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/array-index/error-handling/index-on-closed-array/index-on-closed-array.1.ddl.sqlpp
index 685485b..0e9f581 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/array-index/error-handling/index-on-closed-array/index-on-closed-array.1.ddl.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/array-index/error-handling/index-on-closed-array/index-on-closed-array.1.ddl.sqlpp
@@ -35,5 +35,5 @@
 };
 
 CREATE DATASET YelpCheckin(CheckinType) PRIMARY KEY checkin_id AUTOGENERATED;
-CREATE INDEX IdxYelpCheckinDates ON YelpCheckin (UNNEST checkin_times SELECT date : string);
+CREATE INDEX IdxYelpCheckinDates ON YelpCheckin (UNNEST checkin_times SELECT date : string) EXCLUDE UNKNOWN KEY;
 
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/array-index/error-handling/index-two-array-fields/index-two-array-fields.1.ddl.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/array-index/error-handling/index-two-array-fields/index-two-array-fields.1.ddl.sqlpp
index 83d5407..ca5e69b 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/array-index/error-handling/index-two-array-fields/index-two-array-fields.1.ddl.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/array-index/error-handling/index-two-array-fields/index-two-array-fields.1.ddl.sqlpp
@@ -33,5 +33,5 @@
 };
 
 CREATE DATASET YelpCheckin(CheckinType) PRIMARY KEY checkin_id AUTOGENERATED;
-CREATE INDEX IdxYelpCheckinDates ON YelpCheckin (UNNEST dates, UNNEST times);
+CREATE INDEX IdxYelpCheckinDates ON YelpCheckin (UNNEST dates, UNNEST times) EXCLUDE UNKNOWN KEY;
 
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/array-index/error-handling/index-two-array-fields/index-two-array-fields.2.ddl.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/array-index/error-handling/index-two-array-fields/index-two-array-fields.2.ddl.sqlpp
index d610c14..5be89bd 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/array-index/error-handling/index-two-array-fields/index-two-array-fields.2.ddl.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/array-index/error-handling/index-two-array-fields/index-two-array-fields.2.ddl.sqlpp
@@ -31,4 +31,7 @@
 };
 
 CREATE DATASET YelpCheckin(CheckinType) PRIMARY KEY checkin_id AUTOGENERATED;
-CREATE INDEX IdxYelpCheckinDates ON YelpCheckin ((UNNEST checkin_times SELECT date), UNNEST checkin_times UNNEST times);
+CREATE INDEX  IdxYelpCheckinDates
+ON            YelpCheckin ((UNNEST checkin_times SELECT date),
+                           UNNEST checkin_times UNNEST times)
+EXCLUDE UNKNOWN KEY;
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/array-index/error-handling/index-with-enforced-type/index-with-enforced-type.1.ddl.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/array-index/error-handling/index-with-enforced-type/index-with-enforced-type.1.ddl.sqlpp
index baf5bc0..4838400 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/array-index/error-handling/index-with-enforced-type/index-with-enforced-type.1.ddl.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/array-index/error-handling/index-with-enforced-type/index-with-enforced-type.1.ddl.sqlpp
@@ -35,5 +35,5 @@
 };
 
 CREATE DATASET YelpCheckin(CheckinType) PRIMARY KEY checkin_id AUTOGENERATED;
-CREATE INDEX IdxYelpCheckinDates ON YelpCheckin (UNNEST checkin_times SELECT date : string) ENFORCED;
+CREATE INDEX IdxYelpCheckinDates ON YelpCheckin (UNNEST checkin_times SELECT date : string) ENFORCED EXCLUDE UNKNOWN KEY;
 
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/array-index/error-handling/invalid-array-path/invalid-array-path.1.ddl.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/array-index/error-handling/invalid-array-path/invalid-array-path.1.ddl.sqlpp
index 2402382..e2d7054 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/array-index/error-handling/invalid-array-path/invalid-array-path.1.ddl.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/array-index/error-handling/invalid-array-path/invalid-array-path.1.ddl.sqlpp
@@ -35,5 +35,5 @@
 };
 
 CREATE DATASET YelpCheckin(CheckinType) PRIMARY KEY checkin_id AUTOGENERATED;
-CREATE INDEX IdxYelpCheckinDates ON YelpCheckin (UNNEST checkin_time SELECT date);
+CREATE INDEX IdxYelpCheckinDates ON YelpCheckin (UNNEST checkin_time SELECT date) EXCLUDE UNKNOWN KEY;
 
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/array-index/error-handling/invalid-array-path/invalid-array-path.2.ddl.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/array-index/error-handling/invalid-array-path/invalid-array-path.2.ddl.sqlpp
index d658dbe..0c73ad9 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/array-index/error-handling/invalid-array-path/invalid-array-path.2.ddl.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/array-index/error-handling/invalid-array-path/invalid-array-path.2.ddl.sqlpp
@@ -35,5 +35,4 @@
 };
 
 CREATE DATASET YelpCheckin(CheckinType) PRIMARY KEY checkin_id AUTOGENERATED;
-CREATE INDEX IdxYelpCheckinDates ON YelpCheckin (UNNEST checkin_time.date);
-
+CREATE INDEX IdxYelpCheckinDates ON YelpCheckin (UNNEST checkin_time.date) EXCLUDE UNKNOWN KEY;
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/array-index/insert-upsert-delete/closed/use-case-1/use-case-1.1.ddl.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/array-index/insert-upsert-delete/closed/use-case-1/use-case-1.1.ddl.sqlpp
index 7498c23..d75e0ce 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/array-index/insert-upsert-delete/closed/use-case-1/use-case-1.1.ddl.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/array-index/insert-upsert-delete/closed/use-case-1/use-case-1.1.ddl.sqlpp
@@ -34,4 +34,4 @@
 };
 
 CREATE DATASET YelpCheckin(CheckinType) PRIMARY KEY business_id;
-CREATE INDEX IdxYelpCheckinDates ON YelpCheckin (UNNEST dates);
+CREATE INDEX IdxYelpCheckinDates ON YelpCheckin (UNNEST dates) EXCLUDE UNKNOWN KEY;
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/array-index/insert-upsert-delete/closed/use-case-2/use-case-2.1.ddl.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/array-index/insert-upsert-delete/closed/use-case-2/use-case-2.1.ddl.sqlpp
index 81b322c..aa54f8c 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/array-index/insert-upsert-delete/closed/use-case-2/use-case-2.1.ddl.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/array-index/insert-upsert-delete/closed/use-case-2/use-case-2.1.ddl.sqlpp
@@ -37,5 +37,5 @@
 };
 
 CREATE DATASET YelpCheckin(CheckinType) PRIMARY KEY business_id;
-CREATE INDEX IdxYelpCheckinDates ON YelpCheckin (UNNEST checkin_times.dates);
-CREATE INDEX IdxYelpCheckinTimes ON YelpCheckin (UNNEST checkin_times.times);
+CREATE INDEX IdxYelpCheckinDates ON YelpCheckin (UNNEST checkin_times.dates) EXCLUDE UNKNOWN KEY;
+CREATE INDEX IdxYelpCheckinTimes ON YelpCheckin (UNNEST checkin_times.times) EXCLUDE UNKNOWN KEY;
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/array-index/insert-upsert-delete/closed/use-case-3/use-case-3.1.ddl.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/array-index/insert-upsert-delete/closed/use-case-3/use-case-3.1.ddl.sqlpp
index d65a2eb..0470f10 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/array-index/insert-upsert-delete/closed/use-case-3/use-case-3.1.ddl.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/array-index/insert-upsert-delete/closed/use-case-3/use-case-3.1.ddl.sqlpp
@@ -37,5 +37,5 @@
 };
 
 CREATE DATASET YelpCheckin(CheckinType) PRIMARY KEY business_id;
-CREATE INDEX IdxYelpCheckinDates ON YelpCheckin (UNNEST checkin_times SELECT date);
-CREATE INDEX IdxYelpCheckinTimes ON YelpCheckin (UNNEST checkin_times SELECT time);
+CREATE INDEX IdxYelpCheckinDates ON YelpCheckin (UNNEST checkin_times SELECT date) EXCLUDE UNKNOWN KEY;
+CREATE INDEX IdxYelpCheckinTimes ON YelpCheckin (UNNEST checkin_times SELECT time) EXCLUDE UNKNOWN KEY;
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/array-index/insert-upsert-delete/closed/use-case-4/use-case-4.1.ddl.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/array-index/insert-upsert-delete/closed/use-case-4/use-case-4.1.ddl.sqlpp
index 590c9d3..ff693cd 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/array-index/insert-upsert-delete/closed/use-case-4/use-case-4.1.ddl.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/array-index/insert-upsert-delete/closed/use-case-4/use-case-4.1.ddl.sqlpp
@@ -37,5 +37,5 @@
 };
 
 CREATE DATASET YelpCheckin(CheckinType) PRIMARY KEY business_id;
-CREATE INDEX IdxYelpCheckinDates ON YelpCheckin (UNNEST checkin_times UNNEST dates);
-CREATE INDEX IdxYelpCheckinTimes ON YelpCheckin (UNNEST checkin_times UNNEST times);
+CREATE INDEX IdxYelpCheckinDates ON YelpCheckin (UNNEST checkin_times UNNEST dates) EXCLUDE UNKNOWN KEY;
+CREATE INDEX IdxYelpCheckinTimes ON YelpCheckin (UNNEST checkin_times UNNEST times) EXCLUDE UNKNOWN KEY;
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/array-index/insert-upsert-delete/closed/with-additional-atomic-index/with-additional-atomic-index.1.ddl.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/array-index/insert-upsert-delete/closed/with-additional-atomic-index/with-additional-atomic-index.1.ddl.sqlpp
index 1697fb3..49406b1 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/array-index/insert-upsert-delete/closed/with-additional-atomic-index/with-additional-atomic-index.1.ddl.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/array-index/insert-upsert-delete/closed/with-additional-atomic-index/with-additional-atomic-index.1.ddl.sqlpp
@@ -35,5 +35,5 @@
 };
 
 CREATE DATASET YelpCheckin(CheckinType) PRIMARY KEY checkin_id;
-CREATE INDEX IdxYelpCheckinDates ON YelpCheckin (UNNEST dates);
+CREATE INDEX IdxYelpCheckinDates ON YelpCheckin (UNNEST dates) EXCLUDE UNKNOWN KEY;
 CREATE INDEX IdxYelpCheckinBusinessID ON YelpCheckin (business_id);
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/array-index/insert-upsert-delete/closed/with-composite-sk/with-composite-sk.1.ddl.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/array-index/insert-upsert-delete/closed/with-composite-sk/with-composite-sk.1.ddl.sqlpp
index 6ff0c88..d468d7a 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/array-index/insert-upsert-delete/closed/with-composite-sk/with-composite-sk.1.ddl.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/array-index/insert-upsert-delete/closed/with-composite-sk/with-composite-sk.1.ddl.sqlpp
@@ -38,4 +38,4 @@
 };
 
 CREATE DATASET YelpCheckin(CheckinType) PRIMARY KEY checkin_id;
-CREATE INDEX IdxYelpCheckinDates ON YelpCheckin (UNNEST checkin_times SELECT date, time);
+CREATE INDEX IdxYelpCheckinDates ON YelpCheckin (UNNEST checkin_times SELECT date, time) EXCLUDE UNKNOWN KEY;
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/array-index/insert-upsert-delete/closed/with-filter-fields/with-filter-fields.1.ddl.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/array-index/insert-upsert-delete/closed/with-filter-fields/with-filter-fields.1.ddl.sqlpp
index c6739ca..193c4fb 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/array-index/insert-upsert-delete/closed/with-filter-fields/with-filter-fields.1.ddl.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/array-index/insert-upsert-delete/closed/with-filter-fields/with-filter-fields.1.ddl.sqlpp
@@ -34,4 +34,4 @@
 };
 
 CREATE DATASET YelpCheckin(CheckinType) PRIMARY KEY business_id WITH FILTER ON business_id;
-CREATE INDEX IdxYelpCheckinDates ON YelpCheckin (UNNEST dates);
+CREATE INDEX IdxYelpCheckinDates ON YelpCheckin (UNNEST dates) EXCLUDE UNKNOWN KEY;
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/array-index/insert-upsert-delete/open/use-case-1/use-case-1.1.ddl.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/array-index/insert-upsert-delete/open/use-case-1/use-case-1.1.ddl.sqlpp
index ab374bf..4dd2cc3 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/array-index/insert-upsert-delete/open/use-case-1/use-case-1.1.ddl.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/array-index/insert-upsert-delete/open/use-case-1/use-case-1.1.ddl.sqlpp
@@ -33,4 +33,4 @@
 };
 
 CREATE DATASET YelpCheckin(CheckinType) PRIMARY KEY business_id;
-CREATE INDEX IdxYelpCheckinDates ON YelpCheckin (UNNEST dates : string ) ;
+CREATE INDEX IdxYelpCheckinDates ON YelpCheckin (UNNEST dates : string ) EXCLUDE UNKNOWN KEY;
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/array-index/insert-upsert-delete/open/use-case-2/use-case-2.1.ddl.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/array-index/insert-upsert-delete/open/use-case-2/use-case-2.1.ddl.sqlpp
index ef8d1c2..37ac4ad 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/array-index/insert-upsert-delete/open/use-case-2/use-case-2.1.ddl.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/array-index/insert-upsert-delete/open/use-case-2/use-case-2.1.ddl.sqlpp
@@ -33,5 +33,5 @@
 };
 
 CREATE DATASET YelpCheckin(CheckinType) PRIMARY KEY business_id;
-CREATE INDEX IdxYelpCheckinDates ON YelpCheckin (UNNEST checkin_times.dates : string ) ;
-CREATE INDEX IdxYelpCheckinTimes ON YelpCheckin (UNNEST checkin_times.times : string ) ;
+CREATE INDEX IdxYelpCheckinDates ON YelpCheckin (UNNEST checkin_times.dates : string ) EXCLUDE UNKNOWN KEY;
+CREATE INDEX IdxYelpCheckinTimes ON YelpCheckin (UNNEST checkin_times.times : string ) EXCLUDE UNKNOWN KEY;
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/array-index/insert-upsert-delete/open/use-case-3/use-case-3.1.ddl.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/array-index/insert-upsert-delete/open/use-case-3/use-case-3.1.ddl.sqlpp
index 768692b..904dcfe 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/array-index/insert-upsert-delete/open/use-case-3/use-case-3.1.ddl.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/array-index/insert-upsert-delete/open/use-case-3/use-case-3.1.ddl.sqlpp
@@ -33,5 +33,5 @@
 };
 
 CREATE DATASET YelpCheckin(CheckinType) PRIMARY KEY business_id;
-CREATE INDEX IdxYelpCheckinDates ON YelpCheckin (UNNEST checkin_times SELECT date : string ) ;
-CREATE INDEX IdxYelpCheckinTimes ON YelpCheckin (UNNEST checkin_times SELECT time : string ) ;
+CREATE INDEX IdxYelpCheckinDates ON YelpCheckin (UNNEST checkin_times SELECT date : string ) EXCLUDE UNKNOWN KEY;
+CREATE INDEX IdxYelpCheckinTimes ON YelpCheckin (UNNEST checkin_times SELECT time : string ) EXCLUDE UNKNOWN KEY;
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/array-index/insert-upsert-delete/open/use-case-4/use-case-4.1.ddl.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/array-index/insert-upsert-delete/open/use-case-4/use-case-4.1.ddl.sqlpp
index 068482f..0844653 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/array-index/insert-upsert-delete/open/use-case-4/use-case-4.1.ddl.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/array-index/insert-upsert-delete/open/use-case-4/use-case-4.1.ddl.sqlpp
@@ -33,5 +33,5 @@
 };
 
 CREATE DATASET YelpCheckin(CheckinType) PRIMARY KEY business_id;
-CREATE INDEX IdxYelpCheckinDates ON YelpCheckin (UNNEST checkin_times UNNEST dates : string ) ;
-CREATE INDEX IdxYelpCheckinTimes ON YelpCheckin (UNNEST checkin_times UNNEST times : string ) ;
+CREATE INDEX IdxYelpCheckinDates ON YelpCheckin (UNNEST checkin_times UNNEST dates : string ) EXCLUDE UNKNOWN KEY;
+CREATE INDEX IdxYelpCheckinTimes ON YelpCheckin (UNNEST checkin_times UNNEST times : string ) EXCLUDE UNKNOWN KEY;
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/array-index/insert-upsert-delete/open/with-additional-atomic-index/with-additional-atomic-index.1.ddl.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/array-index/insert-upsert-delete/open/with-additional-atomic-index/with-additional-atomic-index.1.ddl.sqlpp
index cc59e2f..d7d01c3 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/array-index/insert-upsert-delete/open/with-additional-atomic-index/with-additional-atomic-index.1.ddl.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/array-index/insert-upsert-delete/open/with-additional-atomic-index/with-additional-atomic-index.1.ddl.sqlpp
@@ -33,5 +33,5 @@
 };
 
 CREATE DATASET YelpCheckin(CheckinType) PRIMARY KEY checkin_id;
-CREATE INDEX IdxYelpCheckinDates ON YelpCheckin (UNNEST dates : string ) ;
-CREATE INDEX IdxYelpCheckinBusinessID ON YelpCheckin (business_id : string ?) ;
+CREATE INDEX IdxYelpCheckinDates ON YelpCheckin (UNNEST dates : string ) EXCLUDE UNKNOWN KEY;
+CREATE INDEX IdxYelpCheckinBusinessID ON YelpCheckin (business_id : string ?);
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/array-index/insert-upsert-delete/open/with-composite-sk/with-composite-sk.1.ddl.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/array-index/insert-upsert-delete/open/with-composite-sk/with-composite-sk.1.ddl.sqlpp
index da9eb7e..9d81f0a 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/array-index/insert-upsert-delete/open/with-composite-sk/with-composite-sk.1.ddl.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/array-index/insert-upsert-delete/open/with-composite-sk/with-composite-sk.1.ddl.sqlpp
@@ -33,4 +33,6 @@
 };
 
 CREATE DATASET YelpCheckin(CheckinType) PRIMARY KEY checkin_id;
-CREATE INDEX IdxYelpCheckinDates ON YelpCheckin (UNNEST checkin_times SELECT date : string , time : string );
+CREATE INDEX  IdxYelpCheckinDates
+ON            YelpCheckin (UNNEST checkin_times SELECT date : string , time : string )
+EXCLUDE UNKNOWN KEY;
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/array-index/join-quantified-queries/use-case-1/use-case-1.1.ddl.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/array-index/join-quantified-queries/use-case-1/use-case-1.1.ddl.sqlpp
index 29e7dae..5e91e18 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/array-index/join-quantified-queries/use-case-1/use-case-1.1.ddl.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/array-index/join-quantified-queries/use-case-1/use-case-1.1.ddl.sqlpp
@@ -36,5 +36,5 @@
 CREATE DATASET YelpCheckinA(CheckinType) PRIMARY KEY checkin_id AUTOGENERATED;
 CREATE DATASET YelpCheckinB(CheckinType) PRIMARY KEY checkin_id AUTOGENERATED;
 CREATE DATASET YelpCheckinDateMarkers (CheckinDatesToMarkersType) PRIMARY KEY marker;
-CREATE INDEX IdxYelpCheckinDatesA ON YelpCheckinA (UNNEST dates);
-CREATE INDEX IdxYelpCheckinDatesB ON YelpCheckinB (UNNEST dates);
+CREATE INDEX IdxYelpCheckinDatesA ON YelpCheckinA (UNNEST dates) EXCLUDE UNKNOWN KEY;
+CREATE INDEX IdxYelpCheckinDatesB ON YelpCheckinB (UNNEST dates) EXCLUDE UNKNOWN KEY;
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/array-index/join-quantified-queries/use-case-2/use-case-2.1.ddl.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/array-index/join-quantified-queries/use-case-2/use-case-2.1.ddl.sqlpp
index 4af2ca9..4baf2d8 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/array-index/join-quantified-queries/use-case-2/use-case-2.1.ddl.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/array-index/join-quantified-queries/use-case-2/use-case-2.1.ddl.sqlpp
@@ -38,4 +38,4 @@
 
 CREATE DATASET YelpCheckinA(CheckinType) PRIMARY KEY checkin_id AUTOGENERATED;
 CREATE DATASET YelpCheckinDateMarkers (CheckinDatesToMarkersType) PRIMARY KEY marker;
-CREATE INDEX IdxYelpCheckinDatesA ON YelpCheckinA (UNNEST checkin_times.dates);
+CREATE INDEX IdxYelpCheckinDatesA ON YelpCheckinA (UNNEST checkin_times.dates) EXCLUDE UNKNOWN KEY;
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/array-index/join-quantified-queries/use-case-3/use-case-3.1.ddl.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/array-index/join-quantified-queries/use-case-3/use-case-3.1.ddl.sqlpp
index 8406e6b..a20eeab 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/array-index/join-quantified-queries/use-case-3/use-case-3.1.ddl.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/array-index/join-quantified-queries/use-case-3/use-case-3.1.ddl.sqlpp
@@ -38,3 +38,4 @@
 
 CREATE DATASET YelpCheckin(CheckinType) PRIMARY KEY checkin_id AUTOGENERATED;
 CREATE DATASET YelpCheckinDateMarkers (CheckinDatesToMarkersType) PRIMARY KEY marker;
+CREATE INDEX IdxYelpCheckinDates ON YelpCheckin (UNNEST checkin_times SELECT date ) EXCLUDE UNKNOWN KEY;
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/array-index/join-quantified-queries/use-case-4/use-case-4.1.ddl.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/array-index/join-quantified-queries/use-case-4/use-case-4.1.ddl.sqlpp
index 8f2acb1..9d0a698 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/array-index/join-quantified-queries/use-case-4/use-case-4.1.ddl.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/array-index/join-quantified-queries/use-case-4/use-case-4.1.ddl.sqlpp
@@ -40,5 +40,5 @@
 CREATE DATASET YelpCheckinA(CheckinType) PRIMARY KEY checkin_id AUTOGENERATED;
 CREATE DATASET YelpCheckinB(CheckinType) PRIMARY KEY checkin_id AUTOGENERATED;
 CREATE DATASET YelpCheckinDateMarkers (CheckinDatesToMarkersType) PRIMARY KEY marker;
-CREATE INDEX IdxYelpCheckinDatesA ON YelpCheckinA (UNNEST checkin_times UNNEST dates);
-CREATE INDEX IdxYelpCheckinDatesB ON YelpCheckinB (UNNEST checkin_times UNNEST dates);
+CREATE INDEX IdxYelpCheckinDatesA ON YelpCheckinA (UNNEST checkin_times UNNEST dates) EXCLUDE UNKNOWN KEY;
+CREATE INDEX IdxYelpCheckinDatesB ON YelpCheckinB (UNNEST checkin_times UNNEST dates) EXCLUDE UNKNOWN KEY;
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/array-index/join-unnest-queries/loj-subquery/loj-subquery.1.ddl.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/array-index/join-unnest-queries/loj-subquery/loj-subquery.1.ddl.sqlpp
index 1074ef0..db03322 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/array-index/join-unnest-queries/loj-subquery/loj-subquery.1.ddl.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/array-index/join-unnest-queries/loj-subquery/loj-subquery.1.ddl.sqlpp
@@ -31,4 +31,4 @@
 ON                IndexedDataset (
     UNNEST items
     SELECT val : bigint
-);
\ No newline at end of file
+) EXCLUDE UNKNOWN KEY;
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/array-index/join-unnest-queries/use-case-1/use-case-1.4.ddl.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/array-index/join-unnest-queries/use-case-1/use-case-1.4.ddl.sqlpp
index a0fc1bf..6fa8e96 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/array-index/join-unnest-queries/use-case-1/use-case-1.4.ddl.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/array-index/join-unnest-queries/use-case-1/use-case-1.4.ddl.sqlpp
@@ -19,4 +19,4 @@
 
 USE TestYelp;
 
-CREATE INDEX IdxYelpCheckinDates ON YelpCheckin (UNNEST dates);
+CREATE INDEX IdxYelpCheckinDates ON YelpCheckin (UNNEST dates) EXCLUDE UNKNOWN KEY;
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/array-index/join-unnest-queries/use-case-2/use-case-2.4.ddl.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/array-index/join-unnest-queries/use-case-2/use-case-2.4.ddl.sqlpp
index 0ab72fe..caaaad0 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/array-index/join-unnest-queries/use-case-2/use-case-2.4.ddl.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/array-index/join-unnest-queries/use-case-2/use-case-2.4.ddl.sqlpp
@@ -19,4 +19,4 @@
 
 USE TestYelp;
 
-CREATE INDEX IdxYelpCheckinDates ON YelpCheckin (UNNEST checkin_times.dates);
+CREATE INDEX IdxYelpCheckinDates ON YelpCheckin (UNNEST checkin_times.dates) EXCLUDE UNKNOWN KEY;
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/array-index/join-unnest-queries/use-case-3/use-case-3.4.ddl.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/array-index/join-unnest-queries/use-case-3/use-case-3.4.ddl.sqlpp
index ee911b4..4154d37 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/array-index/join-unnest-queries/use-case-3/use-case-3.4.ddl.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/array-index/join-unnest-queries/use-case-3/use-case-3.4.ddl.sqlpp
@@ -19,4 +19,4 @@
 
 USE TestYelp;
 
-CREATE INDEX IdxYelpCheckinDates ON YelpCheckin (UNNEST checkin_times SELECT date);
+CREATE INDEX IdxYelpCheckinDates ON YelpCheckin (UNNEST checkin_times SELECT date) EXCLUDE UNKNOWN KEY;
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/array-index/join-unnest-queries/use-case-4/use-case-4.4.ddl.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/array-index/join-unnest-queries/use-case-4/use-case-4.4.ddl.sqlpp
index 05a7c76..e59799e 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/array-index/join-unnest-queries/use-case-4/use-case-4.4.ddl.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/array-index/join-unnest-queries/use-case-4/use-case-4.4.ddl.sqlpp
@@ -19,4 +19,4 @@
 
 USE TestYelp;
 
-CREATE INDEX IdxYelpCheckinDates ON YelpCheckin (UNNEST checkin_times UNNEST dates);
+CREATE INDEX IdxYelpCheckinDates ON YelpCheckin (UNNEST checkin_times UNNEST dates) EXCLUDE UNKNOWN KEY;
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/array-index/join-unnest-queries/with-open-index/with-open-index.4.ddl.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/array-index/join-unnest-queries/with-open-index/with-open-index.4.ddl.sqlpp
index 0d37224..5a6513a 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/array-index/join-unnest-queries/with-open-index/with-open-index.4.ddl.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/array-index/join-unnest-queries/with-open-index/with-open-index.4.ddl.sqlpp
@@ -19,4 +19,4 @@
 
 USE TestYelp;
 
-CREATE INDEX IdxYelpCheckinDates ON YelpCheckin (UNNEST dates : string ) ;
+CREATE INDEX IdxYelpCheckinDates ON YelpCheckin (UNNEST dates : string ) EXCLUDE UNKNOWN KEY;
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/array-index/metadata/closed/use-case-1/use-case-1.1.ddl.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/array-index/metadata/closed/use-case-1/use-case-1.1.ddl.sqlpp
index 5e18a83..758f0e3 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/array-index/metadata/closed/use-case-1/use-case-1.1.ddl.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/array-index/metadata/closed/use-case-1/use-case-1.1.ddl.sqlpp
@@ -33,5 +33,5 @@
 
 CREATE DATASET YelpCheckin(CheckinType) PRIMARY KEY checkin_id AUTOGENERATED;
 CREATE INDEX IdxYelpCheckinBusinessID ON YelpCheckin (business_id);
-CREATE INDEX IdxYelpCheckinDates ON YelpCheckin (UNNEST dates);
+CREATE INDEX IdxYelpCheckinDates ON YelpCheckin (UNNEST dates) EXCLUDE UNKNOWN KEY;
 
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/array-index/metadata/closed/use-case-2/use-case-2.1.ddl.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/array-index/metadata/closed/use-case-2/use-case-2.1.ddl.sqlpp
index fcdcde7..c1eb1c0 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/array-index/metadata/closed/use-case-2/use-case-2.1.ddl.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/array-index/metadata/closed/use-case-2/use-case-2.1.ddl.sqlpp
@@ -36,4 +36,4 @@
 
 CREATE DATASET YelpCheckin(CheckinType) PRIMARY KEY checkin_id AUTOGENERATED;
 CREATE INDEX IdxYelpCheckinBusinessID ON YelpCheckin (business_id);
-CREATE INDEX IdxYelpCheckinDates ON YelpCheckin (UNNEST checkin_times.dates);
+CREATE INDEX IdxYelpCheckinDates ON YelpCheckin (UNNEST checkin_times.dates) EXCLUDE UNKNOWN KEY;
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/array-index/metadata/closed/use-case-3/use-case-3.1.ddl.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/array-index/metadata/closed/use-case-3/use-case-3.1.ddl.sqlpp
index 4b98d54..c144bd7 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/array-index/metadata/closed/use-case-3/use-case-3.1.ddl.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/array-index/metadata/closed/use-case-3/use-case-3.1.ddl.sqlpp
@@ -36,5 +36,5 @@
 
 CREATE DATASET YelpCheckin(CheckinType) PRIMARY KEY checkin_id AUTOGENERATED;
 CREATE INDEX IdxYelpCheckinBusinessID ON YelpCheckin (business_id);
-CREATE INDEX IdxYelpCheckinDate ON YelpCheckin (UNNEST checkin_times SELECT date);
-CREATE INDEX IdxYelpCheckinDateTime ON YelpCheckin (UNNEST checkin_times SELECT date, time);
+CREATE INDEX IdxYelpCheckinDate ON YelpCheckin (UNNEST checkin_times SELECT date) EXCLUDE UNKNOWN KEY;
+CREATE INDEX IdxYelpCheckinDateTime ON YelpCheckin (UNNEST checkin_times SELECT date, time) EXCLUDE UNKNOWN KEY;
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/array-index/metadata/closed/use-case-4/use-case-4.1.ddl.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/array-index/metadata/closed/use-case-4/use-case-4.1.ddl.sqlpp
index 205d0bb..4458dc2 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/array-index/metadata/closed/use-case-4/use-case-4.1.ddl.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/array-index/metadata/closed/use-case-4/use-case-4.1.ddl.sqlpp
@@ -36,5 +36,5 @@
 
 CREATE DATASET YelpCheckin(CheckinType) PRIMARY KEY checkin_id AUTOGENERATED;
 CREATE INDEX IdxYelpCheckinBusinessID ON YelpCheckin (business_id);
-CREATE INDEX IdxYelpCheckinDates ON YelpCheckin (UNNEST checkin_times UNNEST dates);
+CREATE INDEX IdxYelpCheckinDates ON YelpCheckin (UNNEST checkin_times UNNEST dates) EXCLUDE UNKNOWN KEY;
 
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/array-index/metadata/closed/with-3-level-record-path/with-3-level-record-path.1.ddl.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/array-index/metadata/closed/with-3-level-record-path/with-3-level-record-path.1.ddl.sqlpp
index 22c7899..cf95c07 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/array-index/metadata/closed/with-3-level-record-path/with-3-level-record-path.1.ddl.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/array-index/metadata/closed/with-3-level-record-path/with-3-level-record-path.1.ddl.sqlpp
@@ -40,5 +40,7 @@
 
 CREATE DATASET YelpCheckin(CheckinType) PRIMARY KEY checkin_id AUTOGENERATED;
 CREATE INDEX IdxYelpCheckinBusinessID ON YelpCheckin (business_id);
-CREATE INDEX IdxYelpCheckinDates ON YelpCheckin (UNNEST checkin_data.checkin_temporal.checkin_times.dates);
+CREATE INDEX  IdxYelpCheckinDates
+ON            YelpCheckin (UNNEST checkin_data.checkin_temporal.checkin_times.dates)
+EXCLUDE UNKNOWN KEY;
 
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/array-index/metadata/closed/with-composite-array-different-indicators/with-composite-array-different-indicators.1.ddl.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/array-index/metadata/closed/with-composite-array-different-indicators/with-composite-array-different-indicators.1.ddl.sqlpp
index 27bc78a..f70b1e1 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/array-index/metadata/closed/with-composite-array-different-indicators/with-composite-array-different-indicators.1.ddl.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/array-index/metadata/closed/with-composite-array-different-indicators/with-composite-array-different-indicators.1.ddl.sqlpp
@@ -36,5 +36,5 @@
 
 CREATE DATASET YelpCheckin(CheckinType) PRIMARY KEY checkin_id AUTOGENERATED;
 CREATE INDEX IdxYelpCheckinBusinessID ON YelpCheckin (business_id);
-CREATE INDEX IdxYelpCheckinDateTime ON YelpCheckin (UNNEST checkin_times SELECT date, t.time);
+CREATE INDEX IdxYelpCheckinDateTime ON YelpCheckin (UNNEST checkin_times SELECT date, t.time) EXCLUDE UNKNOWN KEY;
 
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/array-index/metadata/closed/with-composite-sk/with-composite-sk.1.ddl.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/array-index/metadata/closed/with-composite-sk/with-composite-sk.1.ddl.sqlpp
index da4ad89..14eb194 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/array-index/metadata/closed/with-composite-sk/with-composite-sk.1.ddl.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/array-index/metadata/closed/with-composite-sk/with-composite-sk.1.ddl.sqlpp
@@ -33,5 +33,5 @@
 
 CREATE DATASET YelpCheckin(CheckinType) PRIMARY KEY checkin_id AUTOGENERATED;
 CREATE INDEX IdxYelpCheckinBusinessID ON YelpCheckin (business_id);
-CREATE INDEX IdxYelpBusinessCheckinDates ON YelpCheckin (business_id, UNNEST dates);
-CREATE INDEX IdxYelpCheckinDatesBusiness ON YelpCheckin (UNNEST dates, business_id);
+CREATE INDEX IdxYelpBusinessCheckinDates ON YelpCheckin (business_id, UNNEST dates) EXCLUDE UNKNOWN KEY;
+CREATE INDEX IdxYelpCheckinDatesBusiness ON YelpCheckin (UNNEST dates, business_id) EXCLUDE UNKNOWN KEY;
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/array-index/metadata/open/complex-structures/complex-structures-01.1.ddl.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/array-index/metadata/open/complex-structures/complex-structures-01.1.ddl.sqlpp
index c0a4d1d..e8d78ef 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/array-index/metadata/open/complex-structures/complex-structures-01.1.ddl.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/array-index/metadata/open/complex-structures/complex-structures-01.1.ddl.sqlpp
@@ -38,42 +38,50 @@
 -- Fully open index 1. Unnest flags: [0, 1, 0]
 CREATE INDEX      testIndex1
 ON                TestDataset ( UNNEST open_field_1.open_field_2
-                                SELECT open_field_3a : bigint );
+                                SELECT open_field_3a : bigint )
+EXCLUDE UNKNOWN KEY;
 
 -- Fully open index 2. Unnest flags: [0, 1, 0, 0]
 CREATE INDEX      testIndex2
 ON                TestDataset ( UNNEST open_field_1.open_field_2
-                                SELECT open_field_3b.open_field_4 : bigint );
+                                SELECT open_field_3b.open_field_4 : bigint )
+EXCLUDE UNKNOWN KEY;
 
 -- Fully open index 3. Unnest flags: [0, 1, 0, 1]
 CREATE INDEX      testIndex3
 ON                TestDataset ( UNNEST open_field_1.open_field_2
-                                UNNEST open_field_3c.open_field_4a : bigint );
+                                UNNEST open_field_3c.open_field_4a : bigint )
+EXCLUDE UNKNOWN KEY;
 
 -- Fully open index 4. Unnest flags: [0, 1, 0, 1, 0]
 CREATE INDEX      testIndex4
 ON                TestDataset ( UNNEST open_field_1.open_field_2
                                 UNNEST open_field_3c.open_field_4b
-                                SELECT open_field_5 : bigint );
+                                SELECT open_field_5 : bigint )
+EXCLUDE UNKNOWN KEY;
 
 
 -- Partially open index 1.  [0, 1, 0]
 CREATE INDEX      testIndex1c
 ON                TestDataset ( UNNEST closed_field_1.open_field_2
-                                SELECT open_field_3a : bigint );
+                                SELECT open_field_3a : bigint )
+EXCLUDE UNKNOWN KEY;
 
 -- Partially open index 2. Unnest flags: [0, 1, 0, 0]
 CREATE INDEX      testIndex2c
 ON                TestDataset ( UNNEST closed_field_1.closed_field_2
-                                SELECT open_field_3b.open_field_4 : bigint );
+                                SELECT open_field_3b.open_field_4 : bigint )
+EXCLUDE UNKNOWN KEY;
 
 -- Partially open index 3. Unnest flags: [0, 1, 0, 1]
 CREATE INDEX      testIndex3c
 ON                TestDataset ( UNNEST closed_field_1.closed_field_2
-                                UNNEST closed_field_3.open_field_4a : bigint );
+                                UNNEST closed_field_3.open_field_4a : bigint )
+EXCLUDE UNKNOWN KEY;
 
 -- Partially open index 4. Unnest flags: [0, 1, 0, 1, 0]
 CREATE INDEX      testIndex4c
 ON                TestDataset ( UNNEST closed_field_1.closed_field_2
                                 UNNEST closed_field_3.closed_field_4
-                                SELECT open_field_5 : bigint );
+                                SELECT open_field_5 : bigint )
+EXCLUDE UNKNOWN KEY;
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/array-index/metadata/open/use-case-1/use-case-1.1.ddl.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/array-index/metadata/open/use-case-1/use-case-1.1.ddl.sqlpp
index 62d70c3..d5c0a72 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/array-index/metadata/open/use-case-1/use-case-1.1.ddl.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/array-index/metadata/open/use-case-1/use-case-1.1.ddl.sqlpp
@@ -30,6 +30,6 @@
 };
 
 CREATE DATASET YelpCheckin(CheckinType) PRIMARY KEY checkin_id AUTOGENERATED;
-CREATE INDEX IdxYelpCheckinBusinessID ON YelpCheckin (business_id : string?) ;
-CREATE INDEX IdxYelpCheckinDates ON YelpCheckin (UNNEST dates: string) ;
+CREATE INDEX IdxYelpCheckinBusinessID ON YelpCheckin (business_id : string?);
+CREATE INDEX IdxYelpCheckinDates ON YelpCheckin (UNNEST dates: string) EXCLUDE UNKNOWN KEY;
 
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/array-index/metadata/open/use-case-2/use-case-2.1.ddl.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/array-index/metadata/open/use-case-2/use-case-2.1.ddl.sqlpp
index 0edb2cb..2fc09bf 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/array-index/metadata/open/use-case-2/use-case-2.1.ddl.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/array-index/metadata/open/use-case-2/use-case-2.1.ddl.sqlpp
@@ -30,6 +30,6 @@
 };
 
 CREATE DATASET YelpCheckin(CheckinType) PRIMARY KEY checkin_id AUTOGENERATED;
-CREATE INDEX IdxYelpCheckinBusinessID ON YelpCheckin (business_id : string?) ;
-CREATE INDEX IdxYelpCheckinDates ON YelpCheckin (UNNEST checkin_times.dates : string ) ;
+CREATE INDEX IdxYelpCheckinBusinessID ON YelpCheckin (business_id : string?);
+CREATE INDEX IdxYelpCheckinDates ON YelpCheckin (UNNEST checkin_times.dates : string ) EXCLUDE UNKNOWN KEY;
 
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/array-index/metadata/open/use-case-3/use-case-3.1.ddl.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/array-index/metadata/open/use-case-3/use-case-3.1.ddl.sqlpp
index 733d2d9..89e7cc1 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/array-index/metadata/open/use-case-3/use-case-3.1.ddl.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/array-index/metadata/open/use-case-3/use-case-3.1.ddl.sqlpp
@@ -30,6 +30,6 @@
 };
 
 CREATE DATASET YelpCheckin(CheckinType) PRIMARY KEY checkin_id AUTOGENERATED;
-CREATE INDEX IdxYelpCheckinBusinessID ON YelpCheckin (business_id : string ?) ;
-CREATE INDEX IdxYelpCheckinDate ON YelpCheckin (UNNEST checkin_times SELECT date : string ) ;
-CREATE INDEX IdxYelpCheckinTime ON YelpCheckin (UNNEST checkin_times SELECT time : string ) ;
+CREATE INDEX IdxYelpCheckinBusinessID ON YelpCheckin (business_id : string ?);
+CREATE INDEX IdxYelpCheckinDate ON YelpCheckin (UNNEST checkin_times SELECT date : string ) EXCLUDE UNKNOWN KEY;
+CREATE INDEX IdxYelpCheckinTime ON YelpCheckin (UNNEST checkin_times SELECT time : string ) EXCLUDE UNKNOWN KEY;
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/array-index/metadata/open/use-case-4/use-case-4.1.ddl.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/array-index/metadata/open/use-case-4/use-case-4.1.ddl.sqlpp
index 8ea3bfe..82f80fd 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/array-index/metadata/open/use-case-4/use-case-4.1.ddl.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/array-index/metadata/open/use-case-4/use-case-4.1.ddl.sqlpp
@@ -30,6 +30,6 @@
 };
 
 CREATE DATASET YelpCheckin(CheckinType) PRIMARY KEY checkin_id AUTOGENERATED;
-CREATE INDEX IdxYelpCheckinBusinessID ON YelpCheckin (business_id : string?) ;
-CREATE INDEX IdxYelpCheckinDates ON YelpCheckin (UNNEST checkin_times UNNEST dates : string ) ;
+CREATE INDEX IdxYelpCheckinBusinessID ON YelpCheckin (business_id : string?);
+CREATE INDEX IdxYelpCheckinDates ON YelpCheckin (UNNEST checkin_times UNNEST dates : string ) EXCLUDE UNKNOWN KEY;
 
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/array-index/metadata/open/with-3-level-record-path/with-3-level-record-path.1.ddl.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/array-index/metadata/open/with-3-level-record-path/with-3-level-record-path.1.ddl.sqlpp
index c9b993c..00a06ce 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/array-index/metadata/open/with-3-level-record-path/with-3-level-record-path.1.ddl.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/array-index/metadata/open/with-3-level-record-path/with-3-level-record-path.1.ddl.sqlpp
@@ -30,5 +30,7 @@
 };
 
 CREATE DATASET YelpCheckin(CheckinType) PRIMARY KEY checkin_id AUTOGENERATED;
-CREATE INDEX IdxYelpCheckinDates ON YelpCheckin (UNNEST checkin_data.checkin_temporal.checkin_times.dates : string ) ;
+CREATE INDEX  IdxYelpCheckinDates
+ON            YelpCheckin (UNNEST checkin_data.checkin_temporal.checkin_times.dates : string )
+EXCLUDE UNKNOWN KEY;
 
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/array-index/metadata/open/with-composite-array-different-indicators/with-composite-array-different-indicators.1.ddl.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/array-index/metadata/open/with-composite-array-different-indicators/with-composite-array-different-indicators.1.ddl.sqlpp
index 5747a3c..2769349 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/array-index/metadata/open/with-composite-array-different-indicators/with-composite-array-different-indicators.1.ddl.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/array-index/metadata/open/with-composite-array-different-indicators/with-composite-array-different-indicators.1.ddl.sqlpp
@@ -30,5 +30,8 @@
 };
 
 CREATE DATASET YelpCheckin(CheckinType) PRIMARY KEY checkin_id AUTOGENERATED;
-CREATE INDEX IdxYelpCheckinDateTime ON YelpCheckin (UNNEST checkin_times SELECT date : string , t.time : string ) ;
+CREATE INDEX  IdxYelpCheckinDateTime
+ON            YelpCheckin (UNNEST checkin_times SELECT date : string ,
+                           t.time : string )
+EXCLUDE UNKNOWN KEY;
 
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/array-index/metadata/open/with-composite-sk/with-composite-sk.1.ddl.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/array-index/metadata/open/with-composite-sk/with-composite-sk.1.ddl.sqlpp
index cea2674..6194b55 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/array-index/metadata/open/with-composite-sk/with-composite-sk.1.ddl.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/array-index/metadata/open/with-composite-sk/with-composite-sk.1.ddl.sqlpp
@@ -30,19 +30,21 @@
 };
 
 CREATE DATASET YelpCheckin(CheckinType) PRIMARY KEY checkin_id AUTOGENERATED;
-CREATE INDEX IdxYelpBusinessCheckinDates ON YelpCheckin (business_id : string, UNNEST dates : string);
+CREATE INDEX  IdxYelpBusinessCheckinDates
+ON            YelpCheckin (business_id : string, UNNEST dates : string)
+EXCLUDE UNKNOWN KEY;
 
 -- More complex indexes created below.
 CREATE INDEX IdxYelp1 ON YelpCheckin (
     ( UNNEST outer_dates_1
       SELECT date : string ),
     backup_business_id : string
-);
+) EXCLUDE UNKNOWN KEY;
 CREATE INDEX IdxYelp2 ON YelpCheckin (
     business_id : string,
     ( UNNEST outer_dates_2
       SELECT time : string )
-);
+) EXCLUDE UNKNOWN KEY;
 CREATE INDEX IdxYelp3 ON YelpCheckin (
     business_id : string,
     ( UNNEST outer_dates
@@ -50,4 +52,4 @@
       SELECT date : string,
              time : string ),
     backup_business_id : string
-);
\ No newline at end of file
+) EXCLUDE UNKNOWN KEY;
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/array-index/select-quantified-queries/use-case-1/use-case-1.2.update.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/array-index/select-quantified-queries/use-case-1/use-case-1.2.update.sqlpp
index b75bf1b..39fd911 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/array-index/select-quantified-queries/use-case-1/use-case-1.2.update.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/array-index/select-quantified-queries/use-case-1/use-case-1.2.update.sqlpp
@@ -19,258 +19,6 @@
 
 USE TestYelp;
 
-INSERT INTO YelpCheckin (
-    [
-        {
-            "business_id": "--1UhMGODdWsrMastO9DZw",
-            "dates": [
-                "2016-04-26 19:49:16",
-                "2016-08-30 18:36:57",
-                "2016-10-15 02:45:18",
-                "2016-11-18 01:54:50",
-                "2017-04-20 18:39:06",
-                "2017-05-03 17:58:02",
-                "2019-03-19 22:04:48"
-            ]
-        },
-        {
-            "business_id": "--EF5N7P70J_UYBTPypYlA",
-            "dates": [
-                "2018-05-25 19:52:07",
-                "2018-09-18 16:09:44",
-                "2019-10-18 21:29:09"
-            ]
-        },
-        {
-            "business_id": "--Ni3oJ4VOqfOEu7Sj2Vzg",
-            "dates": [
-                "2019-06-07 17:54:58"
-            ]
-        },
-        {
-            "business_id": "--Y1Adl1YUWfYIRSd8vkmA",
-            "dates": [
-                "2011-05-03 20:54:05",
-                "2011-08-23 20:49:45",
-                "2014-12-04 06:13:01",
-                "2016-11-16 19:25:55"
-            ]
-        },
-        {
-            "business_id": "--YPwqIlRJrhHkJcjY3eiA",
-            "dates": [
-                "2016-06-18 21:35:45",
-                "2016-10-15 18:17:51"
-            ]
-        },
-        {
-            "business_id": "--e8PjCNhEz32pprnPhCwQ",
-            "dates": [
-                "2015-04-02 21:45:17"
-            ]
-        },
-        {
-            "business_id": "--kinfHwmtdjz03g8B8z8Q",
-            "dates": [
-                "2014-08-27 17:49:18",
-                "2015-12-19 21:30:31",
-                "2018-11-27 15:53:50"
-            ]
-        },
-        {
-            "business_id": "--q6datkI-f0EoVheXNEeQ",
-            "dates": [
-                "2014-01-28 20:56:04",
-                "2014-11-16 16:11:58",
-                "2015-11-15 19:21:53",
-                "2015-11-15 19:33:39"
-            ]
-        },
-        {
-            "business_id": "--qvQS4MigHPykD2GV0-zw",
-            "dates": [
-                "2019-04-11 18:30:12"
-            ]
-        },
-        {
-            "business_id": "--wIGbLEhlpl_UeAIyDmZQ",
-            "dates": [
-                "2015-06-06 20:01:06",
-                "2019-03-14 22:01:52"
-            ]
-        },
-        {
-            "business_id": "-0FA-Qdi3SPYIoJz9UQw-A",
-            "dates": [
-                "2018-09-29 18:55:17",
-                "2018-10-20 16:48:05",
-                "2018-10-20 22:20:24"
-            ]
-        },
-        {
-            "business_id": "-0Hj1hb_XW6ybWq2M7QhGA",
-            "dates": [
-                "2011-04-23 21:11:22",
-                "2014-05-04 19:42:48",
-                "2014-05-11 19:16:08",
-                "2014-06-04 19:14:18",
-                "2015-12-05 19:22:42",
-                "2017-05-15 23:19:00"
-            ]
-        },
-        {
-            "business_id": "-0KMvRFwDWdVBeTpT11iHw",
-            "dates": [
-                "2012-07-13 21:43:57",
-                "2016-12-24 02:27:31",
-                "2017-08-31 00:35:26"
-            ]
-        },
-        {
-            "business_id": "-0LPtgJC31FWMrMv317p0Q",
-            "dates": [
-                "2013-04-13 12:35:33",
-                "2013-08-19 23:35:49",
-                "2013-10-04 19:14:56"
-            ]
-        },
-        {
-            "business_id": "-0M3o2uWBnQZwd3hmfEwuw",
-            "dates": [
-                "2016-09-10 19:26:19",
-                "2018-09-08 14:15:37",
-                "2019-09-13 22:47:25"
-            ]
-        },
-        {
-            "business_id": "-0RRiWDtfnS16AKCtfvBZg",
-            "dates": [
-                "2017-05-19 14:30:16",
-                "2017-05-19 14:30:25",
-                "2017-08-28 15:49:37",
-                "2017-09-20 20:19:51",
-                "2017-10-01 16:31:05",
-                "2017-10-01 16:56:27",
-                "2017-12-27 23:33:20"
-            ]
-        },
-        {
-            "business_id": "-0Soj75v-XoRcf2ERr8Bmg",
-            "dates": [
-                "2019-06-05 18:22:49"
-            ]
-        },
-        {
-            "business_id": "-0ZumLlFjMh4ZW1z2nXGug",
-            "dates": [
-                "2011-09-24 21:37:32",
-                "2014-03-10 20:20:07",
-                "2015-05-27 00:40:24",
-                "2015-08-29 17:58:15",
-                "2018-03-16 15:03:26"
-            ]
-        },
-        {
-            "business_id": "-0aOudcaAyac0VJbMX-L1g",
-            "dates": [
-                "2015-03-16 23:51:16",
-                "2015-12-21 04:48:01",
-                "2016-10-28 20:22:42",
-                "2016-10-28 20:23:00"
-            ]
-        },
-        {
-            "business_id": "-0b86isaXMY0v4g-V8GZ9Q",
-            "dates": [
-                "2013-10-22 16:49:21",
-                "2014-11-21 17:39:24"
-            ]
-        },
-        {
-            "business_id": "-0d-BfFSU0bwLcnMaGRxYw",
-            "dates": [
-                "2014-08-07 18:30:48",
-                "2014-09-16 20:41:45",
-                "2014-10-12 23:22:27",
-                "2015-07-21 20:43:56",
-                "2015-07-21 20:45:07"
-            ]
-        },
-        {
-            "business_id": "-0jz6c3C6i7RG7Ag22K-Pg",
-            "dates": [
-                "2015-05-02 19:49:05",
-                "2015-05-06 03:52:18",
-                "2015-09-26 01:13:19"
-            ]
-        },
-        {
-            "business_id": "-0y3MZU2oYP8r1ruDP1bfQ",
-            "dates": [
-                "2015-04-11 13:14:14",
-                "2015-11-21 16:05:56",
-                "2016-05-06 14:10:04",
-                "2017-08-09 15:15:10",
-                "2017-10-21 15:12:56"
-            ]
-        },
-        {
-            "business_id": "-1BPe8UjF2_l3nVk-DFUjA",
-            "dates": [
-                "2015-12-03 18:44:00",
-                "2016-03-17 18:19:21",
-                "2016-11-02 15:58:38"
-            ]
-        },
-        {
-            "business_id": "-1E2CQu_38mkghvmZgCCRw",
-            "dates": [
-                "2019-04-04 22:02:37"
-            ]
-        },
-        {
-            "business_id": "-1wzk43IZ5D9Ysu6kzb5xA",
-            "dates": [
-                "2019-02-27 14:03:08"
-            ]
-        },
-        {
-            "business_id": "-23R9P2eG7VTc6DVLjFKzA",
-            "dates": [
-                "2011-12-21 19:02:51",
-                "2012-04-15 04:21:39",
-                "2012-04-15 14:23:56",
-                "2013-06-30 22:39:51",
-                "2013-10-04 20:34:13",
-                "2014-07-16 02:28:40"
-            ]
-        },
-        {
-            "business_id": "-26MGfikhJiTfCI-GqmzhQ",
-            "dates": [
-                "2018-06-13 20:16:07"
-            ]
-        },
-        {
-            "business_id": "-2bLuJsMZ0WhI9daurVQNQ",
-            "dates": [
-                "2015-05-29 16:46:17",
-                "2015-06-01 15:03:53"
-            ]
-        },
-        {
-            "business_id": "-2hDBMaza_ldqnZdiU06LQ",
-            "dates": [
-                "2011-10-08 12:02:23",
-                "2014-08-18 02:11:11",
-                "2016-01-07 05:27:51",
-                "2016-10-21 20:15:55",
-                "2016-12-01 03:57:10",
-                "2016-12-29 01:54:42",
-                "2018-07-22 19:55:31",
-                "2018-09-07 01:42:54",
-                "2019-03-08 03:41:06"
-            ]
-        }
-    ]
-);
+LOAD DATASET YelpCheckin
+USING localfs (("path"="asterix_nc1://data/yelp-checkin/use-case-1.json"),
+                ("format"="json"));
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/array-index/select-quantified-queries/use-case-1/use-case-1.3.ddl.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/array-index/select-quantified-queries/use-case-1/use-case-1.3.ddl.sqlpp
index a0fc1bf..6fa8e96 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/array-index/select-quantified-queries/use-case-1/use-case-1.3.ddl.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/array-index/select-quantified-queries/use-case-1/use-case-1.3.ddl.sqlpp
@@ -19,4 +19,4 @@
 
 USE TestYelp;
 
-CREATE INDEX IdxYelpCheckinDates ON YelpCheckin (UNNEST dates);
+CREATE INDEX IdxYelpCheckinDates ON YelpCheckin (UNNEST dates) EXCLUDE UNKNOWN KEY;
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/array-index/select-quantified-queries/use-case-2/use-case-2.2.update.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/array-index/select-quantified-queries/use-case-2/use-case-2.2.update.sqlpp
index 2549e8f..d9f0f7f 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/array-index/select-quantified-queries/use-case-2/use-case-2.2.update.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/array-index/select-quantified-queries/use-case-2/use-case-2.2.update.sqlpp
@@ -18,480 +18,6 @@
  */
 
 USE TestYelp;
-
-INSERT INTO YelpCheckin (
-    [
-        {
-            "business_id": "--1UhMGODdWsrMastO9DZw",
-            "checkin_times": {
-                "dates": [
-                    "2016-04-26",
-                    "2016-08-30",
-                    "2016-10-15",
-                    "2016-11-18",
-                    "2017-04-20",
-                    "2017-05-03",
-                    "2019-03-19"
-                ],
-                "times": [
-                    "19:49:16",
-                    "18:36:57",
-                    "02:45:18",
-                    "01:54:50",
-                    "18:39:06",
-                    "17:58:02",
-                    "22:04:48"
-                ]
-            }
-        },
-        {
-            "business_id": "--EF5N7P70J_UYBTPypYlA",
-            "checkin_times": {
-                "dates": [
-                    "2018-05-25",
-                    "2018-09-18",
-                    "2019-10-18"
-                ],
-                "times": [
-                    "19:52:07",
-                    "16:09:44",
-                    "21:29:09"
-                ]
-            }
-        },
-        {
-            "business_id": "--Ni3oJ4VOqfOEu7Sj2Vzg",
-            "checkin_times": {
-                "dates": [
-                    "2019-06-07"
-                ],
-                "times": [
-                    "17:54:58"
-                ]
-            }
-        },
-        {
-            "business_id": "--Y1Adl1YUWfYIRSd8vkmA",
-            "checkin_times": {
-                "dates": [
-                    "2011-05-03",
-                    "2011-08-23",
-                    "2014-12-04",
-                    "2016-11-16"
-                ],
-                "times": [
-                    "20:54:05",
-                    "20:49:45",
-                    "06:13:01",
-                    "19:25:55"
-                ]
-            }
-        },
-        {
-            "business_id": "--YPwqIlRJrhHkJcjY3eiA",
-            "checkin_times": {
-                "dates": [
-                    "2016-06-18",
-                    "2016-10-15"
-                ],
-                "times": [
-                    "21:35:45",
-                    "18:17:51"
-                ]
-            }
-        },
-        {
-            "business_id": "--e8PjCNhEz32pprnPhCwQ",
-            "checkin_times": {
-                "dates": [
-                    "2015-04-02"
-                ],
-                "times": [
-                    "21:45:17"
-                ]
-            }
-        },
-        {
-            "business_id": "--kinfHwmtdjz03g8B8z8Q",
-            "checkin_times": {
-                "dates": [
-                    "2014-08-27",
-                    "2015-12-19",
-                    "2018-11-27"
-                ],
-                "times": [
-                    "17:49:18",
-                    "21:30:31",
-                    "15:53:50"
-                ]
-            }
-        },
-        {
-            "business_id": "--q6datkI-f0EoVheXNEeQ",
-            "checkin_times": {
-                "dates": [
-                    "2014-01-28",
-                    "2014-11-16",
-                    "2015-11-15",
-                    "2015-11-15"
-                ],
-                "times": [
-                    "20:56:04",
-                    "16:11:58",
-                    "19:21:53",
-                    "19:33:39"
-                ]
-            }
-        },
-        {
-            "business_id": "--qvQS4MigHPykD2GV0-zw",
-            "checkin_times": {
-                "dates": [
-                    "2019-04-11"
-                ],
-                "times": [
-                    "18:30:12"
-                ]
-            }
-        },
-        {
-            "business_id": "--wIGbLEhlpl_UeAIyDmZQ",
-            "checkin_times": {
-                "dates": [
-                    "2015-06-06",
-                    "2019-03-14"
-                ],
-                "times": [
-                    "20:01:06",
-                    "22:01:52"
-                ]
-            }
-        },
-        {
-            "business_id": "-0FA-Qdi3SPYIoJz9UQw-A",
-            "checkin_times": {
-                "dates": [
-                    "2018-09-29",
-                    "2018-10-20",
-                    "2018-10-20"
-                ],
-                "times": [
-                    "18:55:17",
-                    "16:48:05",
-                    "22:20:24"
-                ]
-            }
-        },
-        {
-            "business_id": "-0Hj1hb_XW6ybWq2M7QhGA",
-            "checkin_times": {
-                "dates": [
-                    "2011-04-23",
-                    "2014-05-04",
-                    "2014-05-11",
-                    "2014-06-04",
-                    "2015-12-05",
-                    "2017-05-15"
-                ],
-                "times": [
-                    "21:11:22",
-                    "19:42:48",
-                    "19:16:08",
-                    "19:14:18",
-                    "19:22:42",
-                    "23:19:00"
-                ]
-            }
-        },
-        {
-            "business_id": "-0KMvRFwDWdVBeTpT11iHw",
-            "checkin_times": {
-                "dates": [
-                    "2012-07-13",
-                    "2016-12-24",
-                    "2017-08-31"
-                ],
-                "times": [
-                    "21:43:57",
-                    "02:27:31",
-                    "00:35:26"
-                ]
-            }
-        },
-        {
-            "business_id": "-0LPtgJC31FWMrMv317p0Q",
-            "checkin_times": {
-                "dates": [
-                    "2013-04-13",
-                    "2013-08-19",
-                    "2013-10-04"
-                ],
-                "times": [
-                    "12:35:33",
-                    "23:35:49",
-                    "19:14:56"
-                ]
-            }
-        },
-        {
-            "business_id": "-0M3o2uWBnQZwd3hmfEwuw",
-            "checkin_times": {
-                "dates": [
-                    "2016-09-10",
-                    "2018-09-08",
-                    "2019-09-13"
-                ],
-                "times": [
-                    "19:26:19",
-                    "14:15:37",
-                    "22:47:25"
-                ]
-            }
-        },
-        {
-            "business_id": "-0RRiWDtfnS16AKCtfvBZg",
-            "checkin_times": {
-                "dates": [
-                    "2017-05-19",
-                    "2017-05-19",
-                    "2017-08-28",
-                    "2017-09-20",
-                    "2017-10-01",
-                    "2017-10-01",
-                    "2017-12-27"
-                ],
-                "times": [
-                    "14:30:16",
-                    "14:30:25",
-                    "15:49:37",
-                    "20:19:51",
-                    "16:31:05",
-                    "16:56:27",
-                    "23:33:20"
-                ]
-            }
-        },
-        {
-            "business_id": "-0Soj75v-XoRcf2ERr8Bmg",
-            "checkin_times": {
-                "dates": [
-                    "2019-06-05"
-                ],
-                "times": [
-                    "18:22:49"
-                ]
-            }
-        },
-        {
-            "business_id": "-0ZumLlFjMh4ZW1z2nXGug",
-            "checkin_times": {
-                "dates": [
-                    "2011-09-24",
-                    "2014-03-10",
-                    "2015-05-27",
-                    "2015-08-29",
-                    "2018-03-16"
-                ],
-                "times": [
-                    "21:37:32",
-                    "20:20:07",
-                    "00:40:24",
-                    "17:58:15",
-                    "15:03:26"
-                ]
-            }
-        },
-        {
-            "business_id": "-0aOudcaAyac0VJbMX-L1g",
-            "checkin_times": {
-                "dates": [
-                    "2015-03-16",
-                    "2015-12-21",
-                    "2016-10-28",
-                    "2016-10-28"
-                ],
-                "times": [
-                    "23:51:16",
-                    "04:48:01",
-                    "20:22:42",
-                    "20:23:00"
-                ]
-            }
-        },
-        {
-            "business_id": "-0b86isaXMY0v4g-V8GZ9Q",
-            "checkin_times": {
-                "dates": [
-                    "2013-10-22",
-                    "2014-11-21"
-                ],
-                "times": [
-                    "16:49:21",
-                    "17:39:24"
-                ]
-            }
-        },
-        {
-            "business_id": "-0d-BfFSU0bwLcnMaGRxYw",
-            "checkin_times": {
-                "dates": [
-                    "2014-08-07",
-                    "2014-09-16",
-                    "2014-10-12",
-                    "2015-07-21",
-                    "2015-07-21"
-                ],
-                "times": [
-                    "18:30:48",
-                    "20:41:45",
-                    "23:22:27",
-                    "20:43:56",
-                    "20:45:07"
-                ]
-            }
-        },
-        {
-            "business_id": "-0jz6c3C6i7RG7Ag22K-Pg",
-            "checkin_times": {
-                "dates": [
-                    "2015-05-02",
-                    "2015-05-06",
-                    "2015-09-26"
-                ],
-                "times": [
-                    "19:49:05",
-                    "03:52:18",
-                    "01:13:19"
-                ]
-            }
-        },
-        {
-            "business_id": "-0y3MZU2oYP8r1ruDP1bfQ",
-            "checkin_times": {
-                "dates": [
-                    "2015-04-11",
-                    "2015-11-21",
-                    "2016-05-06",
-                    "2017-08-09",
-                    "2017-10-21"
-                ],
-                "times": [
-                    "13:14:14",
-                    "16:05:56",
-                    "14:10:04",
-                    "15:15:10",
-                    "15:12:56"
-                ]
-            }
-        },
-        {
-            "business_id": "-1BPe8UjF2_l3nVk-DFUjA",
-            "checkin_times": {
-                "dates": [
-                    "2015-12-03",
-                    "2016-03-17",
-                    "2016-11-02"
-                ],
-                "times": [
-                    "18:44:00",
-                    "18:19:21",
-                    "15:58:38"
-                ]
-            }
-        },
-        {
-            "business_id": "-1E2CQu_38mkghvmZgCCRw",
-            "checkin_times": {
-                "dates": [
-                    "2019-04-04"
-                ],
-                "times": [
-                    "22:02:37"
-                ]
-            }
-        },
-        {
-            "business_id": "-1wzk43IZ5D9Ysu6kzb5xA",
-            "checkin_times": {
-                "dates": [
-                    "2019-02-27"
-                ],
-                "times": [
-                    "14:03:08"
-                ]
-            }
-        },
-        {
-            "business_id": "-23R9P2eG7VTc6DVLjFKzA",
-            "checkin_times": {
-                "dates": [
-                    "2011-12-21",
-                    "2012-04-15",
-                    "2012-04-15",
-                    "2013-06-30",
-                    "2013-10-04",
-                    "2014-07-16"
-                ],
-                "times": [
-                    "19:02:51",
-                    "04:21:39",
-                    "14:23:56",
-                    "22:39:51",
-                    "20:34:13",
-                    "02:28:40"
-                ]
-            }
-        },
-        {
-            "business_id": "-26MGfikhJiTfCI-GqmzhQ",
-            "checkin_times": {
-                "dates": [
-                    "2018-06-13"
-                ],
-                "times": [
-                    "20:16:07"
-                ]
-            }
-        },
-        {
-            "business_id": "-2bLuJsMZ0WhI9daurVQNQ",
-            "checkin_times": {
-                "dates": [
-                    "2015-05-29",
-                    "2015-06-01"
-                ],
-                "times": [
-                    "16:46:17",
-                    "15:03:53"
-                ]
-            }
-        },
-        {
-            "business_id": "-2hDBMaza_ldqnZdiU06LQ",
-            "checkin_times": {
-                "dates": [
-                    "2011-10-08",
-                    "2014-08-18",
-                    "2016-01-07",
-                    "2016-10-21",
-                    "2016-12-01",
-                    "2016-12-29",
-                    "2018-07-22",
-                    "2018-09-07",
-                    "2019-03-08"
-                ],
-                "times": [
-                    "12:02:23",
-                    "02:11:11",
-                    "05:27:51",
-                    "20:15:55",
-                    "03:57:10",
-                    "01:54:42",
-                    "19:55:31",
-                    "01:42:54",
-                    "03:41:06"
-                ]
-            }
-        }
-    ]
-);
+LOAD DATASET YelpCheckin
+USING localfs (("path"="asterix_nc1://data/yelp-checkin/use-case-2.json"),
+                ("format"="json"));
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/array-index/select-quantified-queries/use-case-2/use-case-2.3.ddl.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/array-index/select-quantified-queries/use-case-2/use-case-2.3.ddl.sqlpp
index 0ab72fe..caaaad0 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/array-index/select-quantified-queries/use-case-2/use-case-2.3.ddl.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/array-index/select-quantified-queries/use-case-2/use-case-2.3.ddl.sqlpp
@@ -19,4 +19,4 @@
 
 USE TestYelp;
 
-CREATE INDEX IdxYelpCheckinDates ON YelpCheckin (UNNEST checkin_times.dates);
+CREATE INDEX IdxYelpCheckinDates ON YelpCheckin (UNNEST checkin_times.dates) EXCLUDE UNKNOWN KEY;
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/array-index/select-quantified-queries/use-case-3/use-case-3.2.update.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/array-index/select-quantified-queries/use-case-3/use-case-3.2.update.sqlpp
index 02ddf21..f05a19b 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/array-index/select-quantified-queries/use-case-3/use-case-3.2.update.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/array-index/select-quantified-queries/use-case-3/use-case-3.2.update.sqlpp
@@ -19,258 +19,6 @@
 
 USE TestYelp;
 
-INSERT INTO YelpCheckin (
-    [
-        {
-            "business_id": "--1UhMGODdWsrMastO9DZw",
-            "checkin_times": [ 
-                {"date": "2016-04-26", "time": "19:49:16"},
-                {"date": "2016-08-30", "time": "18:36:57"},
-                {"date": "2016-10-15", "time": "02:45:18"},
-                {"date": "2016-11-18", "time": "01:54:50"},
-                {"date": "2017-04-20", "time": "18:39:06"},
-                {"date": "2017-05-03", "time": "17:58:02"},
-                {"date": "2019-03-19", "time": "22:04:48"}
-             ]
-        },
-        {
-            "business_id": "--EF5N7P70J_UYBTPypYlA",
-            "checkin_times": [ 
-                {"date": "2018-05-25", "time": "19:52:07"},
-                {"date": "2018-09-18", "time": "16:09:44"},
-                {"date": "2019-10-18", "time": "21:29:09"}
-             ]
-        },
-        {
-            "business_id": "--Ni3oJ4VOqfOEu7Sj2Vzg",
-            "checkin_times": [ 
-                {"date": "2019-06-07", "time": "17:54:58"}
-             ]
-        },
-        {
-            "business_id": "--Y1Adl1YUWfYIRSd8vkmA",
-            "checkin_times": [ 
-                {"date": "2011-05-03", "time": "20:54:05"},
-                {"date": "2011-08-23", "time": "20:49:45"},
-                {"date": "2014-12-04", "time": "06:13:01"},
-                {"date": "2016-11-16", "time": "19:25:55"}
-             ]
-        },
-        {
-            "business_id": "--YPwqIlRJrhHkJcjY3eiA",
-            "checkin_times": [ 
-                {"date": "2016-06-18", "time": "21:35:45"},
-                {"date": "2016-10-15", "time": "18:17:51"}
-             ]
-        },
-        {
-            "business_id": "--e8PjCNhEz32pprnPhCwQ",
-            "checkin_times": [ 
-                {"date": "2015-04-02", "time": "21:45:17"}
-             ]
-        },
-        {
-            "business_id": "--kinfHwmtdjz03g8B8z8Q",
-            "checkin_times": [ 
-                {"date": "2014-08-27", "time": "17:49:18"},
-                {"date": "2015-12-19", "time": "21:30:31"},
-                {"date": "2018-11-27", "time": "15:53:50"}
-             ]
-        },
-        {
-            "business_id": "--q6datkI-f0EoVheXNEeQ",
-            "checkin_times": [ 
-                {"date": "2014-01-28", "time": "20:56:04"},
-                {"date": "2014-11-16", "time": "16:11:58"},
-                {"date": "2015-11-15", "time": "19:21:53"},
-                {"date": "2015-11-15", "time": "19:33:39"}
-             ]
-        },
-        {
-            "business_id": "--qvQS4MigHPykD2GV0-zw",
-            "checkin_times": [ 
-                {"date": "2019-04-11", "time": "18:30:12"}
-             ]
-        },
-        {
-            "business_id": "--wIGbLEhlpl_UeAIyDmZQ",
-            "checkin_times": [ 
-                {"date": "2015-06-06", "time": "20:01:06"},
-                {"date": "2019-03-14", "time": "22:01:52"}
-             ]
-        },
-        {
-            "business_id": "-0FA-Qdi3SPYIoJz9UQw-A",
-            "checkin_times": [ 
-                {"date": "2018-09-29", "time": "18:55:17"},
-                {"date": "2018-10-20", "time": "16:48:05"},
-                {"date": "2018-10-20", "time": "22:20:24"}
-             ]
-        },
-        {
-            "business_id": "-0Hj1hb_XW6ybWq2M7QhGA",
-            "checkin_times": [ 
-                {"date": "2011-04-23", "time": "21:11:22"},
-                {"date": "2014-05-04", "time": "19:42:48"},
-                {"date": "2014-05-11", "time": "19:16:08"},
-                {"date": "2014-06-04", "time": "19:14:18"},
-                {"date": "2015-12-05", "time": "19:22:42"},
-                {"date": "2017-05-15", "time": "23:19:00"}
-             ]
-        },
-        {
-            "business_id": "-0KMvRFwDWdVBeTpT11iHw",
-            "checkin_times": [ 
-                {"date": "2012-07-13", "time": "21:43:57"},
-                {"date": "2016-12-24", "time": "02:27:31"},
-                {"date": "2017-08-31", "time": "00:35:26"}
-             ]
-        },
-        {
-            "business_id": "-0LPtgJC31FWMrMv317p0Q",
-            "checkin_times": [ 
-                {"date": "2013-04-13", "time": "12:35:33"},
-                {"date": "2013-08-19", "time": "23:35:49"},
-                {"date": "2013-10-04", "time": "19:14:56"}
-             ]
-        },
-        {
-            "business_id": "-0M3o2uWBnQZwd3hmfEwuw",
-            "checkin_times": [ 
-                {"date": "2016-09-10", "time": "19:26:19"},
-                {"date": "2018-09-08", "time": "14:15:37"},
-                {"date": "2019-09-13", "time": "22:47:25"}
-             ]
-        },
-        {
-            "business_id": "-0RRiWDtfnS16AKCtfvBZg",
-            "checkin_times": [ 
-                {"date": "2017-05-19", "time": "14:30:16"},
-                {"date": "2017-05-19", "time": "14:30:25"},
-                {"date": "2017-08-28", "time": "15:49:37"},
-                {"date": "2017-09-20", "time": "20:19:51"},
-                {"date": "2017-10-01", "time": "16:31:05"},
-                {"date": "2017-10-01", "time": "16:56:27"},
-                {"date": "2017-12-27", "time": "23:33:20"}
-             ]
-        },
-        {
-            "business_id": "-0Soj75v-XoRcf2ERr8Bmg",
-            "checkin_times": [ 
-                {"date": "2019-06-05", "time": "18:22:49"}
-             ]
-        },
-        {
-            "business_id": "-0ZumLlFjMh4ZW1z2nXGug",
-            "checkin_times": [ 
-                {"date": "2011-09-24", "time": "21:37:32"},
-                {"date": "2014-03-10", "time": "20:20:07"},
-                {"date": "2015-05-27", "time": "00:40:24"},
-                {"date": "2015-08-29", "time": "17:58:15"},
-                {"date": "2018-03-16", "time": "15:03:26"}
-             ]
-        },
-        {
-            "business_id": "-0aOudcaAyac0VJbMX-L1g",
-            "checkin_times": [ 
-                {"date": "2015-03-16", "time": "23:51:16"},
-                {"date": "2015-12-21", "time": "04:48:01"},
-                {"date": "2016-10-28", "time": "20:22:42"},
-                {"date": "2016-10-28", "time": "20:23:00"}
-             ]
-        },
-        {
-            "business_id": "-0b86isaXMY0v4g-V8GZ9Q",
-            "checkin_times": [ 
-                {"date": "2013-10-22", "time": "16:49:21"},
-                {"date": "2014-11-21", "time": "17:39:24"}
-             ]
-        },
-        {
-            "business_id": "-0d-BfFSU0bwLcnMaGRxYw",
-            "checkin_times": [ 
-                {"date": "2014-08-07", "time": "18:30:48"},
-                {"date": "2014-09-16", "time": "20:41:45"},
-                {"date": "2014-10-12", "time": "23:22:27"},
-                {"date": "2015-07-21", "time": "20:43:56"},
-                {"date": "2015-07-21", "time": "20:45:07"}
-             ]
-        },
-        {
-            "business_id": "-0jz6c3C6i7RG7Ag22K-Pg",
-            "checkin_times": [ 
-                {"date": "2015-05-02", "time": "19:49:05"},
-                {"date": "2015-05-06", "time": "03:52:18"},
-                {"date": "2015-09-26", "time": "01:13:19"}
-             ]
-        },
-        {
-            "business_id": "-0y3MZU2oYP8r1ruDP1bfQ",
-            "checkin_times": [ 
-                {"date": "2015-04-11", "time": "13:14:14"},
-                {"date": "2015-11-21", "time": "16:05:56"},
-                {"date": "2016-05-06", "time": "14:10:04"},
-                {"date": "2017-08-09", "time": "15:15:10"},
-                {"date": "2017-10-21", "time": "15:12:56"}
-             ]
-        },
-        {
-            "business_id": "-1BPe8UjF2_l3nVk-DFUjA",
-            "checkin_times": [ 
-                {"date": "2015-12-03", "time": "18:44:00"},
-                {"date": "2016-03-17", "time": "18:19:21"},
-                {"date": "2016-11-02", "time": "15:58:38"}
-             ]
-        },
-        {
-            "business_id": "-1E2CQu_38mkghvmZgCCRw",
-            "checkin_times": [ 
-                {"date": "2019-04-04", "time": "22:02:37"}
-             ]
-        },
-        {
-            "business_id": "-1wzk43IZ5D9Ysu6kzb5xA",
-            "checkin_times": [ 
-                {"date": "2019-02-27", "time": "14:03:08"}
-             ]
-        },
-        {
-            "business_id": "-23R9P2eG7VTc6DVLjFKzA",
-            "checkin_times": [ 
-                {"date": "2011-12-21", "time": "19:02:51"},
-                {"date": "2012-04-15", "time": "04:21:39"},
-                {"date": "2012-04-15", "time": "14:23:56"},
-                {"date": "2013-06-30", "time": "22:39:51"},
-                {"date": "2013-10-04", "time": "20:34:13"},
-                {"date": "2014-07-16", "time": "02:28:40"}
-             ]
-        },
-        {
-            "business_id": "-26MGfikhJiTfCI-GqmzhQ",
-            "checkin_times": [ 
-                {"date": "2018-06-13", "time": "20:16:07"}
-             ]
-        },
-        {
-            "business_id": "-2bLuJsMZ0WhI9daurVQNQ",
-            "checkin_times": [ 
-                {"date": "2015-05-29", "time": "16:46:17"},
-                {"date": "2015-06-01", "time": "15:03:53"}
-             ]
-        },
-        {
-            "business_id": "-2hDBMaza_ldqnZdiU06LQ",
-            "checkin_times": [ 
-                {"date": "2011-10-08", "time": "12:02:23"},
-                {"date": "2014-08-18", "time": "02:11:11"},
-                {"date": "2016-01-07", "time": "05:27:51"},
-                {"date": "2016-10-21", "time": "20:15:55"},
-                {"date": "2016-12-01", "time": "03:57:10"},
-                {"date": "2016-12-29", "time": "01:54:42"},
-                {"date": "2018-07-22", "time": "19:55:31"},
-                {"date": "2018-09-07", "time": "01:42:54"},
-                {"date": "2019-03-08", "time": "03:41:06"}
-             ]
-        }
-    ]
-);
+LOAD DATASET YelpCheckin
+USING localfs (("path"="asterix_nc1://data/yelp-checkin/use-case-3.json"),
+                ("format"="json"));
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/array-index/select-quantified-queries/use-case-3/use-case-3.3.ddl.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/array-index/select-quantified-queries/use-case-3/use-case-3.3.ddl.sqlpp
index ee911b4..4154d37 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/array-index/select-quantified-queries/use-case-3/use-case-3.3.ddl.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/array-index/select-quantified-queries/use-case-3/use-case-3.3.ddl.sqlpp
@@ -19,4 +19,4 @@
 
 USE TestYelp;
 
-CREATE INDEX IdxYelpCheckinDates ON YelpCheckin (UNNEST checkin_times SELECT date);
+CREATE INDEX IdxYelpCheckinDates ON YelpCheckin (UNNEST checkin_times SELECT date) EXCLUDE UNKNOWN KEY;
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/array-index/select-quantified-queries/use-case-4/use-case-4.2.update.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/array-index/select-quantified-queries/use-case-4/use-case-4.2.update.sqlpp
index 7fcf9e4..197d417 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/array-index/select-quantified-queries/use-case-4/use-case-4.2.update.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/array-index/select-quantified-queries/use-case-4/use-case-4.2.update.sqlpp
@@ -19,407 +19,6 @@
 
 USE TestYelp;
 
-INSERT INTO YelpCheckin (
-    [
-        {
-            "business_id": "--1UhMGODdWsrMastO9DZw",
-            "checkin_times": [ 
-                {
-                    "dates": ["2016-04-26", "2016-08-30", "2016-10-15", "2016-11-18"],
-                    "times": ["19:49:16", "18:36:57", "02:45:18", "01:54:50"]
-                },
-                {
-                    "dates": ["2017-04-20", "2017-05-03"],
-                    "times": ["18:39:06", "17:58:02"]
-                },
-                {
-                    "dates": ["2019-03-19"],
-                    "times": ["22:04:48"]
-                }
-             ]
-        },
-        {
-            "business_id": "--EF5N7P70J_UYBTPypYlA",
-            "checkin_times": [ 
-                {
-                    "dates": ["2018-05-25", "2018-09-18"],
-                    "times": ["19:52:07", "16:09:44"]
-                },
-                {
-                    "dates": ["2019-10-18"],
-                    "times": ["21:29:09"]
-                }
-             ]
-        },
-        {
-            "business_id": "--Ni3oJ4VOqfOEu7Sj2Vzg",
-            "checkin_times": [ 
-                {
-                    "dates": ["2019-06-07"],
-                    "times": ["17:54:58"]
-                }
-             ]
-        },
-        {
-            "business_id": "--Y1Adl1YUWfYIRSd8vkmA",
-            "checkin_times": [ 
-                {
-                    "dates": ["2011-05-03", "2011-08-23"],
-                    "times": ["20:54:05", "20:49:45"]
-                },
-                {
-                    "dates": ["2014-12-04"],
-                    "times": ["06:13:01"]
-                },
-                {
-                    "dates": ["2016-11-16"],
-                    "times": ["19:25:55"]
-                }
-             ]
-        },
-        {
-            "business_id": "--YPwqIlRJrhHkJcjY3eiA",
-            "checkin_times": [ 
-               {
-                    "dates": ["2016-06-18", "2016-10-15"],
-                    "times": ["21:35:45", "18:17:51"]
-                }
-             ]
-        },
-        {
-            "business_id": "--e8PjCNhEz32pprnPhCwQ",
-            "checkin_times": [ 
-                {
-                    "dates": ["2015-04-02"],
-                    "times": ["21:45:17"]
-                }
-             ]
-        },
-        {
-            "business_id": "--kinfHwmtdjz03g8B8z8Q",
-            "checkin_times": [ 
-                {
-                    "dates": ["2014-08-27"],
-                    "times": ["17:49:18"]
-                },
-                {
-                    "dates": ["2015-12-19"],
-                    "times": ["21:30:31"]
-                },
-                {
-                    "dates": ["2018-11-27"],
-                    "times": ["15:53:50"]
-                }
-             ]
-        },
-        {
-            "business_id": "--q6datkI-f0EoVheXNEeQ",
-            "checkin_times": [ 
-                {
-                    "dates": ["2014-01-28", "2014-11-16"],
-                    "times": ["20:56:04", "16:11:58"]
-                },
-                {
-                    "dates": ["2015-11-15", "2015-11-15"],
-                    "times": ["19:21:53", "19:33:39"]
-                }
-             ]
-        },
-        {
-            "business_id": "--qvQS4MigHPykD2GV0-zw",
-            "checkin_times": [ 
-                {
-                    "dates": ["2019-04-11"],
-                    "times": ["18:30:12"]
-                }
-             ]
-        },
-        {
-            "business_id": "--wIGbLEhlpl_UeAIyDmZQ",
-            "checkin_times": [ 
-                {
-                    "dates": ["2015-06-06"],
-                    "times": ["20:01:06"]
-                },
-                {
-                    "dates": ["2019-03-14"],
-                    "times": ["22:01:52"]
-                }
-             ]
-        },
-        {
-            "business_id": "-0FA-Qdi3SPYIoJz9UQw-A",
-            "checkin_times": [ 
-                {
-                    "dates": ["2018-09-29", "2018-10-20", "2018-10-20"],
-                    "times": ["18:55:17", "16:48:05", "22:20:24"]
-                }
-             ]
-        },
-        {
-            "business_id": "-0Hj1hb_XW6ybWq2M7QhGA",
-            "checkin_times": [ 
-                {
-                    "dates": ["2011-04-23"],
-                    "times": ["21:11:22"]
-                },
-                {
-                    "dates": ["2014-05-04", "2014-05-11", "2014-06-04"],
-                    "times": ["19:42:48", "19:16:08", "19:14:18"]
-                },
-                {
-                    "dates": ["2015-12-05"],
-                    "times": ["19:22:42"]
-                },
-                {
-                    "dates": ["2017-05-15"],
-                    "times": ["23:19:00"]
-                }
-             ]
-        },
-        {
-            "business_id": "-0KMvRFwDWdVBeTpT11iHw",
-            "checkin_times": [ 
-                {
-                    "dates": ["2012-07-13"],
-                    "times": ["21:43:57"]
-                },
-                {
-                    "dates": ["2016-12-24"],
-                    "times": ["02:27:31"]
-                },
-                {
-                    "dates": ["2017-08-31"],
-                    "times": ["00:35:26"]
-                }
-             ]
-        },
-        {
-            "business_id": "-0LPtgJC31FWMrMv317p0Q",
-            "checkin_times": [ 
-                {
-                    "dates": ["2013-04-13", "2013-08-19", "2013-10-04"],
-                    "times": ["12:35:33", "23:35:49", "19:14:56"]
-                }
-
-             ]
-        },
-        {
-            "business_id": "-0M3o2uWBnQZwd3hmfEwuw",
-            "checkin_times": [ 
-                {
-                    "dates": ["2016-09-10"],
-                    "times": ["19:26:19"]
-                },
-                {
-                    "dates": ["2018-09-08"],
-                    "times": ["14:15:37"]
-                },
-                {
-                    "dates": ["2019-09-13"],
-                    "times": ["22:47:25"]
-                }
-             ]
-        },
-        {
-            "business_id": "-0RRiWDtfnS16AKCtfvBZg",
-            "checkin_times": [ 
-                 {
-                    "dates": ["2017-05-19", "2017-05-19", "2017-08-28", "2017-09-20", "2017-10-01", "2017-10-01", "2017-12-27"],
-                    "times": ["14:30:16", "14:30:25", "15:49:37", "20:19:51", "16:31:05", "16:56:27", "23:33:20"]
-                }
-             ]
-        },
-        {
-            "business_id": "-0Soj75v-XoRcf2ERr8Bmg",
-            "checkin_times": [ 
-                {
-                    "dates": ["2019-06-05"],
-                    "times": ["18:22:49"]
-                }
-             ]
-        },
-        {
-            "business_id": "-0ZumLlFjMh4ZW1z2nXGug",
-            "checkin_times": [ 
-                {
-                    "dates": ["2011-09-24"],
-                    "times": ["21:37:32"]
-                },
-                {
-                    "dates": ["2014-03-10"],
-                    "times": ["20:20:07"]
-                },
-                {
-                    "dates": ["2015-05-27", "2015-08-29"],
-                    "times": ["00:40:24", "17:58:15"]
-                },
-                {
-                    "dates": ["2018-03-16"],
-                    "times": ["15:03:26"]
-                }
-             ]
-        },
-        {
-            "business_id": "-0aOudcaAyac0VJbMX-L1g",
-            "checkin_times": [ 
-                {
-                    "dates": ["2015-03-16", "2015-12-21"],
-                    "times": ["23:51:16", "04:48:01"]
-                },
-                {
-                    "dates": ["2016-10-28", "2016-10-28"],
-                    "times": ["20:22:42", "20:23:00"]
-                }
-             ]
-        },
-        {
-            "business_id": "-0b86isaXMY0v4g-V8GZ9Q",
-            "checkin_times": [ 
-                {
-                    "dates": ["2013-10-22"],
-                    "times": ["16:49:21"]
-                },
-                {
-                    "dates": ["2014-11-21"],
-                    "times": ["17:39:24"]
-                }
-             ]
-        },
-        {
-            "business_id": "-0d-BfFSU0bwLcnMaGRxYw",
-            "checkin_times": [ 
-                {
-                    "dates": ["2014-08-07", "2014-09-16", "2014-10-12"],
-                    "times": ["18:30:48", "20:41:45", "23:22:27"]
-                },
-                {
-                    "dates": ["2015-07-21", "2015-07-21"],
-                    "times": ["20:43:56", "20:45:07"]
-                }
-             ]
-        },
-        {
-            "business_id": "-0jz6c3C6i7RG7Ag22K-Pg",
-            "checkin_times": [ 
-                {
-                    "dates": ["2015-05-02", "2015-05-06", "2015-09-26"],
-                    "times": ["19:49:05", "03:52:18", "01:13:19"]
-                }
-
-             ]
-        },
-        {
-            "business_id": "-0y3MZU2oYP8r1ruDP1bfQ",
-            "checkin_times": [ 
-                {
-                    "dates": ["2015-04-11", "2015-11-21"],
-                    "times": ["13:14:14", "16:05:56"]
-                },
-                {
-                    "dates": ["2016-05-06"],
-                    "times": ["14:10:04"]
-                },
-                {
-                    "dates": ["2017-08-09", "2017-10-21"],
-                    "times": ["15:15:10", "15:12:56"]
-                }
-             ]
-        },
-        {
-            "business_id": "-1BPe8UjF2_l3nVk-DFUjA",
-            "checkin_times": [ 
-                {
-                    "dates": ["2015-12-03"],
-                    "times": ["18:44:00"]
-                },
-                {
-                    "dates": ["2016-03-17", "2016-11-02"],
-                    "times": ["18:19:21", "15:58:38"]
-                }
-             ]
-        },
-        {
-            "business_id": "-1E2CQu_38mkghvmZgCCRw",
-            "checkin_times": [ 
-                {
-                    "dates": ["2019-04-04"],
-                    "times": ["22:02:37"]
-                }
-             ]
-        },
-        {
-            "business_id": "-1wzk43IZ5D9Ysu6kzb5xA",
-            "checkin_times": [ 
-                {
-                    "dates": ["2019-02-27"],
-                    "times": ["14:03:08"]
-                }
-             ]
-        },
-        {
-            "business_id": "-23R9P2eG7VTc6DVLjFKzA",
-            "checkin_times": [ 
-                {
-                    "dates": ["2011-12-21"],
-                    "times": ["19:02:51"]
-                },
-                {
-                    "dates": ["2012-04-15", "2012-04-15"],
-                    "times": ["04:21:39", "14:23:56"]
-                },
-                {
-                    "dates": ["2013-06-30", "2013-10-04"],
-                    "times": ["22:39:51", "20:34:13"]
-                },
-                {
-                    "dates": ["2014-07-16"],
-                    "times": ["02:28:40"]
-                }
-             ]
-        },
-        {
-            "business_id": "-26MGfikhJiTfCI-GqmzhQ",
-            "checkin_times": [ 
-                {
-                    "dates": ["2018-06-13"],
-                    "times": ["20:16:07"]
-                }
-             ]
-        },
-        {
-            "business_id": "-2bLuJsMZ0WhI9daurVQNQ",
-            "checkin_times": [ 
-                {
-                    "dates": ["2015-05-29", "2015-06-01"],
-                    "times": ["16:46:17", "15:03:53"]
-                }
-             ]
-        },
-        {
-            "business_id": "-2hDBMaza_ldqnZdiU06LQ",
-            "checkin_times": [ 
-                {
-                    "dates": ["2011-10-08"],
-                    "times": ["12:02:23"]
-                },
-                {
-                    "dates": ["2014-08-18"],
-                    "times": ["02:11:11"]
-                },
-                {
-                    "dates": ["2016-01-07", "2016-10-21", "2016-12-01", "2016-12-29"],
-                    "times": ["05:27:51", "20:15:55", "03:57:10", "01:54:42"]
-                },
-                {
-                    "dates": ["2018-07-22", "2018-09-07"],
-                    "times": ["19:55:31", "01:42:54"]
-                },
-                {
-                    "dates": ["2019-03-08"],
-                    "times": ["03:41:06"]
-                }
-             ]
-        }
-    ]
-);
+LOAD DATASET YelpCheckin
+USING localfs (("path"="asterix_nc1://data/yelp-checkin/use-case-4.json"),
+                ("format"="json"));
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/array-index/select-quantified-queries/use-case-4/use-case-4.3.ddl.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/array-index/select-quantified-queries/use-case-4/use-case-4.3.ddl.sqlpp
index 05a7c76..e59799e 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/array-index/select-quantified-queries/use-case-4/use-case-4.3.ddl.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/array-index/select-quantified-queries/use-case-4/use-case-4.3.ddl.sqlpp
@@ -19,4 +19,4 @@
 
 USE TestYelp;
 
-CREATE INDEX IdxYelpCheckinDates ON YelpCheckin (UNNEST checkin_times UNNEST dates);
+CREATE INDEX IdxYelpCheckinDates ON YelpCheckin (UNNEST checkin_times UNNEST dates) EXCLUDE UNKNOWN KEY;
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/array-index/select-quantified-queries/with-composite-pk/with-composite-pk.2.update.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/array-index/select-quantified-queries/with-composite-pk/with-composite-pk.2.update.sqlpp
index 6498c14..5adc3e9 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/array-index/select-quantified-queries/with-composite-pk/with-composite-pk.2.update.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/array-index/select-quantified-queries/with-composite-pk/with-composite-pk.2.update.sqlpp
@@ -19,288 +19,6 @@
 
 USE TestYelp;
 
-INSERT INTO YelpCheckin (
-    [
-        {
-            "checkin_id": 1,
-            "business_id": "--1UhMGODdWsrMastO9DZw",
-            "dates": [
-                "2016-04-26 19:49:16",
-                "2016-08-30 18:36:57",
-                "2016-10-15 02:45:18",
-                "2016-11-18 01:54:50",
-                "2017-04-20 18:39:06",
-                "2017-05-03 17:58:02",
-                "2019-03-19 22:04:48"
-            ]
-        },
-        {
-            "checkin_id": 2,
-            "business_id": "--EF5N7P70J_UYBTPypYlA",
-            "dates": [
-                "2018-05-25 19:52:07",
-                "2018-09-18 16:09:44",
-                "2019-10-18 21:29:09"
-            ]
-        },
-        {
-            "checkin_id": 3,
-            "business_id": "--Ni3oJ4VOqfOEu7Sj2Vzg",
-            "dates": [
-                "2019-06-07 17:54:58"
-            ]
-        },
-        {
-            "checkin_id": 4,
-            "business_id": "--Y1Adl1YUWfYIRSd8vkmA",
-            "dates": [
-                "2011-05-03 20:54:05",
-                "2011-08-23 20:49:45",
-                "2014-12-04 06:13:01",
-                "2016-11-16 19:25:55"
-            ]
-        },
-        {
-            "checkin_id": 5,
-            "business_id": "--YPwqIlRJrhHkJcjY3eiA",
-            "dates": [
-                "2016-06-18 21:35:45",
-                "2016-10-15 18:17:51"
-            ]
-        },
-        {
-            "checkin_id": 6,
-            "business_id": "--e8PjCNhEz32pprnPhCwQ",
-            "dates": [
-                "2015-04-02 21:45:17"
-            ]
-        },
-        {
-            "checkin_id": 7,
-            "business_id": "--kinfHwmtdjz03g8B8z8Q",
-            "dates": [
-                "2014-08-27 17:49:18",
-                "2015-12-19 21:30:31",
-                "2018-11-27 15:53:50"
-            ]
-        },
-        {
-            "checkin_id": 8,
-            "business_id": "--q6datkI-f0EoVheXNEeQ",
-            "dates": [
-                "2014-01-28 20:56:04",
-                "2014-11-16 16:11:58",
-                "2015-11-15 19:21:53",
-                "2015-11-15 19:33:39"
-            ]
-        },
-        {
-            "checkin_id": 9,
-            "business_id": "--qvQS4MigHPykD2GV0-zw",
-            "dates": [
-                "2019-04-11 18:30:12"
-            ]
-        },
-        {
-            "checkin_id": 10,
-            "business_id": "--wIGbLEhlpl_UeAIyDmZQ",
-            "dates": [
-                "2015-06-06 20:01:06",
-                "2019-03-14 22:01:52"
-            ]
-        },
-        {
-            "checkin_id": 11,
-            "business_id": "-0FA-Qdi3SPYIoJz9UQw-A",
-            "dates": [
-                "2018-09-29 18:55:17",
-                "2018-10-20 16:48:05",
-                "2018-10-20 22:20:24"
-            ]
-        },
-        {
-            "checkin_id": 12,
-            "business_id": "-0Hj1hb_XW6ybWq2M7QhGA",
-            "dates": [
-                "2011-04-23 21:11:22",
-                "2014-05-04 19:42:48",
-                "2014-05-11 19:16:08",
-                "2014-06-04 19:14:18",
-                "2015-12-05 19:22:42",
-                "2017-05-15 23:19:00"
-            ]
-        },
-        {
-            "checkin_id": 13,
-            "business_id": "-0KMvRFwDWdVBeTpT11iHw",
-            "dates": [
-                "2012-07-13 21:43:57",
-                "2016-12-24 02:27:31",
-                "2017-08-31 00:35:26"
-            ]
-        },
-        {
-            "checkin_id": 14,
-            "business_id": "-0LPtgJC31FWMrMv317p0Q",
-            "dates": [
-                "2013-04-13 12:35:33",
-                "2013-08-19 23:35:49",
-                "2013-10-04 19:14:56"
-            ]
-        },
-        {
-            "checkin_id": 15,
-            "business_id": "-0M3o2uWBnQZwd3hmfEwuw",
-            "dates": [
-                "2016-09-10 19:26:19",
-                "2018-09-08 14:15:37",
-                "2019-09-13 22:47:25"
-            ]
-        },
-        {
-            "checkin_id": 16,
-            "business_id": "-0RRiWDtfnS16AKCtfvBZg",
-            "dates": [
-                "2017-05-19 14:30:16",
-                "2017-05-19 14:30:25",
-                "2017-08-28 15:49:37",
-                "2017-09-20 20:19:51",
-                "2017-10-01 16:31:05",
-                "2017-10-01 16:56:27",
-                "2017-12-27 23:33:20"
-            ]
-        },
-        {
-            "checkin_id": 17,
-            "business_id": "-0Soj75v-XoRcf2ERr8Bmg",
-            "dates": [
-                "2019-06-05 18:22:49"
-            ]
-        },
-        {
-            "checkin_id": 18,
-            "business_id": "-0ZumLlFjMh4ZW1z2nXGug",
-            "dates": [
-                "2011-09-24 21:37:32",
-                "2014-03-10 20:20:07",
-                "2015-05-27 00:40:24",
-                "2015-08-29 17:58:15",
-                "2018-03-16 15:03:26"
-            ]
-        },
-        {
-            "checkin_id": 19,
-            "business_id": "-0aOudcaAyac0VJbMX-L1g",
-            "dates": [
-                "2015-03-16 23:51:16",
-                "2015-12-21 04:48:01",
-                "2016-10-28 20:22:42",
-                "2016-10-28 20:23:00"
-            ]
-        },
-        {
-            "checkin_id": 20,
-            "business_id": "-0b86isaXMY0v4g-V8GZ9Q",
-            "dates": [
-                "2013-10-22 16:49:21",
-                "2014-11-21 17:39:24"
-            ]
-        },
-        {
-            "checkin_id": 21,
-            "business_id": "-0d-BfFSU0bwLcnMaGRxYw",
-            "dates": [
-                "2014-08-07 18:30:48",
-                "2014-09-16 20:41:45",
-                "2014-10-12 23:22:27",
-                "2015-07-21 20:43:56",
-                "2015-07-21 20:45:07"
-            ]
-        },
-        {
-            "checkin_id": 22,
-            "business_id": "-0jz6c3C6i7RG7Ag22K-Pg",
-            "dates": [
-                "2015-05-02 19:49:05",
-                "2015-05-06 03:52:18",
-                "2015-09-26 01:13:19"
-            ]
-        },
-        {
-            "checkin_id": 23,
-            "business_id": "-0y3MZU2oYP8r1ruDP1bfQ",
-            "dates": [
-                "2015-04-11 13:14:14",
-                "2015-11-21 16:05:56",
-                "2016-05-06 14:10:04",
-                "2017-08-09 15:15:10",
-                "2017-10-21 15:12:56"
-            ]
-        },
-        {
-            "checkin_id": 24,
-            "business_id": "-1BPe8UjF2_l3nVk-DFUjA",
-            "dates": [
-                "2015-12-03 18:44:00",
-                "2016-03-17 18:19:21",
-                "2016-11-02 15:58:38"
-            ]
-        },
-        {
-            "checkin_id": 25,
-            "business_id": "-1E2CQu_38mkghvmZgCCRw",
-            "dates": [
-                "2019-04-04 22:02:37"
-            ]
-        },
-        {
-            "checkin_id": 26,
-            "business_id": "-1wzk43IZ5D9Ysu6kzb5xA",
-            "dates": [
-                "2019-02-27 14:03:08"
-            ]
-        },
-        {
-            "checkin_id": 27,
-            "business_id": "-23R9P2eG7VTc6DVLjFKzA",
-            "dates": [
-                "2011-12-21 19:02:51",
-                "2012-04-15 04:21:39",
-                "2012-04-15 14:23:56",
-                "2013-06-30 22:39:51",
-                "2013-10-04 20:34:13",
-                "2014-07-16 02:28:40"
-            ]
-        },
-        {
-            "checkin_id": 28,
-            "business_id": "-26MGfikhJiTfCI-GqmzhQ",
-            "dates": [
-                "2018-06-13 20:16:07"
-            ]
-        },
-        {
-            "checkin_id": 29,
-            "business_id": "-2bLuJsMZ0WhI9daurVQNQ",
-            "dates": [
-                "2015-05-29 16:46:17",
-                "2015-06-01 15:03:53"
-            ]
-        },
-        {
-            "checkin_id": 30,
-            "business_id": "-2hDBMaza_ldqnZdiU06LQ",
-            "dates": [
-                "2011-10-08 12:02:23",
-                "2014-08-18 02:11:11",
-                "2016-01-07 05:27:51",
-                "2016-10-21 20:15:55",
-                "2016-12-01 03:57:10",
-                "2016-12-29 01:54:42",
-                "2018-07-22 19:55:31",
-                "2018-09-07 01:42:54",
-                "2019-03-08 03:41:06"
-            ]
-        }
-    ]
-);
+LOAD DATASET YelpCheckin
+USING localfs (("path"="asterix_nc1://data/yelp-checkin/with-composite-pk.json"),
+                ("format"="json"));
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/array-index/select-quantified-queries/with-composite-pk/with-composite-pk.3.ddl.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/array-index/select-quantified-queries/with-composite-pk/with-composite-pk.3.ddl.sqlpp
index a0fc1bf..6fa8e96 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/array-index/select-quantified-queries/with-composite-pk/with-composite-pk.3.ddl.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/array-index/select-quantified-queries/with-composite-pk/with-composite-pk.3.ddl.sqlpp
@@ -19,4 +19,4 @@
 
 USE TestYelp;
 
-CREATE INDEX IdxYelpCheckinDates ON YelpCheckin (UNNEST dates);
+CREATE INDEX IdxYelpCheckinDates ON YelpCheckin (UNNEST dates) EXCLUDE UNKNOWN KEY;
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/array-index/select-quantified-queries/with-open-index/with-open-index.2.update.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/array-index/select-quantified-queries/with-open-index/with-open-index.2.update.sqlpp
index b75bf1b..51296bd 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/array-index/select-quantified-queries/with-open-index/with-open-index.2.update.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/array-index/select-quantified-queries/with-open-index/with-open-index.2.update.sqlpp
@@ -18,259 +18,6 @@
  */
 
 USE TestYelp;
-
-INSERT INTO YelpCheckin (
-    [
-        {
-            "business_id": "--1UhMGODdWsrMastO9DZw",
-            "dates": [
-                "2016-04-26 19:49:16",
-                "2016-08-30 18:36:57",
-                "2016-10-15 02:45:18",
-                "2016-11-18 01:54:50",
-                "2017-04-20 18:39:06",
-                "2017-05-03 17:58:02",
-                "2019-03-19 22:04:48"
-            ]
-        },
-        {
-            "business_id": "--EF5N7P70J_UYBTPypYlA",
-            "dates": [
-                "2018-05-25 19:52:07",
-                "2018-09-18 16:09:44",
-                "2019-10-18 21:29:09"
-            ]
-        },
-        {
-            "business_id": "--Ni3oJ4VOqfOEu7Sj2Vzg",
-            "dates": [
-                "2019-06-07 17:54:58"
-            ]
-        },
-        {
-            "business_id": "--Y1Adl1YUWfYIRSd8vkmA",
-            "dates": [
-                "2011-05-03 20:54:05",
-                "2011-08-23 20:49:45",
-                "2014-12-04 06:13:01",
-                "2016-11-16 19:25:55"
-            ]
-        },
-        {
-            "business_id": "--YPwqIlRJrhHkJcjY3eiA",
-            "dates": [
-                "2016-06-18 21:35:45",
-                "2016-10-15 18:17:51"
-            ]
-        },
-        {
-            "business_id": "--e8PjCNhEz32pprnPhCwQ",
-            "dates": [
-                "2015-04-02 21:45:17"
-            ]
-        },
-        {
-            "business_id": "--kinfHwmtdjz03g8B8z8Q",
-            "dates": [
-                "2014-08-27 17:49:18",
-                "2015-12-19 21:30:31",
-                "2018-11-27 15:53:50"
-            ]
-        },
-        {
-            "business_id": "--q6datkI-f0EoVheXNEeQ",
-            "dates": [
-                "2014-01-28 20:56:04",
-                "2014-11-16 16:11:58",
-                "2015-11-15 19:21:53",
-                "2015-11-15 19:33:39"
-            ]
-        },
-        {
-            "business_id": "--qvQS4MigHPykD2GV0-zw",
-            "dates": [
-                "2019-04-11 18:30:12"
-            ]
-        },
-        {
-            "business_id": "--wIGbLEhlpl_UeAIyDmZQ",
-            "dates": [
-                "2015-06-06 20:01:06",
-                "2019-03-14 22:01:52"
-            ]
-        },
-        {
-            "business_id": "-0FA-Qdi3SPYIoJz9UQw-A",
-            "dates": [
-                "2018-09-29 18:55:17",
-                "2018-10-20 16:48:05",
-                "2018-10-20 22:20:24"
-            ]
-        },
-        {
-            "business_id": "-0Hj1hb_XW6ybWq2M7QhGA",
-            "dates": [
-                "2011-04-23 21:11:22",
-                "2014-05-04 19:42:48",
-                "2014-05-11 19:16:08",
-                "2014-06-04 19:14:18",
-                "2015-12-05 19:22:42",
-                "2017-05-15 23:19:00"
-            ]
-        },
-        {
-            "business_id": "-0KMvRFwDWdVBeTpT11iHw",
-            "dates": [
-                "2012-07-13 21:43:57",
-                "2016-12-24 02:27:31",
-                "2017-08-31 00:35:26"
-            ]
-        },
-        {
-            "business_id": "-0LPtgJC31FWMrMv317p0Q",
-            "dates": [
-                "2013-04-13 12:35:33",
-                "2013-08-19 23:35:49",
-                "2013-10-04 19:14:56"
-            ]
-        },
-        {
-            "business_id": "-0M3o2uWBnQZwd3hmfEwuw",
-            "dates": [
-                "2016-09-10 19:26:19",
-                "2018-09-08 14:15:37",
-                "2019-09-13 22:47:25"
-            ]
-        },
-        {
-            "business_id": "-0RRiWDtfnS16AKCtfvBZg",
-            "dates": [
-                "2017-05-19 14:30:16",
-                "2017-05-19 14:30:25",
-                "2017-08-28 15:49:37",
-                "2017-09-20 20:19:51",
-                "2017-10-01 16:31:05",
-                "2017-10-01 16:56:27",
-                "2017-12-27 23:33:20"
-            ]
-        },
-        {
-            "business_id": "-0Soj75v-XoRcf2ERr8Bmg",
-            "dates": [
-                "2019-06-05 18:22:49"
-            ]
-        },
-        {
-            "business_id": "-0ZumLlFjMh4ZW1z2nXGug",
-            "dates": [
-                "2011-09-24 21:37:32",
-                "2014-03-10 20:20:07",
-                "2015-05-27 00:40:24",
-                "2015-08-29 17:58:15",
-                "2018-03-16 15:03:26"
-            ]
-        },
-        {
-            "business_id": "-0aOudcaAyac0VJbMX-L1g",
-            "dates": [
-                "2015-03-16 23:51:16",
-                "2015-12-21 04:48:01",
-                "2016-10-28 20:22:42",
-                "2016-10-28 20:23:00"
-            ]
-        },
-        {
-            "business_id": "-0b86isaXMY0v4g-V8GZ9Q",
-            "dates": [
-                "2013-10-22 16:49:21",
-                "2014-11-21 17:39:24"
-            ]
-        },
-        {
-            "business_id": "-0d-BfFSU0bwLcnMaGRxYw",
-            "dates": [
-                "2014-08-07 18:30:48",
-                "2014-09-16 20:41:45",
-                "2014-10-12 23:22:27",
-                "2015-07-21 20:43:56",
-                "2015-07-21 20:45:07"
-            ]
-        },
-        {
-            "business_id": "-0jz6c3C6i7RG7Ag22K-Pg",
-            "dates": [
-                "2015-05-02 19:49:05",
-                "2015-05-06 03:52:18",
-                "2015-09-26 01:13:19"
-            ]
-        },
-        {
-            "business_id": "-0y3MZU2oYP8r1ruDP1bfQ",
-            "dates": [
-                "2015-04-11 13:14:14",
-                "2015-11-21 16:05:56",
-                "2016-05-06 14:10:04",
-                "2017-08-09 15:15:10",
-                "2017-10-21 15:12:56"
-            ]
-        },
-        {
-            "business_id": "-1BPe8UjF2_l3nVk-DFUjA",
-            "dates": [
-                "2015-12-03 18:44:00",
-                "2016-03-17 18:19:21",
-                "2016-11-02 15:58:38"
-            ]
-        },
-        {
-            "business_id": "-1E2CQu_38mkghvmZgCCRw",
-            "dates": [
-                "2019-04-04 22:02:37"
-            ]
-        },
-        {
-            "business_id": "-1wzk43IZ5D9Ysu6kzb5xA",
-            "dates": [
-                "2019-02-27 14:03:08"
-            ]
-        },
-        {
-            "business_id": "-23R9P2eG7VTc6DVLjFKzA",
-            "dates": [
-                "2011-12-21 19:02:51",
-                "2012-04-15 04:21:39",
-                "2012-04-15 14:23:56",
-                "2013-06-30 22:39:51",
-                "2013-10-04 20:34:13",
-                "2014-07-16 02:28:40"
-            ]
-        },
-        {
-            "business_id": "-26MGfikhJiTfCI-GqmzhQ",
-            "dates": [
-                "2018-06-13 20:16:07"
-            ]
-        },
-        {
-            "business_id": "-2bLuJsMZ0WhI9daurVQNQ",
-            "dates": [
-                "2015-05-29 16:46:17",
-                "2015-06-01 15:03:53"
-            ]
-        },
-        {
-            "business_id": "-2hDBMaza_ldqnZdiU06LQ",
-            "dates": [
-                "2011-10-08 12:02:23",
-                "2014-08-18 02:11:11",
-                "2016-01-07 05:27:51",
-                "2016-10-21 20:15:55",
-                "2016-12-01 03:57:10",
-                "2016-12-29 01:54:42",
-                "2018-07-22 19:55:31",
-                "2018-09-07 01:42:54",
-                "2019-03-08 03:41:06"
-            ]
-        }
-    ]
-);
+LOAD DATASET YelpCheckin
+USING localfs (("path"="asterix_nc1://data/yelp-checkin/use-case-1.json"),
+                ("format"="json"));
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/array-index/select-quantified-queries/with-open-index/with-open-index.3.ddl.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/array-index/select-quantified-queries/with-open-index/with-open-index.3.ddl.sqlpp
index 0d37224..5a6513a 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/array-index/select-quantified-queries/with-open-index/with-open-index.3.ddl.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/array-index/select-quantified-queries/with-open-index/with-open-index.3.ddl.sqlpp
@@ -19,4 +19,4 @@
 
 USE TestYelp;
 
-CREATE INDEX IdxYelpCheckinDates ON YelpCheckin (UNNEST dates : string ) ;
+CREATE INDEX IdxYelpCheckinDates ON YelpCheckin (UNNEST dates : string ) EXCLUDE UNKNOWN KEY;
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/array-index/select-unnest-queries/closed/use-case-1/use-case-1.2.update.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/array-index/select-unnest-queries/closed/use-case-1/use-case-1.2.update.sqlpp
index b75bf1b..39fd911 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/array-index/select-unnest-queries/closed/use-case-1/use-case-1.2.update.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/array-index/select-unnest-queries/closed/use-case-1/use-case-1.2.update.sqlpp
@@ -19,258 +19,6 @@
 
 USE TestYelp;
 
-INSERT INTO YelpCheckin (
-    [
-        {
-            "business_id": "--1UhMGODdWsrMastO9DZw",
-            "dates": [
-                "2016-04-26 19:49:16",
-                "2016-08-30 18:36:57",
-                "2016-10-15 02:45:18",
-                "2016-11-18 01:54:50",
-                "2017-04-20 18:39:06",
-                "2017-05-03 17:58:02",
-                "2019-03-19 22:04:48"
-            ]
-        },
-        {
-            "business_id": "--EF5N7P70J_UYBTPypYlA",
-            "dates": [
-                "2018-05-25 19:52:07",
-                "2018-09-18 16:09:44",
-                "2019-10-18 21:29:09"
-            ]
-        },
-        {
-            "business_id": "--Ni3oJ4VOqfOEu7Sj2Vzg",
-            "dates": [
-                "2019-06-07 17:54:58"
-            ]
-        },
-        {
-            "business_id": "--Y1Adl1YUWfYIRSd8vkmA",
-            "dates": [
-                "2011-05-03 20:54:05",
-                "2011-08-23 20:49:45",
-                "2014-12-04 06:13:01",
-                "2016-11-16 19:25:55"
-            ]
-        },
-        {
-            "business_id": "--YPwqIlRJrhHkJcjY3eiA",
-            "dates": [
-                "2016-06-18 21:35:45",
-                "2016-10-15 18:17:51"
-            ]
-        },
-        {
-            "business_id": "--e8PjCNhEz32pprnPhCwQ",
-            "dates": [
-                "2015-04-02 21:45:17"
-            ]
-        },
-        {
-            "business_id": "--kinfHwmtdjz03g8B8z8Q",
-            "dates": [
-                "2014-08-27 17:49:18",
-                "2015-12-19 21:30:31",
-                "2018-11-27 15:53:50"
-            ]
-        },
-        {
-            "business_id": "--q6datkI-f0EoVheXNEeQ",
-            "dates": [
-                "2014-01-28 20:56:04",
-                "2014-11-16 16:11:58",
-                "2015-11-15 19:21:53",
-                "2015-11-15 19:33:39"
-            ]
-        },
-        {
-            "business_id": "--qvQS4MigHPykD2GV0-zw",
-            "dates": [
-                "2019-04-11 18:30:12"
-            ]
-        },
-        {
-            "business_id": "--wIGbLEhlpl_UeAIyDmZQ",
-            "dates": [
-                "2015-06-06 20:01:06",
-                "2019-03-14 22:01:52"
-            ]
-        },
-        {
-            "business_id": "-0FA-Qdi3SPYIoJz9UQw-A",
-            "dates": [
-                "2018-09-29 18:55:17",
-                "2018-10-20 16:48:05",
-                "2018-10-20 22:20:24"
-            ]
-        },
-        {
-            "business_id": "-0Hj1hb_XW6ybWq2M7QhGA",
-            "dates": [
-                "2011-04-23 21:11:22",
-                "2014-05-04 19:42:48",
-                "2014-05-11 19:16:08",
-                "2014-06-04 19:14:18",
-                "2015-12-05 19:22:42",
-                "2017-05-15 23:19:00"
-            ]
-        },
-        {
-            "business_id": "-0KMvRFwDWdVBeTpT11iHw",
-            "dates": [
-                "2012-07-13 21:43:57",
-                "2016-12-24 02:27:31",
-                "2017-08-31 00:35:26"
-            ]
-        },
-        {
-            "business_id": "-0LPtgJC31FWMrMv317p0Q",
-            "dates": [
-                "2013-04-13 12:35:33",
-                "2013-08-19 23:35:49",
-                "2013-10-04 19:14:56"
-            ]
-        },
-        {
-            "business_id": "-0M3o2uWBnQZwd3hmfEwuw",
-            "dates": [
-                "2016-09-10 19:26:19",
-                "2018-09-08 14:15:37",
-                "2019-09-13 22:47:25"
-            ]
-        },
-        {
-            "business_id": "-0RRiWDtfnS16AKCtfvBZg",
-            "dates": [
-                "2017-05-19 14:30:16",
-                "2017-05-19 14:30:25",
-                "2017-08-28 15:49:37",
-                "2017-09-20 20:19:51",
-                "2017-10-01 16:31:05",
-                "2017-10-01 16:56:27",
-                "2017-12-27 23:33:20"
-            ]
-        },
-        {
-            "business_id": "-0Soj75v-XoRcf2ERr8Bmg",
-            "dates": [
-                "2019-06-05 18:22:49"
-            ]
-        },
-        {
-            "business_id": "-0ZumLlFjMh4ZW1z2nXGug",
-            "dates": [
-                "2011-09-24 21:37:32",
-                "2014-03-10 20:20:07",
-                "2015-05-27 00:40:24",
-                "2015-08-29 17:58:15",
-                "2018-03-16 15:03:26"
-            ]
-        },
-        {
-            "business_id": "-0aOudcaAyac0VJbMX-L1g",
-            "dates": [
-                "2015-03-16 23:51:16",
-                "2015-12-21 04:48:01",
-                "2016-10-28 20:22:42",
-                "2016-10-28 20:23:00"
-            ]
-        },
-        {
-            "business_id": "-0b86isaXMY0v4g-V8GZ9Q",
-            "dates": [
-                "2013-10-22 16:49:21",
-                "2014-11-21 17:39:24"
-            ]
-        },
-        {
-            "business_id": "-0d-BfFSU0bwLcnMaGRxYw",
-            "dates": [
-                "2014-08-07 18:30:48",
-                "2014-09-16 20:41:45",
-                "2014-10-12 23:22:27",
-                "2015-07-21 20:43:56",
-                "2015-07-21 20:45:07"
-            ]
-        },
-        {
-            "business_id": "-0jz6c3C6i7RG7Ag22K-Pg",
-            "dates": [
-                "2015-05-02 19:49:05",
-                "2015-05-06 03:52:18",
-                "2015-09-26 01:13:19"
-            ]
-        },
-        {
-            "business_id": "-0y3MZU2oYP8r1ruDP1bfQ",
-            "dates": [
-                "2015-04-11 13:14:14",
-                "2015-11-21 16:05:56",
-                "2016-05-06 14:10:04",
-                "2017-08-09 15:15:10",
-                "2017-10-21 15:12:56"
-            ]
-        },
-        {
-            "business_id": "-1BPe8UjF2_l3nVk-DFUjA",
-            "dates": [
-                "2015-12-03 18:44:00",
-                "2016-03-17 18:19:21",
-                "2016-11-02 15:58:38"
-            ]
-        },
-        {
-            "business_id": "-1E2CQu_38mkghvmZgCCRw",
-            "dates": [
-                "2019-04-04 22:02:37"
-            ]
-        },
-        {
-            "business_id": "-1wzk43IZ5D9Ysu6kzb5xA",
-            "dates": [
-                "2019-02-27 14:03:08"
-            ]
-        },
-        {
-            "business_id": "-23R9P2eG7VTc6DVLjFKzA",
-            "dates": [
-                "2011-12-21 19:02:51",
-                "2012-04-15 04:21:39",
-                "2012-04-15 14:23:56",
-                "2013-06-30 22:39:51",
-                "2013-10-04 20:34:13",
-                "2014-07-16 02:28:40"
-            ]
-        },
-        {
-            "business_id": "-26MGfikhJiTfCI-GqmzhQ",
-            "dates": [
-                "2018-06-13 20:16:07"
-            ]
-        },
-        {
-            "business_id": "-2bLuJsMZ0WhI9daurVQNQ",
-            "dates": [
-                "2015-05-29 16:46:17",
-                "2015-06-01 15:03:53"
-            ]
-        },
-        {
-            "business_id": "-2hDBMaza_ldqnZdiU06LQ",
-            "dates": [
-                "2011-10-08 12:02:23",
-                "2014-08-18 02:11:11",
-                "2016-01-07 05:27:51",
-                "2016-10-21 20:15:55",
-                "2016-12-01 03:57:10",
-                "2016-12-29 01:54:42",
-                "2018-07-22 19:55:31",
-                "2018-09-07 01:42:54",
-                "2019-03-08 03:41:06"
-            ]
-        }
-    ]
-);
+LOAD DATASET YelpCheckin
+USING localfs (("path"="asterix_nc1://data/yelp-checkin/use-case-1.json"),
+                ("format"="json"));
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/array-index/select-unnest-queries/closed/use-case-1/use-case-1.3.ddl.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/array-index/select-unnest-queries/closed/use-case-1/use-case-1.3.ddl.sqlpp
index a0fc1bf..6fa8e96 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/array-index/select-unnest-queries/closed/use-case-1/use-case-1.3.ddl.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/array-index/select-unnest-queries/closed/use-case-1/use-case-1.3.ddl.sqlpp
@@ -19,4 +19,4 @@
 
 USE TestYelp;
 
-CREATE INDEX IdxYelpCheckinDates ON YelpCheckin (UNNEST dates);
+CREATE INDEX IdxYelpCheckinDates ON YelpCheckin (UNNEST dates) EXCLUDE UNKNOWN KEY;
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/array-index/select-unnest-queries/closed/use-case-2/use-case-2.2.update.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/array-index/select-unnest-queries/closed/use-case-2/use-case-2.2.update.sqlpp
index 2549e8f..18135a5 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/array-index/select-unnest-queries/closed/use-case-2/use-case-2.2.update.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/array-index/select-unnest-queries/closed/use-case-2/use-case-2.2.update.sqlpp
@@ -19,479 +19,6 @@
 
 USE TestYelp;
 
-INSERT INTO YelpCheckin (
-    [
-        {
-            "business_id": "--1UhMGODdWsrMastO9DZw",
-            "checkin_times": {
-                "dates": [
-                    "2016-04-26",
-                    "2016-08-30",
-                    "2016-10-15",
-                    "2016-11-18",
-                    "2017-04-20",
-                    "2017-05-03",
-                    "2019-03-19"
-                ],
-                "times": [
-                    "19:49:16",
-                    "18:36:57",
-                    "02:45:18",
-                    "01:54:50",
-                    "18:39:06",
-                    "17:58:02",
-                    "22:04:48"
-                ]
-            }
-        },
-        {
-            "business_id": "--EF5N7P70J_UYBTPypYlA",
-            "checkin_times": {
-                "dates": [
-                    "2018-05-25",
-                    "2018-09-18",
-                    "2019-10-18"
-                ],
-                "times": [
-                    "19:52:07",
-                    "16:09:44",
-                    "21:29:09"
-                ]
-            }
-        },
-        {
-            "business_id": "--Ni3oJ4VOqfOEu7Sj2Vzg",
-            "checkin_times": {
-                "dates": [
-                    "2019-06-07"
-                ],
-                "times": [
-                    "17:54:58"
-                ]
-            }
-        },
-        {
-            "business_id": "--Y1Adl1YUWfYIRSd8vkmA",
-            "checkin_times": {
-                "dates": [
-                    "2011-05-03",
-                    "2011-08-23",
-                    "2014-12-04",
-                    "2016-11-16"
-                ],
-                "times": [
-                    "20:54:05",
-                    "20:49:45",
-                    "06:13:01",
-                    "19:25:55"
-                ]
-            }
-        },
-        {
-            "business_id": "--YPwqIlRJrhHkJcjY3eiA",
-            "checkin_times": {
-                "dates": [
-                    "2016-06-18",
-                    "2016-10-15"
-                ],
-                "times": [
-                    "21:35:45",
-                    "18:17:51"
-                ]
-            }
-        },
-        {
-            "business_id": "--e8PjCNhEz32pprnPhCwQ",
-            "checkin_times": {
-                "dates": [
-                    "2015-04-02"
-                ],
-                "times": [
-                    "21:45:17"
-                ]
-            }
-        },
-        {
-            "business_id": "--kinfHwmtdjz03g8B8z8Q",
-            "checkin_times": {
-                "dates": [
-                    "2014-08-27",
-                    "2015-12-19",
-                    "2018-11-27"
-                ],
-                "times": [
-                    "17:49:18",
-                    "21:30:31",
-                    "15:53:50"
-                ]
-            }
-        },
-        {
-            "business_id": "--q6datkI-f0EoVheXNEeQ",
-            "checkin_times": {
-                "dates": [
-                    "2014-01-28",
-                    "2014-11-16",
-                    "2015-11-15",
-                    "2015-11-15"
-                ],
-                "times": [
-                    "20:56:04",
-                    "16:11:58",
-                    "19:21:53",
-                    "19:33:39"
-                ]
-            }
-        },
-        {
-            "business_id": "--qvQS4MigHPykD2GV0-zw",
-            "checkin_times": {
-                "dates": [
-                    "2019-04-11"
-                ],
-                "times": [
-                    "18:30:12"
-                ]
-            }
-        },
-        {
-            "business_id": "--wIGbLEhlpl_UeAIyDmZQ",
-            "checkin_times": {
-                "dates": [
-                    "2015-06-06",
-                    "2019-03-14"
-                ],
-                "times": [
-                    "20:01:06",
-                    "22:01:52"
-                ]
-            }
-        },
-        {
-            "business_id": "-0FA-Qdi3SPYIoJz9UQw-A",
-            "checkin_times": {
-                "dates": [
-                    "2018-09-29",
-                    "2018-10-20",
-                    "2018-10-20"
-                ],
-                "times": [
-                    "18:55:17",
-                    "16:48:05",
-                    "22:20:24"
-                ]
-            }
-        },
-        {
-            "business_id": "-0Hj1hb_XW6ybWq2M7QhGA",
-            "checkin_times": {
-                "dates": [
-                    "2011-04-23",
-                    "2014-05-04",
-                    "2014-05-11",
-                    "2014-06-04",
-                    "2015-12-05",
-                    "2017-05-15"
-                ],
-                "times": [
-                    "21:11:22",
-                    "19:42:48",
-                    "19:16:08",
-                    "19:14:18",
-                    "19:22:42",
-                    "23:19:00"
-                ]
-            }
-        },
-        {
-            "business_id": "-0KMvRFwDWdVBeTpT11iHw",
-            "checkin_times": {
-                "dates": [
-                    "2012-07-13",
-                    "2016-12-24",
-                    "2017-08-31"
-                ],
-                "times": [
-                    "21:43:57",
-                    "02:27:31",
-                    "00:35:26"
-                ]
-            }
-        },
-        {
-            "business_id": "-0LPtgJC31FWMrMv317p0Q",
-            "checkin_times": {
-                "dates": [
-                    "2013-04-13",
-                    "2013-08-19",
-                    "2013-10-04"
-                ],
-                "times": [
-                    "12:35:33",
-                    "23:35:49",
-                    "19:14:56"
-                ]
-            }
-        },
-        {
-            "business_id": "-0M3o2uWBnQZwd3hmfEwuw",
-            "checkin_times": {
-                "dates": [
-                    "2016-09-10",
-                    "2018-09-08",
-                    "2019-09-13"
-                ],
-                "times": [
-                    "19:26:19",
-                    "14:15:37",
-                    "22:47:25"
-                ]
-            }
-        },
-        {
-            "business_id": "-0RRiWDtfnS16AKCtfvBZg",
-            "checkin_times": {
-                "dates": [
-                    "2017-05-19",
-                    "2017-05-19",
-                    "2017-08-28",
-                    "2017-09-20",
-                    "2017-10-01",
-                    "2017-10-01",
-                    "2017-12-27"
-                ],
-                "times": [
-                    "14:30:16",
-                    "14:30:25",
-                    "15:49:37",
-                    "20:19:51",
-                    "16:31:05",
-                    "16:56:27",
-                    "23:33:20"
-                ]
-            }
-        },
-        {
-            "business_id": "-0Soj75v-XoRcf2ERr8Bmg",
-            "checkin_times": {
-                "dates": [
-                    "2019-06-05"
-                ],
-                "times": [
-                    "18:22:49"
-                ]
-            }
-        },
-        {
-            "business_id": "-0ZumLlFjMh4ZW1z2nXGug",
-            "checkin_times": {
-                "dates": [
-                    "2011-09-24",
-                    "2014-03-10",
-                    "2015-05-27",
-                    "2015-08-29",
-                    "2018-03-16"
-                ],
-                "times": [
-                    "21:37:32",
-                    "20:20:07",
-                    "00:40:24",
-                    "17:58:15",
-                    "15:03:26"
-                ]
-            }
-        },
-        {
-            "business_id": "-0aOudcaAyac0VJbMX-L1g",
-            "checkin_times": {
-                "dates": [
-                    "2015-03-16",
-                    "2015-12-21",
-                    "2016-10-28",
-                    "2016-10-28"
-                ],
-                "times": [
-                    "23:51:16",
-                    "04:48:01",
-                    "20:22:42",
-                    "20:23:00"
-                ]
-            }
-        },
-        {
-            "business_id": "-0b86isaXMY0v4g-V8GZ9Q",
-            "checkin_times": {
-                "dates": [
-                    "2013-10-22",
-                    "2014-11-21"
-                ],
-                "times": [
-                    "16:49:21",
-                    "17:39:24"
-                ]
-            }
-        },
-        {
-            "business_id": "-0d-BfFSU0bwLcnMaGRxYw",
-            "checkin_times": {
-                "dates": [
-                    "2014-08-07",
-                    "2014-09-16",
-                    "2014-10-12",
-                    "2015-07-21",
-                    "2015-07-21"
-                ],
-                "times": [
-                    "18:30:48",
-                    "20:41:45",
-                    "23:22:27",
-                    "20:43:56",
-                    "20:45:07"
-                ]
-            }
-        },
-        {
-            "business_id": "-0jz6c3C6i7RG7Ag22K-Pg",
-            "checkin_times": {
-                "dates": [
-                    "2015-05-02",
-                    "2015-05-06",
-                    "2015-09-26"
-                ],
-                "times": [
-                    "19:49:05",
-                    "03:52:18",
-                    "01:13:19"
-                ]
-            }
-        },
-        {
-            "business_id": "-0y3MZU2oYP8r1ruDP1bfQ",
-            "checkin_times": {
-                "dates": [
-                    "2015-04-11",
-                    "2015-11-21",
-                    "2016-05-06",
-                    "2017-08-09",
-                    "2017-10-21"
-                ],
-                "times": [
-                    "13:14:14",
-                    "16:05:56",
-                    "14:10:04",
-                    "15:15:10",
-                    "15:12:56"
-                ]
-            }
-        },
-        {
-            "business_id": "-1BPe8UjF2_l3nVk-DFUjA",
-            "checkin_times": {
-                "dates": [
-                    "2015-12-03",
-                    "2016-03-17",
-                    "2016-11-02"
-                ],
-                "times": [
-                    "18:44:00",
-                    "18:19:21",
-                    "15:58:38"
-                ]
-            }
-        },
-        {
-            "business_id": "-1E2CQu_38mkghvmZgCCRw",
-            "checkin_times": {
-                "dates": [
-                    "2019-04-04"
-                ],
-                "times": [
-                    "22:02:37"
-                ]
-            }
-        },
-        {
-            "business_id": "-1wzk43IZ5D9Ysu6kzb5xA",
-            "checkin_times": {
-                "dates": [
-                    "2019-02-27"
-                ],
-                "times": [
-                    "14:03:08"
-                ]
-            }
-        },
-        {
-            "business_id": "-23R9P2eG7VTc6DVLjFKzA",
-            "checkin_times": {
-                "dates": [
-                    "2011-12-21",
-                    "2012-04-15",
-                    "2012-04-15",
-                    "2013-06-30",
-                    "2013-10-04",
-                    "2014-07-16"
-                ],
-                "times": [
-                    "19:02:51",
-                    "04:21:39",
-                    "14:23:56",
-                    "22:39:51",
-                    "20:34:13",
-                    "02:28:40"
-                ]
-            }
-        },
-        {
-            "business_id": "-26MGfikhJiTfCI-GqmzhQ",
-            "checkin_times": {
-                "dates": [
-                    "2018-06-13"
-                ],
-                "times": [
-                    "20:16:07"
-                ]
-            }
-        },
-        {
-            "business_id": "-2bLuJsMZ0WhI9daurVQNQ",
-            "checkin_times": {
-                "dates": [
-                    "2015-05-29",
-                    "2015-06-01"
-                ],
-                "times": [
-                    "16:46:17",
-                    "15:03:53"
-                ]
-            }
-        },
-        {
-            "business_id": "-2hDBMaza_ldqnZdiU06LQ",
-            "checkin_times": {
-                "dates": [
-                    "2011-10-08",
-                    "2014-08-18",
-                    "2016-01-07",
-                    "2016-10-21",
-                    "2016-12-01",
-                    "2016-12-29",
-                    "2018-07-22",
-                    "2018-09-07",
-                    "2019-03-08"
-                ],
-                "times": [
-                    "12:02:23",
-                    "02:11:11",
-                    "05:27:51",
-                    "20:15:55",
-                    "03:57:10",
-                    "01:54:42",
-                    "19:55:31",
-                    "01:42:54",
-                    "03:41:06"
-                ]
-            }
-        }
-    ]
-);
+LOAD DATASET YelpCheckin
+USING localfs (("path"="asterix_nc1://data/yelp-checkin/use-case-2.json"),
+                ("format"="json"));
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/array-index/select-unnest-queries/closed/use-case-2/use-case-2.3.ddl.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/array-index/select-unnest-queries/closed/use-case-2/use-case-2.3.ddl.sqlpp
index 0ab72fe..caaaad0 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/array-index/select-unnest-queries/closed/use-case-2/use-case-2.3.ddl.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/array-index/select-unnest-queries/closed/use-case-2/use-case-2.3.ddl.sqlpp
@@ -19,4 +19,4 @@
 
 USE TestYelp;
 
-CREATE INDEX IdxYelpCheckinDates ON YelpCheckin (UNNEST checkin_times.dates);
+CREATE INDEX IdxYelpCheckinDates ON YelpCheckin (UNNEST checkin_times.dates) EXCLUDE UNKNOWN KEY;
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/array-index/select-unnest-queries/closed/use-case-3/use-case-3.2.update.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/array-index/select-unnest-queries/closed/use-case-3/use-case-3.2.update.sqlpp
index 02ddf21..f05a19b 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/array-index/select-unnest-queries/closed/use-case-3/use-case-3.2.update.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/array-index/select-unnest-queries/closed/use-case-3/use-case-3.2.update.sqlpp
@@ -19,258 +19,6 @@
 
 USE TestYelp;
 
-INSERT INTO YelpCheckin (
-    [
-        {
-            "business_id": "--1UhMGODdWsrMastO9DZw",
-            "checkin_times": [ 
-                {"date": "2016-04-26", "time": "19:49:16"},
-                {"date": "2016-08-30", "time": "18:36:57"},
-                {"date": "2016-10-15", "time": "02:45:18"},
-                {"date": "2016-11-18", "time": "01:54:50"},
-                {"date": "2017-04-20", "time": "18:39:06"},
-                {"date": "2017-05-03", "time": "17:58:02"},
-                {"date": "2019-03-19", "time": "22:04:48"}
-             ]
-        },
-        {
-            "business_id": "--EF5N7P70J_UYBTPypYlA",
-            "checkin_times": [ 
-                {"date": "2018-05-25", "time": "19:52:07"},
-                {"date": "2018-09-18", "time": "16:09:44"},
-                {"date": "2019-10-18", "time": "21:29:09"}
-             ]
-        },
-        {
-            "business_id": "--Ni3oJ4VOqfOEu7Sj2Vzg",
-            "checkin_times": [ 
-                {"date": "2019-06-07", "time": "17:54:58"}
-             ]
-        },
-        {
-            "business_id": "--Y1Adl1YUWfYIRSd8vkmA",
-            "checkin_times": [ 
-                {"date": "2011-05-03", "time": "20:54:05"},
-                {"date": "2011-08-23", "time": "20:49:45"},
-                {"date": "2014-12-04", "time": "06:13:01"},
-                {"date": "2016-11-16", "time": "19:25:55"}
-             ]
-        },
-        {
-            "business_id": "--YPwqIlRJrhHkJcjY3eiA",
-            "checkin_times": [ 
-                {"date": "2016-06-18", "time": "21:35:45"},
-                {"date": "2016-10-15", "time": "18:17:51"}
-             ]
-        },
-        {
-            "business_id": "--e8PjCNhEz32pprnPhCwQ",
-            "checkin_times": [ 
-                {"date": "2015-04-02", "time": "21:45:17"}
-             ]
-        },
-        {
-            "business_id": "--kinfHwmtdjz03g8B8z8Q",
-            "checkin_times": [ 
-                {"date": "2014-08-27", "time": "17:49:18"},
-                {"date": "2015-12-19", "time": "21:30:31"},
-                {"date": "2018-11-27", "time": "15:53:50"}
-             ]
-        },
-        {
-            "business_id": "--q6datkI-f0EoVheXNEeQ",
-            "checkin_times": [ 
-                {"date": "2014-01-28", "time": "20:56:04"},
-                {"date": "2014-11-16", "time": "16:11:58"},
-                {"date": "2015-11-15", "time": "19:21:53"},
-                {"date": "2015-11-15", "time": "19:33:39"}
-             ]
-        },
-        {
-            "business_id": "--qvQS4MigHPykD2GV0-zw",
-            "checkin_times": [ 
-                {"date": "2019-04-11", "time": "18:30:12"}
-             ]
-        },
-        {
-            "business_id": "--wIGbLEhlpl_UeAIyDmZQ",
-            "checkin_times": [ 
-                {"date": "2015-06-06", "time": "20:01:06"},
-                {"date": "2019-03-14", "time": "22:01:52"}
-             ]
-        },
-        {
-            "business_id": "-0FA-Qdi3SPYIoJz9UQw-A",
-            "checkin_times": [ 
-                {"date": "2018-09-29", "time": "18:55:17"},
-                {"date": "2018-10-20", "time": "16:48:05"},
-                {"date": "2018-10-20", "time": "22:20:24"}
-             ]
-        },
-        {
-            "business_id": "-0Hj1hb_XW6ybWq2M7QhGA",
-            "checkin_times": [ 
-                {"date": "2011-04-23", "time": "21:11:22"},
-                {"date": "2014-05-04", "time": "19:42:48"},
-                {"date": "2014-05-11", "time": "19:16:08"},
-                {"date": "2014-06-04", "time": "19:14:18"},
-                {"date": "2015-12-05", "time": "19:22:42"},
-                {"date": "2017-05-15", "time": "23:19:00"}
-             ]
-        },
-        {
-            "business_id": "-0KMvRFwDWdVBeTpT11iHw",
-            "checkin_times": [ 
-                {"date": "2012-07-13", "time": "21:43:57"},
-                {"date": "2016-12-24", "time": "02:27:31"},
-                {"date": "2017-08-31", "time": "00:35:26"}
-             ]
-        },
-        {
-            "business_id": "-0LPtgJC31FWMrMv317p0Q",
-            "checkin_times": [ 
-                {"date": "2013-04-13", "time": "12:35:33"},
-                {"date": "2013-08-19", "time": "23:35:49"},
-                {"date": "2013-10-04", "time": "19:14:56"}
-             ]
-        },
-        {
-            "business_id": "-0M3o2uWBnQZwd3hmfEwuw",
-            "checkin_times": [ 
-                {"date": "2016-09-10", "time": "19:26:19"},
-                {"date": "2018-09-08", "time": "14:15:37"},
-                {"date": "2019-09-13", "time": "22:47:25"}
-             ]
-        },
-        {
-            "business_id": "-0RRiWDtfnS16AKCtfvBZg",
-            "checkin_times": [ 
-                {"date": "2017-05-19", "time": "14:30:16"},
-                {"date": "2017-05-19", "time": "14:30:25"},
-                {"date": "2017-08-28", "time": "15:49:37"},
-                {"date": "2017-09-20", "time": "20:19:51"},
-                {"date": "2017-10-01", "time": "16:31:05"},
-                {"date": "2017-10-01", "time": "16:56:27"},
-                {"date": "2017-12-27", "time": "23:33:20"}
-             ]
-        },
-        {
-            "business_id": "-0Soj75v-XoRcf2ERr8Bmg",
-            "checkin_times": [ 
-                {"date": "2019-06-05", "time": "18:22:49"}
-             ]
-        },
-        {
-            "business_id": "-0ZumLlFjMh4ZW1z2nXGug",
-            "checkin_times": [ 
-                {"date": "2011-09-24", "time": "21:37:32"},
-                {"date": "2014-03-10", "time": "20:20:07"},
-                {"date": "2015-05-27", "time": "00:40:24"},
-                {"date": "2015-08-29", "time": "17:58:15"},
-                {"date": "2018-03-16", "time": "15:03:26"}
-             ]
-        },
-        {
-            "business_id": "-0aOudcaAyac0VJbMX-L1g",
-            "checkin_times": [ 
-                {"date": "2015-03-16", "time": "23:51:16"},
-                {"date": "2015-12-21", "time": "04:48:01"},
-                {"date": "2016-10-28", "time": "20:22:42"},
-                {"date": "2016-10-28", "time": "20:23:00"}
-             ]
-        },
-        {
-            "business_id": "-0b86isaXMY0v4g-V8GZ9Q",
-            "checkin_times": [ 
-                {"date": "2013-10-22", "time": "16:49:21"},
-                {"date": "2014-11-21", "time": "17:39:24"}
-             ]
-        },
-        {
-            "business_id": "-0d-BfFSU0bwLcnMaGRxYw",
-            "checkin_times": [ 
-                {"date": "2014-08-07", "time": "18:30:48"},
-                {"date": "2014-09-16", "time": "20:41:45"},
-                {"date": "2014-10-12", "time": "23:22:27"},
-                {"date": "2015-07-21", "time": "20:43:56"},
-                {"date": "2015-07-21", "time": "20:45:07"}
-             ]
-        },
-        {
-            "business_id": "-0jz6c3C6i7RG7Ag22K-Pg",
-            "checkin_times": [ 
-                {"date": "2015-05-02", "time": "19:49:05"},
-                {"date": "2015-05-06", "time": "03:52:18"},
-                {"date": "2015-09-26", "time": "01:13:19"}
-             ]
-        },
-        {
-            "business_id": "-0y3MZU2oYP8r1ruDP1bfQ",
-            "checkin_times": [ 
-                {"date": "2015-04-11", "time": "13:14:14"},
-                {"date": "2015-11-21", "time": "16:05:56"},
-                {"date": "2016-05-06", "time": "14:10:04"},
-                {"date": "2017-08-09", "time": "15:15:10"},
-                {"date": "2017-10-21", "time": "15:12:56"}
-             ]
-        },
-        {
-            "business_id": "-1BPe8UjF2_l3nVk-DFUjA",
-            "checkin_times": [ 
-                {"date": "2015-12-03", "time": "18:44:00"},
-                {"date": "2016-03-17", "time": "18:19:21"},
-                {"date": "2016-11-02", "time": "15:58:38"}
-             ]
-        },
-        {
-            "business_id": "-1E2CQu_38mkghvmZgCCRw",
-            "checkin_times": [ 
-                {"date": "2019-04-04", "time": "22:02:37"}
-             ]
-        },
-        {
-            "business_id": "-1wzk43IZ5D9Ysu6kzb5xA",
-            "checkin_times": [ 
-                {"date": "2019-02-27", "time": "14:03:08"}
-             ]
-        },
-        {
-            "business_id": "-23R9P2eG7VTc6DVLjFKzA",
-            "checkin_times": [ 
-                {"date": "2011-12-21", "time": "19:02:51"},
-                {"date": "2012-04-15", "time": "04:21:39"},
-                {"date": "2012-04-15", "time": "14:23:56"},
-                {"date": "2013-06-30", "time": "22:39:51"},
-                {"date": "2013-10-04", "time": "20:34:13"},
-                {"date": "2014-07-16", "time": "02:28:40"}
-             ]
-        },
-        {
-            "business_id": "-26MGfikhJiTfCI-GqmzhQ",
-            "checkin_times": [ 
-                {"date": "2018-06-13", "time": "20:16:07"}
-             ]
-        },
-        {
-            "business_id": "-2bLuJsMZ0WhI9daurVQNQ",
-            "checkin_times": [ 
-                {"date": "2015-05-29", "time": "16:46:17"},
-                {"date": "2015-06-01", "time": "15:03:53"}
-             ]
-        },
-        {
-            "business_id": "-2hDBMaza_ldqnZdiU06LQ",
-            "checkin_times": [ 
-                {"date": "2011-10-08", "time": "12:02:23"},
-                {"date": "2014-08-18", "time": "02:11:11"},
-                {"date": "2016-01-07", "time": "05:27:51"},
-                {"date": "2016-10-21", "time": "20:15:55"},
-                {"date": "2016-12-01", "time": "03:57:10"},
-                {"date": "2016-12-29", "time": "01:54:42"},
-                {"date": "2018-07-22", "time": "19:55:31"},
-                {"date": "2018-09-07", "time": "01:42:54"},
-                {"date": "2019-03-08", "time": "03:41:06"}
-             ]
-        }
-    ]
-);
+LOAD DATASET YelpCheckin
+USING localfs (("path"="asterix_nc1://data/yelp-checkin/use-case-3.json"),
+                ("format"="json"));
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/array-index/select-unnest-queries/closed/use-case-3/use-case-3.3.ddl.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/array-index/select-unnest-queries/closed/use-case-3/use-case-3.3.ddl.sqlpp
index ee911b4..4154d37 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/array-index/select-unnest-queries/closed/use-case-3/use-case-3.3.ddl.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/array-index/select-unnest-queries/closed/use-case-3/use-case-3.3.ddl.sqlpp
@@ -19,4 +19,4 @@
 
 USE TestYelp;
 
-CREATE INDEX IdxYelpCheckinDates ON YelpCheckin (UNNEST checkin_times SELECT date);
+CREATE INDEX IdxYelpCheckinDates ON YelpCheckin (UNNEST checkin_times SELECT date) EXCLUDE UNKNOWN KEY;
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/array-index/select-unnest-queries/closed/use-case-4/use-case-4.2.update.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/array-index/select-unnest-queries/closed/use-case-4/use-case-4.2.update.sqlpp
index 7fcf9e4..197d417 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/array-index/select-unnest-queries/closed/use-case-4/use-case-4.2.update.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/array-index/select-unnest-queries/closed/use-case-4/use-case-4.2.update.sqlpp
@@ -19,407 +19,6 @@
 
 USE TestYelp;
 
-INSERT INTO YelpCheckin (
-    [
-        {
-            "business_id": "--1UhMGODdWsrMastO9DZw",
-            "checkin_times": [ 
-                {
-                    "dates": ["2016-04-26", "2016-08-30", "2016-10-15", "2016-11-18"],
-                    "times": ["19:49:16", "18:36:57", "02:45:18", "01:54:50"]
-                },
-                {
-                    "dates": ["2017-04-20", "2017-05-03"],
-                    "times": ["18:39:06", "17:58:02"]
-                },
-                {
-                    "dates": ["2019-03-19"],
-                    "times": ["22:04:48"]
-                }
-             ]
-        },
-        {
-            "business_id": "--EF5N7P70J_UYBTPypYlA",
-            "checkin_times": [ 
-                {
-                    "dates": ["2018-05-25", "2018-09-18"],
-                    "times": ["19:52:07", "16:09:44"]
-                },
-                {
-                    "dates": ["2019-10-18"],
-                    "times": ["21:29:09"]
-                }
-             ]
-        },
-        {
-            "business_id": "--Ni3oJ4VOqfOEu7Sj2Vzg",
-            "checkin_times": [ 
-                {
-                    "dates": ["2019-06-07"],
-                    "times": ["17:54:58"]
-                }
-             ]
-        },
-        {
-            "business_id": "--Y1Adl1YUWfYIRSd8vkmA",
-            "checkin_times": [ 
-                {
-                    "dates": ["2011-05-03", "2011-08-23"],
-                    "times": ["20:54:05", "20:49:45"]
-                },
-                {
-                    "dates": ["2014-12-04"],
-                    "times": ["06:13:01"]
-                },
-                {
-                    "dates": ["2016-11-16"],
-                    "times": ["19:25:55"]
-                }
-             ]
-        },
-        {
-            "business_id": "--YPwqIlRJrhHkJcjY3eiA",
-            "checkin_times": [ 
-               {
-                    "dates": ["2016-06-18", "2016-10-15"],
-                    "times": ["21:35:45", "18:17:51"]
-                }
-             ]
-        },
-        {
-            "business_id": "--e8PjCNhEz32pprnPhCwQ",
-            "checkin_times": [ 
-                {
-                    "dates": ["2015-04-02"],
-                    "times": ["21:45:17"]
-                }
-             ]
-        },
-        {
-            "business_id": "--kinfHwmtdjz03g8B8z8Q",
-            "checkin_times": [ 
-                {
-                    "dates": ["2014-08-27"],
-                    "times": ["17:49:18"]
-                },
-                {
-                    "dates": ["2015-12-19"],
-                    "times": ["21:30:31"]
-                },
-                {
-                    "dates": ["2018-11-27"],
-                    "times": ["15:53:50"]
-                }
-             ]
-        },
-        {
-            "business_id": "--q6datkI-f0EoVheXNEeQ",
-            "checkin_times": [ 
-                {
-                    "dates": ["2014-01-28", "2014-11-16"],
-                    "times": ["20:56:04", "16:11:58"]
-                },
-                {
-                    "dates": ["2015-11-15", "2015-11-15"],
-                    "times": ["19:21:53", "19:33:39"]
-                }
-             ]
-        },
-        {
-            "business_id": "--qvQS4MigHPykD2GV0-zw",
-            "checkin_times": [ 
-                {
-                    "dates": ["2019-04-11"],
-                    "times": ["18:30:12"]
-                }
-             ]
-        },
-        {
-            "business_id": "--wIGbLEhlpl_UeAIyDmZQ",
-            "checkin_times": [ 
-                {
-                    "dates": ["2015-06-06"],
-                    "times": ["20:01:06"]
-                },
-                {
-                    "dates": ["2019-03-14"],
-                    "times": ["22:01:52"]
-                }
-             ]
-        },
-        {
-            "business_id": "-0FA-Qdi3SPYIoJz9UQw-A",
-            "checkin_times": [ 
-                {
-                    "dates": ["2018-09-29", "2018-10-20", "2018-10-20"],
-                    "times": ["18:55:17", "16:48:05", "22:20:24"]
-                }
-             ]
-        },
-        {
-            "business_id": "-0Hj1hb_XW6ybWq2M7QhGA",
-            "checkin_times": [ 
-                {
-                    "dates": ["2011-04-23"],
-                    "times": ["21:11:22"]
-                },
-                {
-                    "dates": ["2014-05-04", "2014-05-11", "2014-06-04"],
-                    "times": ["19:42:48", "19:16:08", "19:14:18"]
-                },
-                {
-                    "dates": ["2015-12-05"],
-                    "times": ["19:22:42"]
-                },
-                {
-                    "dates": ["2017-05-15"],
-                    "times": ["23:19:00"]
-                }
-             ]
-        },
-        {
-            "business_id": "-0KMvRFwDWdVBeTpT11iHw",
-            "checkin_times": [ 
-                {
-                    "dates": ["2012-07-13"],
-                    "times": ["21:43:57"]
-                },
-                {
-                    "dates": ["2016-12-24"],
-                    "times": ["02:27:31"]
-                },
-                {
-                    "dates": ["2017-08-31"],
-                    "times": ["00:35:26"]
-                }
-             ]
-        },
-        {
-            "business_id": "-0LPtgJC31FWMrMv317p0Q",
-            "checkin_times": [ 
-                {
-                    "dates": ["2013-04-13", "2013-08-19", "2013-10-04"],
-                    "times": ["12:35:33", "23:35:49", "19:14:56"]
-                }
-
-             ]
-        },
-        {
-            "business_id": "-0M3o2uWBnQZwd3hmfEwuw",
-            "checkin_times": [ 
-                {
-                    "dates": ["2016-09-10"],
-                    "times": ["19:26:19"]
-                },
-                {
-                    "dates": ["2018-09-08"],
-                    "times": ["14:15:37"]
-                },
-                {
-                    "dates": ["2019-09-13"],
-                    "times": ["22:47:25"]
-                }
-             ]
-        },
-        {
-            "business_id": "-0RRiWDtfnS16AKCtfvBZg",
-            "checkin_times": [ 
-                 {
-                    "dates": ["2017-05-19", "2017-05-19", "2017-08-28", "2017-09-20", "2017-10-01", "2017-10-01", "2017-12-27"],
-                    "times": ["14:30:16", "14:30:25", "15:49:37", "20:19:51", "16:31:05", "16:56:27", "23:33:20"]
-                }
-             ]
-        },
-        {
-            "business_id": "-0Soj75v-XoRcf2ERr8Bmg",
-            "checkin_times": [ 
-                {
-                    "dates": ["2019-06-05"],
-                    "times": ["18:22:49"]
-                }
-             ]
-        },
-        {
-            "business_id": "-0ZumLlFjMh4ZW1z2nXGug",
-            "checkin_times": [ 
-                {
-                    "dates": ["2011-09-24"],
-                    "times": ["21:37:32"]
-                },
-                {
-                    "dates": ["2014-03-10"],
-                    "times": ["20:20:07"]
-                },
-                {
-                    "dates": ["2015-05-27", "2015-08-29"],
-                    "times": ["00:40:24", "17:58:15"]
-                },
-                {
-                    "dates": ["2018-03-16"],
-                    "times": ["15:03:26"]
-                }
-             ]
-        },
-        {
-            "business_id": "-0aOudcaAyac0VJbMX-L1g",
-            "checkin_times": [ 
-                {
-                    "dates": ["2015-03-16", "2015-12-21"],
-                    "times": ["23:51:16", "04:48:01"]
-                },
-                {
-                    "dates": ["2016-10-28", "2016-10-28"],
-                    "times": ["20:22:42", "20:23:00"]
-                }
-             ]
-        },
-        {
-            "business_id": "-0b86isaXMY0v4g-V8GZ9Q",
-            "checkin_times": [ 
-                {
-                    "dates": ["2013-10-22"],
-                    "times": ["16:49:21"]
-                },
-                {
-                    "dates": ["2014-11-21"],
-                    "times": ["17:39:24"]
-                }
-             ]
-        },
-        {
-            "business_id": "-0d-BfFSU0bwLcnMaGRxYw",
-            "checkin_times": [ 
-                {
-                    "dates": ["2014-08-07", "2014-09-16", "2014-10-12"],
-                    "times": ["18:30:48", "20:41:45", "23:22:27"]
-                },
-                {
-                    "dates": ["2015-07-21", "2015-07-21"],
-                    "times": ["20:43:56", "20:45:07"]
-                }
-             ]
-        },
-        {
-            "business_id": "-0jz6c3C6i7RG7Ag22K-Pg",
-            "checkin_times": [ 
-                {
-                    "dates": ["2015-05-02", "2015-05-06", "2015-09-26"],
-                    "times": ["19:49:05", "03:52:18", "01:13:19"]
-                }
-
-             ]
-        },
-        {
-            "business_id": "-0y3MZU2oYP8r1ruDP1bfQ",
-            "checkin_times": [ 
-                {
-                    "dates": ["2015-04-11", "2015-11-21"],
-                    "times": ["13:14:14", "16:05:56"]
-                },
-                {
-                    "dates": ["2016-05-06"],
-                    "times": ["14:10:04"]
-                },
-                {
-                    "dates": ["2017-08-09", "2017-10-21"],
-                    "times": ["15:15:10", "15:12:56"]
-                }
-             ]
-        },
-        {
-            "business_id": "-1BPe8UjF2_l3nVk-DFUjA",
-            "checkin_times": [ 
-                {
-                    "dates": ["2015-12-03"],
-                    "times": ["18:44:00"]
-                },
-                {
-                    "dates": ["2016-03-17", "2016-11-02"],
-                    "times": ["18:19:21", "15:58:38"]
-                }
-             ]
-        },
-        {
-            "business_id": "-1E2CQu_38mkghvmZgCCRw",
-            "checkin_times": [ 
-                {
-                    "dates": ["2019-04-04"],
-                    "times": ["22:02:37"]
-                }
-             ]
-        },
-        {
-            "business_id": "-1wzk43IZ5D9Ysu6kzb5xA",
-            "checkin_times": [ 
-                {
-                    "dates": ["2019-02-27"],
-                    "times": ["14:03:08"]
-                }
-             ]
-        },
-        {
-            "business_id": "-23R9P2eG7VTc6DVLjFKzA",
-            "checkin_times": [ 
-                {
-                    "dates": ["2011-12-21"],
-                    "times": ["19:02:51"]
-                },
-                {
-                    "dates": ["2012-04-15", "2012-04-15"],
-                    "times": ["04:21:39", "14:23:56"]
-                },
-                {
-                    "dates": ["2013-06-30", "2013-10-04"],
-                    "times": ["22:39:51", "20:34:13"]
-                },
-                {
-                    "dates": ["2014-07-16"],
-                    "times": ["02:28:40"]
-                }
-             ]
-        },
-        {
-            "business_id": "-26MGfikhJiTfCI-GqmzhQ",
-            "checkin_times": [ 
-                {
-                    "dates": ["2018-06-13"],
-                    "times": ["20:16:07"]
-                }
-             ]
-        },
-        {
-            "business_id": "-2bLuJsMZ0WhI9daurVQNQ",
-            "checkin_times": [ 
-                {
-                    "dates": ["2015-05-29", "2015-06-01"],
-                    "times": ["16:46:17", "15:03:53"]
-                }
-             ]
-        },
-        {
-            "business_id": "-2hDBMaza_ldqnZdiU06LQ",
-            "checkin_times": [ 
-                {
-                    "dates": ["2011-10-08"],
-                    "times": ["12:02:23"]
-                },
-                {
-                    "dates": ["2014-08-18"],
-                    "times": ["02:11:11"]
-                },
-                {
-                    "dates": ["2016-01-07", "2016-10-21", "2016-12-01", "2016-12-29"],
-                    "times": ["05:27:51", "20:15:55", "03:57:10", "01:54:42"]
-                },
-                {
-                    "dates": ["2018-07-22", "2018-09-07"],
-                    "times": ["19:55:31", "01:42:54"]
-                },
-                {
-                    "dates": ["2019-03-08"],
-                    "times": ["03:41:06"]
-                }
-             ]
-        }
-    ]
-);
+LOAD DATASET YelpCheckin
+USING localfs (("path"="asterix_nc1://data/yelp-checkin/use-case-4.json"),
+                ("format"="json"));
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/array-index/select-unnest-queries/closed/use-case-4/use-case-4.3.ddl.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/array-index/select-unnest-queries/closed/use-case-4/use-case-4.3.ddl.sqlpp
index 05a7c76..e59799e 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/array-index/select-unnest-queries/closed/use-case-4/use-case-4.3.ddl.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/array-index/select-unnest-queries/closed/use-case-4/use-case-4.3.ddl.sqlpp
@@ -19,4 +19,4 @@
 
 USE TestYelp;
 
-CREATE INDEX IdxYelpCheckinDates ON YelpCheckin (UNNEST checkin_times UNNEST dates);
+CREATE INDEX IdxYelpCheckinDates ON YelpCheckin (UNNEST checkin_times UNNEST dates) EXCLUDE UNKNOWN KEY;
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/array-index/select-unnest-queries/closed/with-3-level-record-path/with-3-level-record-path.2.update.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/array-index/select-unnest-queries/closed/with-3-level-record-path/with-3-level-record-path.2.update.sqlpp
index 884c224..8c7303c 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/array-index/select-unnest-queries/closed/with-3-level-record-path/with-3-level-record-path.2.update.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/array-index/select-unnest-queries/closed/with-3-level-record-path/with-3-level-record-path.2.update.sqlpp
@@ -19,599 +19,6 @@
 
 USE TestYelp;
 
-INSERT INTO YelpCheckin (
-    [
-        {
-            "business_id": "--1UhMGODdWsrMastO9DZw",
-            "checkin_data": {
-                "checkin_temporal": {
-                    "checkin_times": {
-                        "dates": [
-                            "2016-04-26",
-                            "2016-08-30",
-                            "2016-10-15",
-                            "2016-11-18",
-                            "2017-04-20",
-                            "2017-05-03",
-                            "2019-03-19"
-                        ],
-                        "times": [
-                            "19:49:16",
-                            "18:36:57",
-                            "02:45:18",
-                            "01:54:50",
-                            "18:39:06",
-                            "17:58:02",
-                            "22:04:48"
-                        ]
-                    }
-                }
-            }
-        },
-        {
-            "business_id": "--EF5N7P70J_UYBTPypYlA",
-            "checkin_data": {
-                "checkin_temporal": {
-                    "checkin_times": {
-                        "dates": [
-                            "2018-05-25",
-                            "2018-09-18",
-                            "2019-10-18"
-                        ],
-                        "times": [
-                            "19:52:07",
-                            "16:09:44",
-                            "21:29:09"
-                        ]
-                    }
-                }
-            }
-        },
-        {
-            "business_id": "--Ni3oJ4VOqfOEu7Sj2Vzg",
-            "checkin_data": {
-                "checkin_temporal": {
-                    "checkin_times": {
-                        "dates": [
-                            "2019-06-07"
-                        ],
-                        "times": [
-                            "17:54:58"
-                        ]
-                    }
-                }
-            }
-        },
-        {
-            "business_id": "--Y1Adl1YUWfYIRSd8vkmA",
-            "checkin_data": {
-                "checkin_temporal": {
-                    "checkin_times": {
-                        "dates": [
-                            "2011-05-03",
-                            "2011-08-23",
-                            "2014-12-04",
-                            "2016-11-16"
-                        ],
-                        "times": [
-                            "20:54:05",
-                            "20:49:45",
-                            "06:13:01",
-                            "19:25:55"
-                        ]
-                    }
-                }
-            }
-        },
-        {
-            "business_id": "--YPwqIlRJrhHkJcjY3eiA",
-            "checkin_data": {
-                "checkin_temporal": {
-                    "checkin_times": {
-                        "dates": [
-                            "2016-06-18",
-                            "2016-10-15"
-                        ],
-                        "times": [
-                            "21:35:45",
-                            "18:17:51"
-                        ]
-                    }
-                }
-            }
-        },
-        {
-            "business_id": "--e8PjCNhEz32pprnPhCwQ",
-            "checkin_data": {
-                "checkin_temporal": {
-                    "checkin_times": {
-                        "dates": [
-                            "2015-04-02"
-                        ],
-                        "times": [
-                            "21:45:17"
-                        ]
-                    }
-                }
-            }
-        },
-        {
-            "business_id": "--kinfHwmtdjz03g8B8z8Q",
-            "checkin_data": {
-                "checkin_temporal": {
-                    "checkin_times": {
-                        "dates": [
-                            "2014-08-27",
-                            "2015-12-19",
-                            "2018-11-27"
-                        ],
-                        "times": [
-                            "17:49:18",
-                            "21:30:31",
-                            "15:53:50"
-                        ]
-                    }
-                }
-            }
-        },
-        {
-            "business_id": "--q6datkI-f0EoVheXNEeQ",
-            "checkin_data": {
-                "checkin_temporal": {
-                    "checkin_times": {
-                        "dates": [
-                            "2014-01-28",
-                            "2014-11-16",
-                            "2015-11-15",
-                            "2015-11-15"
-                        ],
-                        "times": [
-                            "20:56:04",
-                            "16:11:58",
-                            "19:21:53",
-                            "19:33:39"
-                        ]
-                    }
-                }
-            }
-        },
-        {
-            "business_id": "--qvQS4MigHPykD2GV0-zw",
-            "checkin_data": {
-                "checkin_temporal": {
-                    "checkin_times": {
-                        "dates": [
-                            "2019-04-11"
-                        ],
-                        "times": [
-                            "18:30:12"
-                        ]
-                    }
-                }
-            }
-        },
-        {
-            "business_id": "--wIGbLEhlpl_UeAIyDmZQ",
-            "checkin_data": {
-                "checkin_temporal": {
-                    "checkin_times": {
-                        "dates": [
-                            "2015-06-06",
-                            "2019-03-14"
-                        ],
-                        "times": [
-                            "20:01:06",
-                            "22:01:52"
-                        ]
-                    }
-                }
-            }
-        },
-        {
-            "business_id": "-0FA-Qdi3SPYIoJz9UQw-A",
-            "checkin_data": {
-                "checkin_temporal": {
-                    "checkin_times": {
-                        "dates": [
-                            "2018-09-29",
-                            "2018-10-20",
-                            "2018-10-20"
-                        ],
-                        "times": [
-                            "18:55:17",
-                            "16:48:05",
-                            "22:20:24"
-                        ]
-                    }
-                }
-            }
-        },
-        {
-            "business_id": "-0Hj1hb_XW6ybWq2M7QhGA",
-            "checkin_data": {
-                "checkin_temporal": {
-                    "checkin_times": {
-                        "dates": [
-                            "2011-04-23",
-                            "2014-05-04",
-                            "2014-05-11",
-                            "2014-06-04",
-                            "2015-12-05",
-                            "2017-05-15"
-                        ],
-                        "times": [
-                            "21:11:22",
-                            "19:42:48",
-                            "19:16:08",
-                            "19:14:18",
-                            "19:22:42",
-                            "23:19:00"
-                        ]
-                    }
-                }
-            }
-        },
-        {
-            "business_id": "-0KMvRFwDWdVBeTpT11iHw",
-            "checkin_data": {
-                "checkin_temporal": {
-                    "checkin_times": {
-                        "dates": [
-                            "2012-07-13",
-                            "2016-12-24",
-                            "2017-08-31"
-                        ],
-                        "times": [
-                            "21:43:57",
-                            "02:27:31",
-                            "00:35:26"
-                        ]
-                    }
-                }
-            }
-        },
-        {
-            "business_id": "-0LPtgJC31FWMrMv317p0Q",
-            "checkin_data": {
-                "checkin_temporal": {
-                    "checkin_times": {
-                        "dates": [
-                            "2013-04-13",
-                            "2013-08-19",
-                            "2013-10-04"
-                        ],
-                        "times": [
-                            "12:35:33",
-                            "23:35:49",
-                            "19:14:56"
-                        ]
-                    }
-                }
-            }
-        },
-        {
-            "business_id": "-0M3o2uWBnQZwd3hmfEwuw",
-            "checkin_data": {
-                "checkin_temporal": {
-                    "checkin_times": {
-                        "dates": [
-                            "2016-09-10",
-                            "2018-09-08",
-                            "2019-09-13"
-                        ],
-                        "times": [
-                            "19:26:19",
-                            "14:15:37",
-                            "22:47:25"
-                        ]
-                    }
-                }
-            }
-        },
-        {
-            "business_id": "-0RRiWDtfnS16AKCtfvBZg",
-            "checkin_data": {
-                "checkin_temporal": {
-                    "checkin_times": {
-                        "dates": [
-                            "2017-05-19",
-                            "2017-05-19",
-                            "2017-08-28",
-                            "2017-09-20",
-                            "2017-10-01",
-                            "2017-10-01",
-                            "2017-12-27"
-                        ],
-                        "times": [
-                            "14:30:16",
-                            "14:30:25",
-                            "15:49:37",
-                            "20:19:51",
-                            "16:31:05",
-                            "16:56:27",
-                            "23:33:20"
-                        ]
-                    }
-                }
-            }
-        },
-        {
-            "business_id": "-0Soj75v-XoRcf2ERr8Bmg",
-            "checkin_data": {
-                "checkin_temporal": {
-                    "checkin_times": {
-                        "dates": [
-                            "2019-06-05"
-                        ],
-                        "times": [
-                            "18:22:49"
-                        ]
-                    }
-                }
-            }
-        },
-        {
-            "business_id": "-0ZumLlFjMh4ZW1z2nXGug",
-            "checkin_data": {
-                "checkin_temporal": {
-                    "checkin_times": {
-                        "dates": [
-                            "2011-09-24",
-                            "2014-03-10",
-                            "2015-05-27",
-                            "2015-08-29",
-                            "2018-03-16"
-                        ],
-                        "times": [
-                            "21:37:32",
-                            "20:20:07",
-                            "00:40:24",
-                            "17:58:15",
-                            "15:03:26"
-                        ]
-                    }
-                }
-            }
-        },
-        {
-            "business_id": "-0aOudcaAyac0VJbMX-L1g",
-            "checkin_data": {
-                "checkin_temporal": {
-                    "checkin_times": {
-                        "dates": [
-                            "2015-03-16",
-                            "2015-12-21",
-                            "2016-10-28",
-                            "2016-10-28"
-                        ],
-                        "times": [
-                            "23:51:16",
-                            "04:48:01",
-                            "20:22:42",
-                            "20:23:00"
-                        ]
-                    }
-                }
-            }
-        },
-        {
-            "business_id": "-0b86isaXMY0v4g-V8GZ9Q",
-            "checkin_data": {
-                "checkin_temporal": {
-                    "checkin_times": {
-                        "dates": [
-                            "2013-10-22",
-                            "2014-11-21"
-                        ],
-                        "times": [
-                            "16:49:21",
-                            "17:39:24"
-                        ]
-                    }
-                }
-            }
-        },
-        {
-            "business_id": "-0d-BfFSU0bwLcnMaGRxYw",
-            "checkin_data": {
-                "checkin_temporal": {
-                    "checkin_times": {
-                        "dates": [
-                            "2014-08-07",
-                            "2014-09-16",
-                            "2014-10-12",
-                            "2015-07-21",
-                            "2015-07-21"
-                        ],
-                        "times": [
-                            "18:30:48",
-                            "20:41:45",
-                            "23:22:27",
-                            "20:43:56",
-                            "20:45:07"
-                        ]
-                    }
-                }
-            }
-        },
-        {
-            "business_id": "-0jz6c3C6i7RG7Ag22K-Pg",
-            "checkin_data": {
-                "checkin_temporal": {
-                    "checkin_times": {
-                        "dates": [
-                            "2015-05-02",
-                            "2015-05-06",
-                            "2015-09-26"
-                        ],
-                        "times": [
-                            "19:49:05",
-                            "03:52:18",
-                            "01:13:19"
-                        ]
-                    }
-                }
-            }
-        },
-        {
-            "business_id": "-0y3MZU2oYP8r1ruDP1bfQ",
-            "checkin_data": {
-                "checkin_temporal": {
-                    "checkin_times": {
-                        "dates": [
-                            "2015-04-11",
-                            "2015-11-21",
-                            "2016-05-06",
-                            "2017-08-09",
-                            "2017-10-21"
-                        ],
-                        "times": [
-                            "13:14:14",
-                            "16:05:56",
-                            "14:10:04",
-                            "15:15:10",
-                            "15:12:56"
-                        ]
-                    }
-                }
-            }
-        },
-        {
-            "business_id": "-1BPe8UjF2_l3nVk-DFUjA",
-            "checkin_data": {
-                "checkin_temporal": {
-                    "checkin_times": {
-                        "dates": [
-                            "2015-12-03",
-                            "2016-03-17",
-                            "2016-11-02"
-                        ],
-                        "times": [
-                            "18:44:00",
-                            "18:19:21",
-                            "15:58:38"
-                        ]
-                    }
-                }
-            }
-        },
-        {
-            "business_id": "-1E2CQu_38mkghvmZgCCRw",
-            "checkin_data": {
-                "checkin_temporal": {
-                    "checkin_times": {
-                        "dates": [
-                            "2019-04-04"
-                        ],
-                        "times": [
-                            "22:02:37"
-                        ]
-                    }
-                }
-            }
-        },
-        {
-            "business_id": "-1wzk43IZ5D9Ysu6kzb5xA",
-            "checkin_data": {
-                "checkin_temporal": {
-                    "checkin_times": {
-                        "dates": [
-                            "2019-02-27"
-                        ],
-                        "times": [
-                            "14:03:08"
-                        ]
-                    }
-                }
-            }
-        },
-        {
-            "business_id": "-23R9P2eG7VTc6DVLjFKzA",
-            "checkin_data": {
-                "checkin_temporal": {
-                    "checkin_times": {
-                        "dates": [
-                            "2011-12-21",
-                            "2012-04-15",
-                            "2012-04-15",
-                            "2013-06-30",
-                            "2013-10-04",
-                            "2014-07-16"
-                        ],
-                        "times": [
-                            "19:02:51",
-                            "04:21:39",
-                            "14:23:56",
-                            "22:39:51",
-                            "20:34:13",
-                            "02:28:40"
-                        ]
-                    }
-                }
-            }
-        },
-        {
-            "business_id": "-26MGfikhJiTfCI-GqmzhQ",
-            "checkin_data": {
-                "checkin_temporal": {
-                    "checkin_times": {
-                        "dates": [
-                            "2018-06-13"
-                        ],
-                        "times": [
-                            "20:16:07"
-                        ]
-                    }
-                }
-            }
-        },
-        {
-            "business_id": "-2bLuJsMZ0WhI9daurVQNQ",
-            "checkin_data": {
-                "checkin_temporal": {
-                    "checkin_times": {
-                        "dates": [
-                            "2015-05-29",
-                            "2015-06-01"
-                        ],
-                        "times": [
-                            "16:46:17",
-                            "15:03:53"
-                        ]
-                    }
-                }
-            }
-        },
-        {
-            "business_id": "-2hDBMaza_ldqnZdiU06LQ",
-            "checkin_data": {
-                "checkin_temporal": {
-                    "checkin_times": {
-                        "dates": [
-                            "2011-10-08",
-                            "2014-08-18",
-                            "2016-01-07",
-                            "2016-10-21",
-                            "2016-12-01",
-                            "2016-12-29",
-                            "2018-07-22",
-                            "2018-09-07",
-                            "2019-03-08"
-                        ],
-                        "times": [
-                            "12:02:23",
-                            "02:11:11",
-                            "05:27:51",
-                            "20:15:55",
-                            "03:57:10",
-                            "01:54:42",
-                            "19:55:31",
-                            "01:42:54",
-                            "03:41:06"
-                        ]
-                    }
-                }
-            }
-        }
-    ]
-);
+LOAD DATASET YelpCheckin
+USING localfs (("path"="asterix_nc1://data/yelp-checkin/with-3-level-record-path.json"),
+                ("format"="json"));
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/array-index/select-unnest-queries/closed/with-3-level-record-path/with-3-level-record-path.3.ddl.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/array-index/select-unnest-queries/closed/with-3-level-record-path/with-3-level-record-path.3.ddl.sqlpp
index 5ef37bc..01be97a 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/array-index/select-unnest-queries/closed/with-3-level-record-path/with-3-level-record-path.3.ddl.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/array-index/select-unnest-queries/closed/with-3-level-record-path/with-3-level-record-path.3.ddl.sqlpp
@@ -19,4 +19,6 @@
 
 USE TestYelp;
 
-CREATE INDEX IdxYelpCheckinDates ON YelpCheckin (UNNEST checkin_data.checkin_temporal.checkin_times.dates);
+CREATE INDEX  IdxYelpCheckinDates
+ON            YelpCheckin (UNNEST checkin_data.checkin_temporal.checkin_times.dates)
+EXCLUDE UNKNOWN KEY;
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/array-index/select-unnest-queries/closed/with-composite-pk/with-composite-pk.2.update.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/array-index/select-unnest-queries/closed/with-composite-pk/with-composite-pk.2.update.sqlpp
index 6498c14..3594aee 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/array-index/select-unnest-queries/closed/with-composite-pk/with-composite-pk.2.update.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/array-index/select-unnest-queries/closed/with-composite-pk/with-composite-pk.2.update.sqlpp
@@ -19,288 +19,6 @@
 
 USE TestYelp;
 
-INSERT INTO YelpCheckin (
-    [
-        {
-            "checkin_id": 1,
-            "business_id": "--1UhMGODdWsrMastO9DZw",
-            "dates": [
-                "2016-04-26 19:49:16",
-                "2016-08-30 18:36:57",
-                "2016-10-15 02:45:18",
-                "2016-11-18 01:54:50",
-                "2017-04-20 18:39:06",
-                "2017-05-03 17:58:02",
-                "2019-03-19 22:04:48"
-            ]
-        },
-        {
-            "checkin_id": 2,
-            "business_id": "--EF5N7P70J_UYBTPypYlA",
-            "dates": [
-                "2018-05-25 19:52:07",
-                "2018-09-18 16:09:44",
-                "2019-10-18 21:29:09"
-            ]
-        },
-        {
-            "checkin_id": 3,
-            "business_id": "--Ni3oJ4VOqfOEu7Sj2Vzg",
-            "dates": [
-                "2019-06-07 17:54:58"
-            ]
-        },
-        {
-            "checkin_id": 4,
-            "business_id": "--Y1Adl1YUWfYIRSd8vkmA",
-            "dates": [
-                "2011-05-03 20:54:05",
-                "2011-08-23 20:49:45",
-                "2014-12-04 06:13:01",
-                "2016-11-16 19:25:55"
-            ]
-        },
-        {
-            "checkin_id": 5,
-            "business_id": "--YPwqIlRJrhHkJcjY3eiA",
-            "dates": [
-                "2016-06-18 21:35:45",
-                "2016-10-15 18:17:51"
-            ]
-        },
-        {
-            "checkin_id": 6,
-            "business_id": "--e8PjCNhEz32pprnPhCwQ",
-            "dates": [
-                "2015-04-02 21:45:17"
-            ]
-        },
-        {
-            "checkin_id": 7,
-            "business_id": "--kinfHwmtdjz03g8B8z8Q",
-            "dates": [
-                "2014-08-27 17:49:18",
-                "2015-12-19 21:30:31",
-                "2018-11-27 15:53:50"
-            ]
-        },
-        {
-            "checkin_id": 8,
-            "business_id": "--q6datkI-f0EoVheXNEeQ",
-            "dates": [
-                "2014-01-28 20:56:04",
-                "2014-11-16 16:11:58",
-                "2015-11-15 19:21:53",
-                "2015-11-15 19:33:39"
-            ]
-        },
-        {
-            "checkin_id": 9,
-            "business_id": "--qvQS4MigHPykD2GV0-zw",
-            "dates": [
-                "2019-04-11 18:30:12"
-            ]
-        },
-        {
-            "checkin_id": 10,
-            "business_id": "--wIGbLEhlpl_UeAIyDmZQ",
-            "dates": [
-                "2015-06-06 20:01:06",
-                "2019-03-14 22:01:52"
-            ]
-        },
-        {
-            "checkin_id": 11,
-            "business_id": "-0FA-Qdi3SPYIoJz9UQw-A",
-            "dates": [
-                "2018-09-29 18:55:17",
-                "2018-10-20 16:48:05",
-                "2018-10-20 22:20:24"
-            ]
-        },
-        {
-            "checkin_id": 12,
-            "business_id": "-0Hj1hb_XW6ybWq2M7QhGA",
-            "dates": [
-                "2011-04-23 21:11:22",
-                "2014-05-04 19:42:48",
-                "2014-05-11 19:16:08",
-                "2014-06-04 19:14:18",
-                "2015-12-05 19:22:42",
-                "2017-05-15 23:19:00"
-            ]
-        },
-        {
-            "checkin_id": 13,
-            "business_id": "-0KMvRFwDWdVBeTpT11iHw",
-            "dates": [
-                "2012-07-13 21:43:57",
-                "2016-12-24 02:27:31",
-                "2017-08-31 00:35:26"
-            ]
-        },
-        {
-            "checkin_id": 14,
-            "business_id": "-0LPtgJC31FWMrMv317p0Q",
-            "dates": [
-                "2013-04-13 12:35:33",
-                "2013-08-19 23:35:49",
-                "2013-10-04 19:14:56"
-            ]
-        },
-        {
-            "checkin_id": 15,
-            "business_id": "-0M3o2uWBnQZwd3hmfEwuw",
-            "dates": [
-                "2016-09-10 19:26:19",
-                "2018-09-08 14:15:37",
-                "2019-09-13 22:47:25"
-            ]
-        },
-        {
-            "checkin_id": 16,
-            "business_id": "-0RRiWDtfnS16AKCtfvBZg",
-            "dates": [
-                "2017-05-19 14:30:16",
-                "2017-05-19 14:30:25",
-                "2017-08-28 15:49:37",
-                "2017-09-20 20:19:51",
-                "2017-10-01 16:31:05",
-                "2017-10-01 16:56:27",
-                "2017-12-27 23:33:20"
-            ]
-        },
-        {
-            "checkin_id": 17,
-            "business_id": "-0Soj75v-XoRcf2ERr8Bmg",
-            "dates": [
-                "2019-06-05 18:22:49"
-            ]
-        },
-        {
-            "checkin_id": 18,
-            "business_id": "-0ZumLlFjMh4ZW1z2nXGug",
-            "dates": [
-                "2011-09-24 21:37:32",
-                "2014-03-10 20:20:07",
-                "2015-05-27 00:40:24",
-                "2015-08-29 17:58:15",
-                "2018-03-16 15:03:26"
-            ]
-        },
-        {
-            "checkin_id": 19,
-            "business_id": "-0aOudcaAyac0VJbMX-L1g",
-            "dates": [
-                "2015-03-16 23:51:16",
-                "2015-12-21 04:48:01",
-                "2016-10-28 20:22:42",
-                "2016-10-28 20:23:00"
-            ]
-        },
-        {
-            "checkin_id": 20,
-            "business_id": "-0b86isaXMY0v4g-V8GZ9Q",
-            "dates": [
-                "2013-10-22 16:49:21",
-                "2014-11-21 17:39:24"
-            ]
-        },
-        {
-            "checkin_id": 21,
-            "business_id": "-0d-BfFSU0bwLcnMaGRxYw",
-            "dates": [
-                "2014-08-07 18:30:48",
-                "2014-09-16 20:41:45",
-                "2014-10-12 23:22:27",
-                "2015-07-21 20:43:56",
-                "2015-07-21 20:45:07"
-            ]
-        },
-        {
-            "checkin_id": 22,
-            "business_id": "-0jz6c3C6i7RG7Ag22K-Pg",
-            "dates": [
-                "2015-05-02 19:49:05",
-                "2015-05-06 03:52:18",
-                "2015-09-26 01:13:19"
-            ]
-        },
-        {
-            "checkin_id": 23,
-            "business_id": "-0y3MZU2oYP8r1ruDP1bfQ",
-            "dates": [
-                "2015-04-11 13:14:14",
-                "2015-11-21 16:05:56",
-                "2016-05-06 14:10:04",
-                "2017-08-09 15:15:10",
-                "2017-10-21 15:12:56"
-            ]
-        },
-        {
-            "checkin_id": 24,
-            "business_id": "-1BPe8UjF2_l3nVk-DFUjA",
-            "dates": [
-                "2015-12-03 18:44:00",
-                "2016-03-17 18:19:21",
-                "2016-11-02 15:58:38"
-            ]
-        },
-        {
-            "checkin_id": 25,
-            "business_id": "-1E2CQu_38mkghvmZgCCRw",
-            "dates": [
-                "2019-04-04 22:02:37"
-            ]
-        },
-        {
-            "checkin_id": 26,
-            "business_id": "-1wzk43IZ5D9Ysu6kzb5xA",
-            "dates": [
-                "2019-02-27 14:03:08"
-            ]
-        },
-        {
-            "checkin_id": 27,
-            "business_id": "-23R9P2eG7VTc6DVLjFKzA",
-            "dates": [
-                "2011-12-21 19:02:51",
-                "2012-04-15 04:21:39",
-                "2012-04-15 14:23:56",
-                "2013-06-30 22:39:51",
-                "2013-10-04 20:34:13",
-                "2014-07-16 02:28:40"
-            ]
-        },
-        {
-            "checkin_id": 28,
-            "business_id": "-26MGfikhJiTfCI-GqmzhQ",
-            "dates": [
-                "2018-06-13 20:16:07"
-            ]
-        },
-        {
-            "checkin_id": 29,
-            "business_id": "-2bLuJsMZ0WhI9daurVQNQ",
-            "dates": [
-                "2015-05-29 16:46:17",
-                "2015-06-01 15:03:53"
-            ]
-        },
-        {
-            "checkin_id": 30,
-            "business_id": "-2hDBMaza_ldqnZdiU06LQ",
-            "dates": [
-                "2011-10-08 12:02:23",
-                "2014-08-18 02:11:11",
-                "2016-01-07 05:27:51",
-                "2016-10-21 20:15:55",
-                "2016-12-01 03:57:10",
-                "2016-12-29 01:54:42",
-                "2018-07-22 19:55:31",
-                "2018-09-07 01:42:54",
-                "2019-03-08 03:41:06"
-            ]
-        }
-    ]
-);
+LOAD DATASET YelpCheckin
+USING localfs (("path"="asterix_nc1://data/yelp-checkin/with-composite-pk.json"),
+                ("format"="json"));
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/array-index/select-unnest-queries/closed/with-composite-pk/with-composite-pk.3.ddl.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/array-index/select-unnest-queries/closed/with-composite-pk/with-composite-pk.3.ddl.sqlpp
index a0fc1bf..6fa8e96 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/array-index/select-unnest-queries/closed/with-composite-pk/with-composite-pk.3.ddl.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/array-index/select-unnest-queries/closed/with-composite-pk/with-composite-pk.3.ddl.sqlpp
@@ -19,4 +19,4 @@
 
 USE TestYelp;
 
-CREATE INDEX IdxYelpCheckinDates ON YelpCheckin (UNNEST dates);
+CREATE INDEX IdxYelpCheckinDates ON YelpCheckin (UNNEST dates) EXCLUDE UNKNOWN KEY;
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/array-index/select-unnest-queries/closed/with-composite-sk/with-composite-sk.2.update.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/array-index/select-unnest-queries/closed/with-composite-sk/with-composite-sk.2.update.sqlpp
index 02ddf21..cb5c748 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/array-index/select-unnest-queries/closed/with-composite-sk/with-composite-sk.2.update.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/array-index/select-unnest-queries/closed/with-composite-sk/with-composite-sk.2.update.sqlpp
@@ -19,258 +19,6 @@
 
 USE TestYelp;
 
-INSERT INTO YelpCheckin (
-    [
-        {
-            "business_id": "--1UhMGODdWsrMastO9DZw",
-            "checkin_times": [ 
-                {"date": "2016-04-26", "time": "19:49:16"},
-                {"date": "2016-08-30", "time": "18:36:57"},
-                {"date": "2016-10-15", "time": "02:45:18"},
-                {"date": "2016-11-18", "time": "01:54:50"},
-                {"date": "2017-04-20", "time": "18:39:06"},
-                {"date": "2017-05-03", "time": "17:58:02"},
-                {"date": "2019-03-19", "time": "22:04:48"}
-             ]
-        },
-        {
-            "business_id": "--EF5N7P70J_UYBTPypYlA",
-            "checkin_times": [ 
-                {"date": "2018-05-25", "time": "19:52:07"},
-                {"date": "2018-09-18", "time": "16:09:44"},
-                {"date": "2019-10-18", "time": "21:29:09"}
-             ]
-        },
-        {
-            "business_id": "--Ni3oJ4VOqfOEu7Sj2Vzg",
-            "checkin_times": [ 
-                {"date": "2019-06-07", "time": "17:54:58"}
-             ]
-        },
-        {
-            "business_id": "--Y1Adl1YUWfYIRSd8vkmA",
-            "checkin_times": [ 
-                {"date": "2011-05-03", "time": "20:54:05"},
-                {"date": "2011-08-23", "time": "20:49:45"},
-                {"date": "2014-12-04", "time": "06:13:01"},
-                {"date": "2016-11-16", "time": "19:25:55"}
-             ]
-        },
-        {
-            "business_id": "--YPwqIlRJrhHkJcjY3eiA",
-            "checkin_times": [ 
-                {"date": "2016-06-18", "time": "21:35:45"},
-                {"date": "2016-10-15", "time": "18:17:51"}
-             ]
-        },
-        {
-            "business_id": "--e8PjCNhEz32pprnPhCwQ",
-            "checkin_times": [ 
-                {"date": "2015-04-02", "time": "21:45:17"}
-             ]
-        },
-        {
-            "business_id": "--kinfHwmtdjz03g8B8z8Q",
-            "checkin_times": [ 
-                {"date": "2014-08-27", "time": "17:49:18"},
-                {"date": "2015-12-19", "time": "21:30:31"},
-                {"date": "2018-11-27", "time": "15:53:50"}
-             ]
-        },
-        {
-            "business_id": "--q6datkI-f0EoVheXNEeQ",
-            "checkin_times": [ 
-                {"date": "2014-01-28", "time": "20:56:04"},
-                {"date": "2014-11-16", "time": "16:11:58"},
-                {"date": "2015-11-15", "time": "19:21:53"},
-                {"date": "2015-11-15", "time": "19:33:39"}
-             ]
-        },
-        {
-            "business_id": "--qvQS4MigHPykD2GV0-zw",
-            "checkin_times": [ 
-                {"date": "2019-04-11", "time": "18:30:12"}
-             ]
-        },
-        {
-            "business_id": "--wIGbLEhlpl_UeAIyDmZQ",
-            "checkin_times": [ 
-                {"date": "2015-06-06", "time": "20:01:06"},
-                {"date": "2019-03-14", "time": "22:01:52"}
-             ]
-        },
-        {
-            "business_id": "-0FA-Qdi3SPYIoJz9UQw-A",
-            "checkin_times": [ 
-                {"date": "2018-09-29", "time": "18:55:17"},
-                {"date": "2018-10-20", "time": "16:48:05"},
-                {"date": "2018-10-20", "time": "22:20:24"}
-             ]
-        },
-        {
-            "business_id": "-0Hj1hb_XW6ybWq2M7QhGA",
-            "checkin_times": [ 
-                {"date": "2011-04-23", "time": "21:11:22"},
-                {"date": "2014-05-04", "time": "19:42:48"},
-                {"date": "2014-05-11", "time": "19:16:08"},
-                {"date": "2014-06-04", "time": "19:14:18"},
-                {"date": "2015-12-05", "time": "19:22:42"},
-                {"date": "2017-05-15", "time": "23:19:00"}
-             ]
-        },
-        {
-            "business_id": "-0KMvRFwDWdVBeTpT11iHw",
-            "checkin_times": [ 
-                {"date": "2012-07-13", "time": "21:43:57"},
-                {"date": "2016-12-24", "time": "02:27:31"},
-                {"date": "2017-08-31", "time": "00:35:26"}
-             ]
-        },
-        {
-            "business_id": "-0LPtgJC31FWMrMv317p0Q",
-            "checkin_times": [ 
-                {"date": "2013-04-13", "time": "12:35:33"},
-                {"date": "2013-08-19", "time": "23:35:49"},
-                {"date": "2013-10-04", "time": "19:14:56"}
-             ]
-        },
-        {
-            "business_id": "-0M3o2uWBnQZwd3hmfEwuw",
-            "checkin_times": [ 
-                {"date": "2016-09-10", "time": "19:26:19"},
-                {"date": "2018-09-08", "time": "14:15:37"},
-                {"date": "2019-09-13", "time": "22:47:25"}
-             ]
-        },
-        {
-            "business_id": "-0RRiWDtfnS16AKCtfvBZg",
-            "checkin_times": [ 
-                {"date": "2017-05-19", "time": "14:30:16"},
-                {"date": "2017-05-19", "time": "14:30:25"},
-                {"date": "2017-08-28", "time": "15:49:37"},
-                {"date": "2017-09-20", "time": "20:19:51"},
-                {"date": "2017-10-01", "time": "16:31:05"},
-                {"date": "2017-10-01", "time": "16:56:27"},
-                {"date": "2017-12-27", "time": "23:33:20"}
-             ]
-        },
-        {
-            "business_id": "-0Soj75v-XoRcf2ERr8Bmg",
-            "checkin_times": [ 
-                {"date": "2019-06-05", "time": "18:22:49"}
-             ]
-        },
-        {
-            "business_id": "-0ZumLlFjMh4ZW1z2nXGug",
-            "checkin_times": [ 
-                {"date": "2011-09-24", "time": "21:37:32"},
-                {"date": "2014-03-10", "time": "20:20:07"},
-                {"date": "2015-05-27", "time": "00:40:24"},
-                {"date": "2015-08-29", "time": "17:58:15"},
-                {"date": "2018-03-16", "time": "15:03:26"}
-             ]
-        },
-        {
-            "business_id": "-0aOudcaAyac0VJbMX-L1g",
-            "checkin_times": [ 
-                {"date": "2015-03-16", "time": "23:51:16"},
-                {"date": "2015-12-21", "time": "04:48:01"},
-                {"date": "2016-10-28", "time": "20:22:42"},
-                {"date": "2016-10-28", "time": "20:23:00"}
-             ]
-        },
-        {
-            "business_id": "-0b86isaXMY0v4g-V8GZ9Q",
-            "checkin_times": [ 
-                {"date": "2013-10-22", "time": "16:49:21"},
-                {"date": "2014-11-21", "time": "17:39:24"}
-             ]
-        },
-        {
-            "business_id": "-0d-BfFSU0bwLcnMaGRxYw",
-            "checkin_times": [ 
-                {"date": "2014-08-07", "time": "18:30:48"},
-                {"date": "2014-09-16", "time": "20:41:45"},
-                {"date": "2014-10-12", "time": "23:22:27"},
-                {"date": "2015-07-21", "time": "20:43:56"},
-                {"date": "2015-07-21", "time": "20:45:07"}
-             ]
-        },
-        {
-            "business_id": "-0jz6c3C6i7RG7Ag22K-Pg",
-            "checkin_times": [ 
-                {"date": "2015-05-02", "time": "19:49:05"},
-                {"date": "2015-05-06", "time": "03:52:18"},
-                {"date": "2015-09-26", "time": "01:13:19"}
-             ]
-        },
-        {
-            "business_id": "-0y3MZU2oYP8r1ruDP1bfQ",
-            "checkin_times": [ 
-                {"date": "2015-04-11", "time": "13:14:14"},
-                {"date": "2015-11-21", "time": "16:05:56"},
-                {"date": "2016-05-06", "time": "14:10:04"},
-                {"date": "2017-08-09", "time": "15:15:10"},
-                {"date": "2017-10-21", "time": "15:12:56"}
-             ]
-        },
-        {
-            "business_id": "-1BPe8UjF2_l3nVk-DFUjA",
-            "checkin_times": [ 
-                {"date": "2015-12-03", "time": "18:44:00"},
-                {"date": "2016-03-17", "time": "18:19:21"},
-                {"date": "2016-11-02", "time": "15:58:38"}
-             ]
-        },
-        {
-            "business_id": "-1E2CQu_38mkghvmZgCCRw",
-            "checkin_times": [ 
-                {"date": "2019-04-04", "time": "22:02:37"}
-             ]
-        },
-        {
-            "business_id": "-1wzk43IZ5D9Ysu6kzb5xA",
-            "checkin_times": [ 
-                {"date": "2019-02-27", "time": "14:03:08"}
-             ]
-        },
-        {
-            "business_id": "-23R9P2eG7VTc6DVLjFKzA",
-            "checkin_times": [ 
-                {"date": "2011-12-21", "time": "19:02:51"},
-                {"date": "2012-04-15", "time": "04:21:39"},
-                {"date": "2012-04-15", "time": "14:23:56"},
-                {"date": "2013-06-30", "time": "22:39:51"},
-                {"date": "2013-10-04", "time": "20:34:13"},
-                {"date": "2014-07-16", "time": "02:28:40"}
-             ]
-        },
-        {
-            "business_id": "-26MGfikhJiTfCI-GqmzhQ",
-            "checkin_times": [ 
-                {"date": "2018-06-13", "time": "20:16:07"}
-             ]
-        },
-        {
-            "business_id": "-2bLuJsMZ0WhI9daurVQNQ",
-            "checkin_times": [ 
-                {"date": "2015-05-29", "time": "16:46:17"},
-                {"date": "2015-06-01", "time": "15:03:53"}
-             ]
-        },
-        {
-            "business_id": "-2hDBMaza_ldqnZdiU06LQ",
-            "checkin_times": [ 
-                {"date": "2011-10-08", "time": "12:02:23"},
-                {"date": "2014-08-18", "time": "02:11:11"},
-                {"date": "2016-01-07", "time": "05:27:51"},
-                {"date": "2016-10-21", "time": "20:15:55"},
-                {"date": "2016-12-01", "time": "03:57:10"},
-                {"date": "2016-12-29", "time": "01:54:42"},
-                {"date": "2018-07-22", "time": "19:55:31"},
-                {"date": "2018-09-07", "time": "01:42:54"},
-                {"date": "2019-03-08", "time": "03:41:06"}
-             ]
-        }
-    ]
-);
+LOAD DATASET YelpCheckin
+USING localfs (("path"="asterix_nc1://data/yelp-checkin/use-case-3.json"),
+                ("format"="json"));
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/array-index/select-unnest-queries/closed/with-composite-sk/with-composite-sk.3.ddl.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/array-index/select-unnest-queries/closed/with-composite-sk/with-composite-sk.3.ddl.sqlpp
index 20de338..2c9136a 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/array-index/select-unnest-queries/closed/with-composite-sk/with-composite-sk.3.ddl.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/array-index/select-unnest-queries/closed/with-composite-sk/with-composite-sk.3.ddl.sqlpp
@@ -19,4 +19,6 @@
 
 USE TestYelp;
 
-CREATE INDEX IdxYelpCheckinDatesTimesBusiness ON YelpCheckin (UNNEST checkin_times SELECT date, time);
+CREATE INDEX  IdxYelpCheckinDatesTimesBusiness
+ON            YelpCheckin (UNNEST checkin_times SELECT date, time)
+EXCLUDE UNKNOWN KEY;
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/array-index/select-unnest-queries/closed/with-filter-fields/with-filter-fields.3.ddl.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/array-index/select-unnest-queries/closed/with-filter-fields/with-filter-fields.3.ddl.sqlpp
index a0fc1bf..6fa8e96 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/array-index/select-unnest-queries/closed/with-filter-fields/with-filter-fields.3.ddl.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/array-index/select-unnest-queries/closed/with-filter-fields/with-filter-fields.3.ddl.sqlpp
@@ -19,4 +19,4 @@
 
 USE TestYelp;
 
-CREATE INDEX IdxYelpCheckinDates ON YelpCheckin (UNNEST dates);
+CREATE INDEX IdxYelpCheckinDates ON YelpCheckin (UNNEST dates) EXCLUDE UNKNOWN KEY;
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/array-index/select-unnest-queries/open/use-case-1/use-case-1.2.update.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/array-index/select-unnest-queries/open/use-case-1/use-case-1.2.update.sqlpp
index b75bf1b..39fd911 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/array-index/select-unnest-queries/open/use-case-1/use-case-1.2.update.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/array-index/select-unnest-queries/open/use-case-1/use-case-1.2.update.sqlpp
@@ -19,258 +19,6 @@
 
 USE TestYelp;
 
-INSERT INTO YelpCheckin (
-    [
-        {
-            "business_id": "--1UhMGODdWsrMastO9DZw",
-            "dates": [
-                "2016-04-26 19:49:16",
-                "2016-08-30 18:36:57",
-                "2016-10-15 02:45:18",
-                "2016-11-18 01:54:50",
-                "2017-04-20 18:39:06",
-                "2017-05-03 17:58:02",
-                "2019-03-19 22:04:48"
-            ]
-        },
-        {
-            "business_id": "--EF5N7P70J_UYBTPypYlA",
-            "dates": [
-                "2018-05-25 19:52:07",
-                "2018-09-18 16:09:44",
-                "2019-10-18 21:29:09"
-            ]
-        },
-        {
-            "business_id": "--Ni3oJ4VOqfOEu7Sj2Vzg",
-            "dates": [
-                "2019-06-07 17:54:58"
-            ]
-        },
-        {
-            "business_id": "--Y1Adl1YUWfYIRSd8vkmA",
-            "dates": [
-                "2011-05-03 20:54:05",
-                "2011-08-23 20:49:45",
-                "2014-12-04 06:13:01",
-                "2016-11-16 19:25:55"
-            ]
-        },
-        {
-            "business_id": "--YPwqIlRJrhHkJcjY3eiA",
-            "dates": [
-                "2016-06-18 21:35:45",
-                "2016-10-15 18:17:51"
-            ]
-        },
-        {
-            "business_id": "--e8PjCNhEz32pprnPhCwQ",
-            "dates": [
-                "2015-04-02 21:45:17"
-            ]
-        },
-        {
-            "business_id": "--kinfHwmtdjz03g8B8z8Q",
-            "dates": [
-                "2014-08-27 17:49:18",
-                "2015-12-19 21:30:31",
-                "2018-11-27 15:53:50"
-            ]
-        },
-        {
-            "business_id": "--q6datkI-f0EoVheXNEeQ",
-            "dates": [
-                "2014-01-28 20:56:04",
-                "2014-11-16 16:11:58",
-                "2015-11-15 19:21:53",
-                "2015-11-15 19:33:39"
-            ]
-        },
-        {
-            "business_id": "--qvQS4MigHPykD2GV0-zw",
-            "dates": [
-                "2019-04-11 18:30:12"
-            ]
-        },
-        {
-            "business_id": "--wIGbLEhlpl_UeAIyDmZQ",
-            "dates": [
-                "2015-06-06 20:01:06",
-                "2019-03-14 22:01:52"
-            ]
-        },
-        {
-            "business_id": "-0FA-Qdi3SPYIoJz9UQw-A",
-            "dates": [
-                "2018-09-29 18:55:17",
-                "2018-10-20 16:48:05",
-                "2018-10-20 22:20:24"
-            ]
-        },
-        {
-            "business_id": "-0Hj1hb_XW6ybWq2M7QhGA",
-            "dates": [
-                "2011-04-23 21:11:22",
-                "2014-05-04 19:42:48",
-                "2014-05-11 19:16:08",
-                "2014-06-04 19:14:18",
-                "2015-12-05 19:22:42",
-                "2017-05-15 23:19:00"
-            ]
-        },
-        {
-            "business_id": "-0KMvRFwDWdVBeTpT11iHw",
-            "dates": [
-                "2012-07-13 21:43:57",
-                "2016-12-24 02:27:31",
-                "2017-08-31 00:35:26"
-            ]
-        },
-        {
-            "business_id": "-0LPtgJC31FWMrMv317p0Q",
-            "dates": [
-                "2013-04-13 12:35:33",
-                "2013-08-19 23:35:49",
-                "2013-10-04 19:14:56"
-            ]
-        },
-        {
-            "business_id": "-0M3o2uWBnQZwd3hmfEwuw",
-            "dates": [
-                "2016-09-10 19:26:19",
-                "2018-09-08 14:15:37",
-                "2019-09-13 22:47:25"
-            ]
-        },
-        {
-            "business_id": "-0RRiWDtfnS16AKCtfvBZg",
-            "dates": [
-                "2017-05-19 14:30:16",
-                "2017-05-19 14:30:25",
-                "2017-08-28 15:49:37",
-                "2017-09-20 20:19:51",
-                "2017-10-01 16:31:05",
-                "2017-10-01 16:56:27",
-                "2017-12-27 23:33:20"
-            ]
-        },
-        {
-            "business_id": "-0Soj75v-XoRcf2ERr8Bmg",
-            "dates": [
-                "2019-06-05 18:22:49"
-            ]
-        },
-        {
-            "business_id": "-0ZumLlFjMh4ZW1z2nXGug",
-            "dates": [
-                "2011-09-24 21:37:32",
-                "2014-03-10 20:20:07",
-                "2015-05-27 00:40:24",
-                "2015-08-29 17:58:15",
-                "2018-03-16 15:03:26"
-            ]
-        },
-        {
-            "business_id": "-0aOudcaAyac0VJbMX-L1g",
-            "dates": [
-                "2015-03-16 23:51:16",
-                "2015-12-21 04:48:01",
-                "2016-10-28 20:22:42",
-                "2016-10-28 20:23:00"
-            ]
-        },
-        {
-            "business_id": "-0b86isaXMY0v4g-V8GZ9Q",
-            "dates": [
-                "2013-10-22 16:49:21",
-                "2014-11-21 17:39:24"
-            ]
-        },
-        {
-            "business_id": "-0d-BfFSU0bwLcnMaGRxYw",
-            "dates": [
-                "2014-08-07 18:30:48",
-                "2014-09-16 20:41:45",
-                "2014-10-12 23:22:27",
-                "2015-07-21 20:43:56",
-                "2015-07-21 20:45:07"
-            ]
-        },
-        {
-            "business_id": "-0jz6c3C6i7RG7Ag22K-Pg",
-            "dates": [
-                "2015-05-02 19:49:05",
-                "2015-05-06 03:52:18",
-                "2015-09-26 01:13:19"
-            ]
-        },
-        {
-            "business_id": "-0y3MZU2oYP8r1ruDP1bfQ",
-            "dates": [
-                "2015-04-11 13:14:14",
-                "2015-11-21 16:05:56",
-                "2016-05-06 14:10:04",
-                "2017-08-09 15:15:10",
-                "2017-10-21 15:12:56"
-            ]
-        },
-        {
-            "business_id": "-1BPe8UjF2_l3nVk-DFUjA",
-            "dates": [
-                "2015-12-03 18:44:00",
-                "2016-03-17 18:19:21",
-                "2016-11-02 15:58:38"
-            ]
-        },
-        {
-            "business_id": "-1E2CQu_38mkghvmZgCCRw",
-            "dates": [
-                "2019-04-04 22:02:37"
-            ]
-        },
-        {
-            "business_id": "-1wzk43IZ5D9Ysu6kzb5xA",
-            "dates": [
-                "2019-02-27 14:03:08"
-            ]
-        },
-        {
-            "business_id": "-23R9P2eG7VTc6DVLjFKzA",
-            "dates": [
-                "2011-12-21 19:02:51",
-                "2012-04-15 04:21:39",
-                "2012-04-15 14:23:56",
-                "2013-06-30 22:39:51",
-                "2013-10-04 20:34:13",
-                "2014-07-16 02:28:40"
-            ]
-        },
-        {
-            "business_id": "-26MGfikhJiTfCI-GqmzhQ",
-            "dates": [
-                "2018-06-13 20:16:07"
-            ]
-        },
-        {
-            "business_id": "-2bLuJsMZ0WhI9daurVQNQ",
-            "dates": [
-                "2015-05-29 16:46:17",
-                "2015-06-01 15:03:53"
-            ]
-        },
-        {
-            "business_id": "-2hDBMaza_ldqnZdiU06LQ",
-            "dates": [
-                "2011-10-08 12:02:23",
-                "2014-08-18 02:11:11",
-                "2016-01-07 05:27:51",
-                "2016-10-21 20:15:55",
-                "2016-12-01 03:57:10",
-                "2016-12-29 01:54:42",
-                "2018-07-22 19:55:31",
-                "2018-09-07 01:42:54",
-                "2019-03-08 03:41:06"
-            ]
-        }
-    ]
-);
+LOAD DATASET YelpCheckin
+USING localfs (("path"="asterix_nc1://data/yelp-checkin/use-case-1.json"),
+                ("format"="json"));
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/array-index/select-unnest-queries/open/use-case-1/use-case-1.3.ddl.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/array-index/select-unnest-queries/open/use-case-1/use-case-1.3.ddl.sqlpp
index 0d37224..5a6513a 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/array-index/select-unnest-queries/open/use-case-1/use-case-1.3.ddl.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/array-index/select-unnest-queries/open/use-case-1/use-case-1.3.ddl.sqlpp
@@ -19,4 +19,4 @@
 
 USE TestYelp;
 
-CREATE INDEX IdxYelpCheckinDates ON YelpCheckin (UNNEST dates : string ) ;
+CREATE INDEX IdxYelpCheckinDates ON YelpCheckin (UNNEST dates : string ) EXCLUDE UNKNOWN KEY;
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/array-index/select-unnest-queries/open/use-case-2/use-case-2.2.update.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/array-index/select-unnest-queries/open/use-case-2/use-case-2.2.update.sqlpp
index 2549e8f..18135a5 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/array-index/select-unnest-queries/open/use-case-2/use-case-2.2.update.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/array-index/select-unnest-queries/open/use-case-2/use-case-2.2.update.sqlpp
@@ -19,479 +19,6 @@
 
 USE TestYelp;
 
-INSERT INTO YelpCheckin (
-    [
-        {
-            "business_id": "--1UhMGODdWsrMastO9DZw",
-            "checkin_times": {
-                "dates": [
-                    "2016-04-26",
-                    "2016-08-30",
-                    "2016-10-15",
-                    "2016-11-18",
-                    "2017-04-20",
-                    "2017-05-03",
-                    "2019-03-19"
-                ],
-                "times": [
-                    "19:49:16",
-                    "18:36:57",
-                    "02:45:18",
-                    "01:54:50",
-                    "18:39:06",
-                    "17:58:02",
-                    "22:04:48"
-                ]
-            }
-        },
-        {
-            "business_id": "--EF5N7P70J_UYBTPypYlA",
-            "checkin_times": {
-                "dates": [
-                    "2018-05-25",
-                    "2018-09-18",
-                    "2019-10-18"
-                ],
-                "times": [
-                    "19:52:07",
-                    "16:09:44",
-                    "21:29:09"
-                ]
-            }
-        },
-        {
-            "business_id": "--Ni3oJ4VOqfOEu7Sj2Vzg",
-            "checkin_times": {
-                "dates": [
-                    "2019-06-07"
-                ],
-                "times": [
-                    "17:54:58"
-                ]
-            }
-        },
-        {
-            "business_id": "--Y1Adl1YUWfYIRSd8vkmA",
-            "checkin_times": {
-                "dates": [
-                    "2011-05-03",
-                    "2011-08-23",
-                    "2014-12-04",
-                    "2016-11-16"
-                ],
-                "times": [
-                    "20:54:05",
-                    "20:49:45",
-                    "06:13:01",
-                    "19:25:55"
-                ]
-            }
-        },
-        {
-            "business_id": "--YPwqIlRJrhHkJcjY3eiA",
-            "checkin_times": {
-                "dates": [
-                    "2016-06-18",
-                    "2016-10-15"
-                ],
-                "times": [
-                    "21:35:45",
-                    "18:17:51"
-                ]
-            }
-        },
-        {
-            "business_id": "--e8PjCNhEz32pprnPhCwQ",
-            "checkin_times": {
-                "dates": [
-                    "2015-04-02"
-                ],
-                "times": [
-                    "21:45:17"
-                ]
-            }
-        },
-        {
-            "business_id": "--kinfHwmtdjz03g8B8z8Q",
-            "checkin_times": {
-                "dates": [
-                    "2014-08-27",
-                    "2015-12-19",
-                    "2018-11-27"
-                ],
-                "times": [
-                    "17:49:18",
-                    "21:30:31",
-                    "15:53:50"
-                ]
-            }
-        },
-        {
-            "business_id": "--q6datkI-f0EoVheXNEeQ",
-            "checkin_times": {
-                "dates": [
-                    "2014-01-28",
-                    "2014-11-16",
-                    "2015-11-15",
-                    "2015-11-15"
-                ],
-                "times": [
-                    "20:56:04",
-                    "16:11:58",
-                    "19:21:53",
-                    "19:33:39"
-                ]
-            }
-        },
-        {
-            "business_id": "--qvQS4MigHPykD2GV0-zw",
-            "checkin_times": {
-                "dates": [
-                    "2019-04-11"
-                ],
-                "times": [
-                    "18:30:12"
-                ]
-            }
-        },
-        {
-            "business_id": "--wIGbLEhlpl_UeAIyDmZQ",
-            "checkin_times": {
-                "dates": [
-                    "2015-06-06",
-                    "2019-03-14"
-                ],
-                "times": [
-                    "20:01:06",
-                    "22:01:52"
-                ]
-            }
-        },
-        {
-            "business_id": "-0FA-Qdi3SPYIoJz9UQw-A",
-            "checkin_times": {
-                "dates": [
-                    "2018-09-29",
-                    "2018-10-20",
-                    "2018-10-20"
-                ],
-                "times": [
-                    "18:55:17",
-                    "16:48:05",
-                    "22:20:24"
-                ]
-            }
-        },
-        {
-            "business_id": "-0Hj1hb_XW6ybWq2M7QhGA",
-            "checkin_times": {
-                "dates": [
-                    "2011-04-23",
-                    "2014-05-04",
-                    "2014-05-11",
-                    "2014-06-04",
-                    "2015-12-05",
-                    "2017-05-15"
-                ],
-                "times": [
-                    "21:11:22",
-                    "19:42:48",
-                    "19:16:08",
-                    "19:14:18",
-                    "19:22:42",
-                    "23:19:00"
-                ]
-            }
-        },
-        {
-            "business_id": "-0KMvRFwDWdVBeTpT11iHw",
-            "checkin_times": {
-                "dates": [
-                    "2012-07-13",
-                    "2016-12-24",
-                    "2017-08-31"
-                ],
-                "times": [
-                    "21:43:57",
-                    "02:27:31",
-                    "00:35:26"
-                ]
-            }
-        },
-        {
-            "business_id": "-0LPtgJC31FWMrMv317p0Q",
-            "checkin_times": {
-                "dates": [
-                    "2013-04-13",
-                    "2013-08-19",
-                    "2013-10-04"
-                ],
-                "times": [
-                    "12:35:33",
-                    "23:35:49",
-                    "19:14:56"
-                ]
-            }
-        },
-        {
-            "business_id": "-0M3o2uWBnQZwd3hmfEwuw",
-            "checkin_times": {
-                "dates": [
-                    "2016-09-10",
-                    "2018-09-08",
-                    "2019-09-13"
-                ],
-                "times": [
-                    "19:26:19",
-                    "14:15:37",
-                    "22:47:25"
-                ]
-            }
-        },
-        {
-            "business_id": "-0RRiWDtfnS16AKCtfvBZg",
-            "checkin_times": {
-                "dates": [
-                    "2017-05-19",
-                    "2017-05-19",
-                    "2017-08-28",
-                    "2017-09-20",
-                    "2017-10-01",
-                    "2017-10-01",
-                    "2017-12-27"
-                ],
-                "times": [
-                    "14:30:16",
-                    "14:30:25",
-                    "15:49:37",
-                    "20:19:51",
-                    "16:31:05",
-                    "16:56:27",
-                    "23:33:20"
-                ]
-            }
-        },
-        {
-            "business_id": "-0Soj75v-XoRcf2ERr8Bmg",
-            "checkin_times": {
-                "dates": [
-                    "2019-06-05"
-                ],
-                "times": [
-                    "18:22:49"
-                ]
-            }
-        },
-        {
-            "business_id": "-0ZumLlFjMh4ZW1z2nXGug",
-            "checkin_times": {
-                "dates": [
-                    "2011-09-24",
-                    "2014-03-10",
-                    "2015-05-27",
-                    "2015-08-29",
-                    "2018-03-16"
-                ],
-                "times": [
-                    "21:37:32",
-                    "20:20:07",
-                    "00:40:24",
-                    "17:58:15",
-                    "15:03:26"
-                ]
-            }
-        },
-        {
-            "business_id": "-0aOudcaAyac0VJbMX-L1g",
-            "checkin_times": {
-                "dates": [
-                    "2015-03-16",
-                    "2015-12-21",
-                    "2016-10-28",
-                    "2016-10-28"
-                ],
-                "times": [
-                    "23:51:16",
-                    "04:48:01",
-                    "20:22:42",
-                    "20:23:00"
-                ]
-            }
-        },
-        {
-            "business_id": "-0b86isaXMY0v4g-V8GZ9Q",
-            "checkin_times": {
-                "dates": [
-                    "2013-10-22",
-                    "2014-11-21"
-                ],
-                "times": [
-                    "16:49:21",
-                    "17:39:24"
-                ]
-            }
-        },
-        {
-            "business_id": "-0d-BfFSU0bwLcnMaGRxYw",
-            "checkin_times": {
-                "dates": [
-                    "2014-08-07",
-                    "2014-09-16",
-                    "2014-10-12",
-                    "2015-07-21",
-                    "2015-07-21"
-                ],
-                "times": [
-                    "18:30:48",
-                    "20:41:45",
-                    "23:22:27",
-                    "20:43:56",
-                    "20:45:07"
-                ]
-            }
-        },
-        {
-            "business_id": "-0jz6c3C6i7RG7Ag22K-Pg",
-            "checkin_times": {
-                "dates": [
-                    "2015-05-02",
-                    "2015-05-06",
-                    "2015-09-26"
-                ],
-                "times": [
-                    "19:49:05",
-                    "03:52:18",
-                    "01:13:19"
-                ]
-            }
-        },
-        {
-            "business_id": "-0y3MZU2oYP8r1ruDP1bfQ",
-            "checkin_times": {
-                "dates": [
-                    "2015-04-11",
-                    "2015-11-21",
-                    "2016-05-06",
-                    "2017-08-09",
-                    "2017-10-21"
-                ],
-                "times": [
-                    "13:14:14",
-                    "16:05:56",
-                    "14:10:04",
-                    "15:15:10",
-                    "15:12:56"
-                ]
-            }
-        },
-        {
-            "business_id": "-1BPe8UjF2_l3nVk-DFUjA",
-            "checkin_times": {
-                "dates": [
-                    "2015-12-03",
-                    "2016-03-17",
-                    "2016-11-02"
-                ],
-                "times": [
-                    "18:44:00",
-                    "18:19:21",
-                    "15:58:38"
-                ]
-            }
-        },
-        {
-            "business_id": "-1E2CQu_38mkghvmZgCCRw",
-            "checkin_times": {
-                "dates": [
-                    "2019-04-04"
-                ],
-                "times": [
-                    "22:02:37"
-                ]
-            }
-        },
-        {
-            "business_id": "-1wzk43IZ5D9Ysu6kzb5xA",
-            "checkin_times": {
-                "dates": [
-                    "2019-02-27"
-                ],
-                "times": [
-                    "14:03:08"
-                ]
-            }
-        },
-        {
-            "business_id": "-23R9P2eG7VTc6DVLjFKzA",
-            "checkin_times": {
-                "dates": [
-                    "2011-12-21",
-                    "2012-04-15",
-                    "2012-04-15",
-                    "2013-06-30",
-                    "2013-10-04",
-                    "2014-07-16"
-                ],
-                "times": [
-                    "19:02:51",
-                    "04:21:39",
-                    "14:23:56",
-                    "22:39:51",
-                    "20:34:13",
-                    "02:28:40"
-                ]
-            }
-        },
-        {
-            "business_id": "-26MGfikhJiTfCI-GqmzhQ",
-            "checkin_times": {
-                "dates": [
-                    "2018-06-13"
-                ],
-                "times": [
-                    "20:16:07"
-                ]
-            }
-        },
-        {
-            "business_id": "-2bLuJsMZ0WhI9daurVQNQ",
-            "checkin_times": {
-                "dates": [
-                    "2015-05-29",
-                    "2015-06-01"
-                ],
-                "times": [
-                    "16:46:17",
-                    "15:03:53"
-                ]
-            }
-        },
-        {
-            "business_id": "-2hDBMaza_ldqnZdiU06LQ",
-            "checkin_times": {
-                "dates": [
-                    "2011-10-08",
-                    "2014-08-18",
-                    "2016-01-07",
-                    "2016-10-21",
-                    "2016-12-01",
-                    "2016-12-29",
-                    "2018-07-22",
-                    "2018-09-07",
-                    "2019-03-08"
-                ],
-                "times": [
-                    "12:02:23",
-                    "02:11:11",
-                    "05:27:51",
-                    "20:15:55",
-                    "03:57:10",
-                    "01:54:42",
-                    "19:55:31",
-                    "01:42:54",
-                    "03:41:06"
-                ]
-            }
-        }
-    ]
-);
+LOAD DATASET YelpCheckin
+USING localfs (("path"="asterix_nc1://data/yelp-checkin/use-case-2.json"),
+                ("format"="json"));
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/array-index/select-unnest-queries/open/use-case-2/use-case-2.3.ddl.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/array-index/select-unnest-queries/open/use-case-2/use-case-2.3.ddl.sqlpp
index abacfe8..be8f99d 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/array-index/select-unnest-queries/open/use-case-2/use-case-2.3.ddl.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/array-index/select-unnest-queries/open/use-case-2/use-case-2.3.ddl.sqlpp
@@ -19,4 +19,4 @@
 
 USE TestYelp;
 
-CREATE INDEX IdxYelpCheckinDates ON YelpCheckin (UNNEST checkin_times.dates : string ) ;
+CREATE INDEX IdxYelpCheckinDates ON YelpCheckin (UNNEST checkin_times.dates : string ) EXCLUDE UNKNOWN KEY;
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/array-index/select-unnest-queries/open/use-case-3/use-case-3.2.update.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/array-index/select-unnest-queries/open/use-case-3/use-case-3.2.update.sqlpp
index 02ddf21..f05a19b 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/array-index/select-unnest-queries/open/use-case-3/use-case-3.2.update.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/array-index/select-unnest-queries/open/use-case-3/use-case-3.2.update.sqlpp
@@ -19,258 +19,6 @@
 
 USE TestYelp;
 
-INSERT INTO YelpCheckin (
-    [
-        {
-            "business_id": "--1UhMGODdWsrMastO9DZw",
-            "checkin_times": [ 
-                {"date": "2016-04-26", "time": "19:49:16"},
-                {"date": "2016-08-30", "time": "18:36:57"},
-                {"date": "2016-10-15", "time": "02:45:18"},
-                {"date": "2016-11-18", "time": "01:54:50"},
-                {"date": "2017-04-20", "time": "18:39:06"},
-                {"date": "2017-05-03", "time": "17:58:02"},
-                {"date": "2019-03-19", "time": "22:04:48"}
-             ]
-        },
-        {
-            "business_id": "--EF5N7P70J_UYBTPypYlA",
-            "checkin_times": [ 
-                {"date": "2018-05-25", "time": "19:52:07"},
-                {"date": "2018-09-18", "time": "16:09:44"},
-                {"date": "2019-10-18", "time": "21:29:09"}
-             ]
-        },
-        {
-            "business_id": "--Ni3oJ4VOqfOEu7Sj2Vzg",
-            "checkin_times": [ 
-                {"date": "2019-06-07", "time": "17:54:58"}
-             ]
-        },
-        {
-            "business_id": "--Y1Adl1YUWfYIRSd8vkmA",
-            "checkin_times": [ 
-                {"date": "2011-05-03", "time": "20:54:05"},
-                {"date": "2011-08-23", "time": "20:49:45"},
-                {"date": "2014-12-04", "time": "06:13:01"},
-                {"date": "2016-11-16", "time": "19:25:55"}
-             ]
-        },
-        {
-            "business_id": "--YPwqIlRJrhHkJcjY3eiA",
-            "checkin_times": [ 
-                {"date": "2016-06-18", "time": "21:35:45"},
-                {"date": "2016-10-15", "time": "18:17:51"}
-             ]
-        },
-        {
-            "business_id": "--e8PjCNhEz32pprnPhCwQ",
-            "checkin_times": [ 
-                {"date": "2015-04-02", "time": "21:45:17"}
-             ]
-        },
-        {
-            "business_id": "--kinfHwmtdjz03g8B8z8Q",
-            "checkin_times": [ 
-                {"date": "2014-08-27", "time": "17:49:18"},
-                {"date": "2015-12-19", "time": "21:30:31"},
-                {"date": "2018-11-27", "time": "15:53:50"}
-             ]
-        },
-        {
-            "business_id": "--q6datkI-f0EoVheXNEeQ",
-            "checkin_times": [ 
-                {"date": "2014-01-28", "time": "20:56:04"},
-                {"date": "2014-11-16", "time": "16:11:58"},
-                {"date": "2015-11-15", "time": "19:21:53"},
-                {"date": "2015-11-15", "time": "19:33:39"}
-             ]
-        },
-        {
-            "business_id": "--qvQS4MigHPykD2GV0-zw",
-            "checkin_times": [ 
-                {"date": "2019-04-11", "time": "18:30:12"}
-             ]
-        },
-        {
-            "business_id": "--wIGbLEhlpl_UeAIyDmZQ",
-            "checkin_times": [ 
-                {"date": "2015-06-06", "time": "20:01:06"},
-                {"date": "2019-03-14", "time": "22:01:52"}
-             ]
-        },
-        {
-            "business_id": "-0FA-Qdi3SPYIoJz9UQw-A",
-            "checkin_times": [ 
-                {"date": "2018-09-29", "time": "18:55:17"},
-                {"date": "2018-10-20", "time": "16:48:05"},
-                {"date": "2018-10-20", "time": "22:20:24"}
-             ]
-        },
-        {
-            "business_id": "-0Hj1hb_XW6ybWq2M7QhGA",
-            "checkin_times": [ 
-                {"date": "2011-04-23", "time": "21:11:22"},
-                {"date": "2014-05-04", "time": "19:42:48"},
-                {"date": "2014-05-11", "time": "19:16:08"},
-                {"date": "2014-06-04", "time": "19:14:18"},
-                {"date": "2015-12-05", "time": "19:22:42"},
-                {"date": "2017-05-15", "time": "23:19:00"}
-             ]
-        },
-        {
-            "business_id": "-0KMvRFwDWdVBeTpT11iHw",
-            "checkin_times": [ 
-                {"date": "2012-07-13", "time": "21:43:57"},
-                {"date": "2016-12-24", "time": "02:27:31"},
-                {"date": "2017-08-31", "time": "00:35:26"}
-             ]
-        },
-        {
-            "business_id": "-0LPtgJC31FWMrMv317p0Q",
-            "checkin_times": [ 
-                {"date": "2013-04-13", "time": "12:35:33"},
-                {"date": "2013-08-19", "time": "23:35:49"},
-                {"date": "2013-10-04", "time": "19:14:56"}
-             ]
-        },
-        {
-            "business_id": "-0M3o2uWBnQZwd3hmfEwuw",
-            "checkin_times": [ 
-                {"date": "2016-09-10", "time": "19:26:19"},
-                {"date": "2018-09-08", "time": "14:15:37"},
-                {"date": "2019-09-13", "time": "22:47:25"}
-             ]
-        },
-        {
-            "business_id": "-0RRiWDtfnS16AKCtfvBZg",
-            "checkin_times": [ 
-                {"date": "2017-05-19", "time": "14:30:16"},
-                {"date": "2017-05-19", "time": "14:30:25"},
-                {"date": "2017-08-28", "time": "15:49:37"},
-                {"date": "2017-09-20", "time": "20:19:51"},
-                {"date": "2017-10-01", "time": "16:31:05"},
-                {"date": "2017-10-01", "time": "16:56:27"},
-                {"date": "2017-12-27", "time": "23:33:20"}
-             ]
-        },
-        {
-            "business_id": "-0Soj75v-XoRcf2ERr8Bmg",
-            "checkin_times": [ 
-                {"date": "2019-06-05", "time": "18:22:49"}
-             ]
-        },
-        {
-            "business_id": "-0ZumLlFjMh4ZW1z2nXGug",
-            "checkin_times": [ 
-                {"date": "2011-09-24", "time": "21:37:32"},
-                {"date": "2014-03-10", "time": "20:20:07"},
-                {"date": "2015-05-27", "time": "00:40:24"},
-                {"date": "2015-08-29", "time": "17:58:15"},
-                {"date": "2018-03-16", "time": "15:03:26"}
-             ]
-        },
-        {
-            "business_id": "-0aOudcaAyac0VJbMX-L1g",
-            "checkin_times": [ 
-                {"date": "2015-03-16", "time": "23:51:16"},
-                {"date": "2015-12-21", "time": "04:48:01"},
-                {"date": "2016-10-28", "time": "20:22:42"},
-                {"date": "2016-10-28", "time": "20:23:00"}
-             ]
-        },
-        {
-            "business_id": "-0b86isaXMY0v4g-V8GZ9Q",
-            "checkin_times": [ 
-                {"date": "2013-10-22", "time": "16:49:21"},
-                {"date": "2014-11-21", "time": "17:39:24"}
-             ]
-        },
-        {
-            "business_id": "-0d-BfFSU0bwLcnMaGRxYw",
-            "checkin_times": [ 
-                {"date": "2014-08-07", "time": "18:30:48"},
-                {"date": "2014-09-16", "time": "20:41:45"},
-                {"date": "2014-10-12", "time": "23:22:27"},
-                {"date": "2015-07-21", "time": "20:43:56"},
-                {"date": "2015-07-21", "time": "20:45:07"}
-             ]
-        },
-        {
-            "business_id": "-0jz6c3C6i7RG7Ag22K-Pg",
-            "checkin_times": [ 
-                {"date": "2015-05-02", "time": "19:49:05"},
-                {"date": "2015-05-06", "time": "03:52:18"},
-                {"date": "2015-09-26", "time": "01:13:19"}
-             ]
-        },
-        {
-            "business_id": "-0y3MZU2oYP8r1ruDP1bfQ",
-            "checkin_times": [ 
-                {"date": "2015-04-11", "time": "13:14:14"},
-                {"date": "2015-11-21", "time": "16:05:56"},
-                {"date": "2016-05-06", "time": "14:10:04"},
-                {"date": "2017-08-09", "time": "15:15:10"},
-                {"date": "2017-10-21", "time": "15:12:56"}
-             ]
-        },
-        {
-            "business_id": "-1BPe8UjF2_l3nVk-DFUjA",
-            "checkin_times": [ 
-                {"date": "2015-12-03", "time": "18:44:00"},
-                {"date": "2016-03-17", "time": "18:19:21"},
-                {"date": "2016-11-02", "time": "15:58:38"}
-             ]
-        },
-        {
-            "business_id": "-1E2CQu_38mkghvmZgCCRw",
-            "checkin_times": [ 
-                {"date": "2019-04-04", "time": "22:02:37"}
-             ]
-        },
-        {
-            "business_id": "-1wzk43IZ5D9Ysu6kzb5xA",
-            "checkin_times": [ 
-                {"date": "2019-02-27", "time": "14:03:08"}
-             ]
-        },
-        {
-            "business_id": "-23R9P2eG7VTc6DVLjFKzA",
-            "checkin_times": [ 
-                {"date": "2011-12-21", "time": "19:02:51"},
-                {"date": "2012-04-15", "time": "04:21:39"},
-                {"date": "2012-04-15", "time": "14:23:56"},
-                {"date": "2013-06-30", "time": "22:39:51"},
-                {"date": "2013-10-04", "time": "20:34:13"},
-                {"date": "2014-07-16", "time": "02:28:40"}
-             ]
-        },
-        {
-            "business_id": "-26MGfikhJiTfCI-GqmzhQ",
-            "checkin_times": [ 
-                {"date": "2018-06-13", "time": "20:16:07"}
-             ]
-        },
-        {
-            "business_id": "-2bLuJsMZ0WhI9daurVQNQ",
-            "checkin_times": [ 
-                {"date": "2015-05-29", "time": "16:46:17"},
-                {"date": "2015-06-01", "time": "15:03:53"}
-             ]
-        },
-        {
-            "business_id": "-2hDBMaza_ldqnZdiU06LQ",
-            "checkin_times": [ 
-                {"date": "2011-10-08", "time": "12:02:23"},
-                {"date": "2014-08-18", "time": "02:11:11"},
-                {"date": "2016-01-07", "time": "05:27:51"},
-                {"date": "2016-10-21", "time": "20:15:55"},
-                {"date": "2016-12-01", "time": "03:57:10"},
-                {"date": "2016-12-29", "time": "01:54:42"},
-                {"date": "2018-07-22", "time": "19:55:31"},
-                {"date": "2018-09-07", "time": "01:42:54"},
-                {"date": "2019-03-08", "time": "03:41:06"}
-             ]
-        }
-    ]
-);
+LOAD DATASET YelpCheckin
+USING localfs (("path"="asterix_nc1://data/yelp-checkin/use-case-3.json"),
+                ("format"="json"));
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/array-index/select-unnest-queries/open/use-case-3/use-case-3.3.ddl.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/array-index/select-unnest-queries/open/use-case-3/use-case-3.3.ddl.sqlpp
index 9594cf9..4c7e924 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/array-index/select-unnest-queries/open/use-case-3/use-case-3.3.ddl.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/array-index/select-unnest-queries/open/use-case-3/use-case-3.3.ddl.sqlpp
@@ -19,4 +19,4 @@
 
 USE TestYelp;
 
-CREATE INDEX IdxYelpCheckinDates ON YelpCheckin (UNNEST checkin_times SELECT date : string ) ;
+CREATE INDEX IdxYelpCheckinDates ON YelpCheckin (UNNEST checkin_times SELECT date : string ) EXCLUDE UNKNOWN KEY;
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/array-index/select-unnest-queries/open/use-case-4/use-case-4.2.update.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/array-index/select-unnest-queries/open/use-case-4/use-case-4.2.update.sqlpp
index 7fcf9e4..197d417 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/array-index/select-unnest-queries/open/use-case-4/use-case-4.2.update.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/array-index/select-unnest-queries/open/use-case-4/use-case-4.2.update.sqlpp
@@ -19,407 +19,6 @@
 
 USE TestYelp;
 
-INSERT INTO YelpCheckin (
-    [
-        {
-            "business_id": "--1UhMGODdWsrMastO9DZw",
-            "checkin_times": [ 
-                {
-                    "dates": ["2016-04-26", "2016-08-30", "2016-10-15", "2016-11-18"],
-                    "times": ["19:49:16", "18:36:57", "02:45:18", "01:54:50"]
-                },
-                {
-                    "dates": ["2017-04-20", "2017-05-03"],
-                    "times": ["18:39:06", "17:58:02"]
-                },
-                {
-                    "dates": ["2019-03-19"],
-                    "times": ["22:04:48"]
-                }
-             ]
-        },
-        {
-            "business_id": "--EF5N7P70J_UYBTPypYlA",
-            "checkin_times": [ 
-                {
-                    "dates": ["2018-05-25", "2018-09-18"],
-                    "times": ["19:52:07", "16:09:44"]
-                },
-                {
-                    "dates": ["2019-10-18"],
-                    "times": ["21:29:09"]
-                }
-             ]
-        },
-        {
-            "business_id": "--Ni3oJ4VOqfOEu7Sj2Vzg",
-            "checkin_times": [ 
-                {
-                    "dates": ["2019-06-07"],
-                    "times": ["17:54:58"]
-                }
-             ]
-        },
-        {
-            "business_id": "--Y1Adl1YUWfYIRSd8vkmA",
-            "checkin_times": [ 
-                {
-                    "dates": ["2011-05-03", "2011-08-23"],
-                    "times": ["20:54:05", "20:49:45"]
-                },
-                {
-                    "dates": ["2014-12-04"],
-                    "times": ["06:13:01"]
-                },
-                {
-                    "dates": ["2016-11-16"],
-                    "times": ["19:25:55"]
-                }
-             ]
-        },
-        {
-            "business_id": "--YPwqIlRJrhHkJcjY3eiA",
-            "checkin_times": [ 
-               {
-                    "dates": ["2016-06-18", "2016-10-15"],
-                    "times": ["21:35:45", "18:17:51"]
-                }
-             ]
-        },
-        {
-            "business_id": "--e8PjCNhEz32pprnPhCwQ",
-            "checkin_times": [ 
-                {
-                    "dates": ["2015-04-02"],
-                    "times": ["21:45:17"]
-                }
-             ]
-        },
-        {
-            "business_id": "--kinfHwmtdjz03g8B8z8Q",
-            "checkin_times": [ 
-                {
-                    "dates": ["2014-08-27"],
-                    "times": ["17:49:18"]
-                },
-                {
-                    "dates": ["2015-12-19"],
-                    "times": ["21:30:31"]
-                },
-                {
-                    "dates": ["2018-11-27"],
-                    "times": ["15:53:50"]
-                }
-             ]
-        },
-        {
-            "business_id": "--q6datkI-f0EoVheXNEeQ",
-            "checkin_times": [ 
-                {
-                    "dates": ["2014-01-28", "2014-11-16"],
-                    "times": ["20:56:04", "16:11:58"]
-                },
-                {
-                    "dates": ["2015-11-15", "2015-11-15"],
-                    "times": ["19:21:53", "19:33:39"]
-                }
-             ]
-        },
-        {
-            "business_id": "--qvQS4MigHPykD2GV0-zw",
-            "checkin_times": [ 
-                {
-                    "dates": ["2019-04-11"],
-                    "times": ["18:30:12"]
-                }
-             ]
-        },
-        {
-            "business_id": "--wIGbLEhlpl_UeAIyDmZQ",
-            "checkin_times": [ 
-                {
-                    "dates": ["2015-06-06"],
-                    "times": ["20:01:06"]
-                },
-                {
-                    "dates": ["2019-03-14"],
-                    "times": ["22:01:52"]
-                }
-             ]
-        },
-        {
-            "business_id": "-0FA-Qdi3SPYIoJz9UQw-A",
-            "checkin_times": [ 
-                {
-                    "dates": ["2018-09-29", "2018-10-20", "2018-10-20"],
-                    "times": ["18:55:17", "16:48:05", "22:20:24"]
-                }
-             ]
-        },
-        {
-            "business_id": "-0Hj1hb_XW6ybWq2M7QhGA",
-            "checkin_times": [ 
-                {
-                    "dates": ["2011-04-23"],
-                    "times": ["21:11:22"]
-                },
-                {
-                    "dates": ["2014-05-04", "2014-05-11", "2014-06-04"],
-                    "times": ["19:42:48", "19:16:08", "19:14:18"]
-                },
-                {
-                    "dates": ["2015-12-05"],
-                    "times": ["19:22:42"]
-                },
-                {
-                    "dates": ["2017-05-15"],
-                    "times": ["23:19:00"]
-                }
-             ]
-        },
-        {
-            "business_id": "-0KMvRFwDWdVBeTpT11iHw",
-            "checkin_times": [ 
-                {
-                    "dates": ["2012-07-13"],
-                    "times": ["21:43:57"]
-                },
-                {
-                    "dates": ["2016-12-24"],
-                    "times": ["02:27:31"]
-                },
-                {
-                    "dates": ["2017-08-31"],
-                    "times": ["00:35:26"]
-                }
-             ]
-        },
-        {
-            "business_id": "-0LPtgJC31FWMrMv317p0Q",
-            "checkin_times": [ 
-                {
-                    "dates": ["2013-04-13", "2013-08-19", "2013-10-04"],
-                    "times": ["12:35:33", "23:35:49", "19:14:56"]
-                }
-
-             ]
-        },
-        {
-            "business_id": "-0M3o2uWBnQZwd3hmfEwuw",
-            "checkin_times": [ 
-                {
-                    "dates": ["2016-09-10"],
-                    "times": ["19:26:19"]
-                },
-                {
-                    "dates": ["2018-09-08"],
-                    "times": ["14:15:37"]
-                },
-                {
-                    "dates": ["2019-09-13"],
-                    "times": ["22:47:25"]
-                }
-             ]
-        },
-        {
-            "business_id": "-0RRiWDtfnS16AKCtfvBZg",
-            "checkin_times": [ 
-                 {
-                    "dates": ["2017-05-19", "2017-05-19", "2017-08-28", "2017-09-20", "2017-10-01", "2017-10-01", "2017-12-27"],
-                    "times": ["14:30:16", "14:30:25", "15:49:37", "20:19:51", "16:31:05", "16:56:27", "23:33:20"]
-                }
-             ]
-        },
-        {
-            "business_id": "-0Soj75v-XoRcf2ERr8Bmg",
-            "checkin_times": [ 
-                {
-                    "dates": ["2019-06-05"],
-                    "times": ["18:22:49"]
-                }
-             ]
-        },
-        {
-            "business_id": "-0ZumLlFjMh4ZW1z2nXGug",
-            "checkin_times": [ 
-                {
-                    "dates": ["2011-09-24"],
-                    "times": ["21:37:32"]
-                },
-                {
-                    "dates": ["2014-03-10"],
-                    "times": ["20:20:07"]
-                },
-                {
-                    "dates": ["2015-05-27", "2015-08-29"],
-                    "times": ["00:40:24", "17:58:15"]
-                },
-                {
-                    "dates": ["2018-03-16"],
-                    "times": ["15:03:26"]
-                }
-             ]
-        },
-        {
-            "business_id": "-0aOudcaAyac0VJbMX-L1g",
-            "checkin_times": [ 
-                {
-                    "dates": ["2015-03-16", "2015-12-21"],
-                    "times": ["23:51:16", "04:48:01"]
-                },
-                {
-                    "dates": ["2016-10-28", "2016-10-28"],
-                    "times": ["20:22:42", "20:23:00"]
-                }
-             ]
-        },
-        {
-            "business_id": "-0b86isaXMY0v4g-V8GZ9Q",
-            "checkin_times": [ 
-                {
-                    "dates": ["2013-10-22"],
-                    "times": ["16:49:21"]
-                },
-                {
-                    "dates": ["2014-11-21"],
-                    "times": ["17:39:24"]
-                }
-             ]
-        },
-        {
-            "business_id": "-0d-BfFSU0bwLcnMaGRxYw",
-            "checkin_times": [ 
-                {
-                    "dates": ["2014-08-07", "2014-09-16", "2014-10-12"],
-                    "times": ["18:30:48", "20:41:45", "23:22:27"]
-                },
-                {
-                    "dates": ["2015-07-21", "2015-07-21"],
-                    "times": ["20:43:56", "20:45:07"]
-                }
-             ]
-        },
-        {
-            "business_id": "-0jz6c3C6i7RG7Ag22K-Pg",
-            "checkin_times": [ 
-                {
-                    "dates": ["2015-05-02", "2015-05-06", "2015-09-26"],
-                    "times": ["19:49:05", "03:52:18", "01:13:19"]
-                }
-
-             ]
-        },
-        {
-            "business_id": "-0y3MZU2oYP8r1ruDP1bfQ",
-            "checkin_times": [ 
-                {
-                    "dates": ["2015-04-11", "2015-11-21"],
-                    "times": ["13:14:14", "16:05:56"]
-                },
-                {
-                    "dates": ["2016-05-06"],
-                    "times": ["14:10:04"]
-                },
-                {
-                    "dates": ["2017-08-09", "2017-10-21"],
-                    "times": ["15:15:10", "15:12:56"]
-                }
-             ]
-        },
-        {
-            "business_id": "-1BPe8UjF2_l3nVk-DFUjA",
-            "checkin_times": [ 
-                {
-                    "dates": ["2015-12-03"],
-                    "times": ["18:44:00"]
-                },
-                {
-                    "dates": ["2016-03-17", "2016-11-02"],
-                    "times": ["18:19:21", "15:58:38"]
-                }
-             ]
-        },
-        {
-            "business_id": "-1E2CQu_38mkghvmZgCCRw",
-            "checkin_times": [ 
-                {
-                    "dates": ["2019-04-04"],
-                    "times": ["22:02:37"]
-                }
-             ]
-        },
-        {
-            "business_id": "-1wzk43IZ5D9Ysu6kzb5xA",
-            "checkin_times": [ 
-                {
-                    "dates": ["2019-02-27"],
-                    "times": ["14:03:08"]
-                }
-             ]
-        },
-        {
-            "business_id": "-23R9P2eG7VTc6DVLjFKzA",
-            "checkin_times": [ 
-                {
-                    "dates": ["2011-12-21"],
-                    "times": ["19:02:51"]
-                },
-                {
-                    "dates": ["2012-04-15", "2012-04-15"],
-                    "times": ["04:21:39", "14:23:56"]
-                },
-                {
-                    "dates": ["2013-06-30", "2013-10-04"],
-                    "times": ["22:39:51", "20:34:13"]
-                },
-                {
-                    "dates": ["2014-07-16"],
-                    "times": ["02:28:40"]
-                }
-             ]
-        },
-        {
-            "business_id": "-26MGfikhJiTfCI-GqmzhQ",
-            "checkin_times": [ 
-                {
-                    "dates": ["2018-06-13"],
-                    "times": ["20:16:07"]
-                }
-             ]
-        },
-        {
-            "business_id": "-2bLuJsMZ0WhI9daurVQNQ",
-            "checkin_times": [ 
-                {
-                    "dates": ["2015-05-29", "2015-06-01"],
-                    "times": ["16:46:17", "15:03:53"]
-                }
-             ]
-        },
-        {
-            "business_id": "-2hDBMaza_ldqnZdiU06LQ",
-            "checkin_times": [ 
-                {
-                    "dates": ["2011-10-08"],
-                    "times": ["12:02:23"]
-                },
-                {
-                    "dates": ["2014-08-18"],
-                    "times": ["02:11:11"]
-                },
-                {
-                    "dates": ["2016-01-07", "2016-10-21", "2016-12-01", "2016-12-29"],
-                    "times": ["05:27:51", "20:15:55", "03:57:10", "01:54:42"]
-                },
-                {
-                    "dates": ["2018-07-22", "2018-09-07"],
-                    "times": ["19:55:31", "01:42:54"]
-                },
-                {
-                    "dates": ["2019-03-08"],
-                    "times": ["03:41:06"]
-                }
-             ]
-        }
-    ]
-);
+LOAD DATASET YelpCheckin
+USING localfs (("path"="asterix_nc1://data/yelp-checkin/use-case-4.json"),
+                ("format"="json"));
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/array-index/select-unnest-queries/open/use-case-4/use-case-4.3.ddl.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/array-index/select-unnest-queries/open/use-case-4/use-case-4.3.ddl.sqlpp
index c590ecb..176da7e 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/array-index/select-unnest-queries/open/use-case-4/use-case-4.3.ddl.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/array-index/select-unnest-queries/open/use-case-4/use-case-4.3.ddl.sqlpp
@@ -19,4 +19,4 @@
 
 USE TestYelp;
 
-CREATE INDEX IdxYelpCheckinDates ON YelpCheckin (UNNEST checkin_times UNNEST dates : string ) ;
+CREATE INDEX IdxYelpCheckinDates ON YelpCheckin (UNNEST checkin_times UNNEST dates : string ) EXCLUDE UNKNOWN KEY;
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/array-index/select-unnest-queries/open/using-feed-new-index/using-feed-new-index.3.ddl.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/array-index/select-unnest-queries/open/using-feed-new-index/using-feed-new-index.3.ddl.sqlpp
index 4a74895..630b71e 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/array-index/select-unnest-queries/open/using-feed-new-index/using-feed-new-index.3.ddl.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/array-index/select-unnest-queries/open/using-feed-new-index/using-feed-new-index.3.ddl.sqlpp
@@ -20,4 +20,5 @@
 USE TestYelp;
 
 CREATE INDEX checkinDatesIdx
-ON YelpCheckin ( UNNEST dates : string );
\ No newline at end of file
+ON YelpCheckin ( UNNEST dates : string )
+EXCLUDE UNKNOWN KEY;
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/array-index/select-unnest-queries/open/using-feed-old-index/using-feed-old-index.1.ddl.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/array-index/select-unnest-queries/open/using-feed-old-index/using-feed-old-index.1.ddl.sqlpp
index a19d87d..e1e82a7 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/array-index/select-unnest-queries/open/using-feed-old-index/using-feed-old-index.1.ddl.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/array-index/select-unnest-queries/open/using-feed-old-index/using-feed-old-index.1.ddl.sqlpp
@@ -39,7 +39,8 @@
 PRIMARY KEY business_id;
 
 CREATE INDEX checkinDatesIdx
-ON YelpCheckin ( UNNEST dates : string );
+ON YelpCheckin ( UNNEST dates : string )
+EXCLUDE UNKNOWN KEY;
 
 CREATE FEED YelpCheckinStream WITH {
  "adapter-name" : "localfs",
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/array-index/select-unnest-queries/open/with-3-level-record-path/with-3-level-record-path.2.update.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/array-index/select-unnest-queries/open/with-3-level-record-path/with-3-level-record-path.2.update.sqlpp
index 884c224..8c7303c 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/array-index/select-unnest-queries/open/with-3-level-record-path/with-3-level-record-path.2.update.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/array-index/select-unnest-queries/open/with-3-level-record-path/with-3-level-record-path.2.update.sqlpp
@@ -19,599 +19,6 @@
 
 USE TestYelp;
 
-INSERT INTO YelpCheckin (
-    [
-        {
-            "business_id": "--1UhMGODdWsrMastO9DZw",
-            "checkin_data": {
-                "checkin_temporal": {
-                    "checkin_times": {
-                        "dates": [
-                            "2016-04-26",
-                            "2016-08-30",
-                            "2016-10-15",
-                            "2016-11-18",
-                            "2017-04-20",
-                            "2017-05-03",
-                            "2019-03-19"
-                        ],
-                        "times": [
-                            "19:49:16",
-                            "18:36:57",
-                            "02:45:18",
-                            "01:54:50",
-                            "18:39:06",
-                            "17:58:02",
-                            "22:04:48"
-                        ]
-                    }
-                }
-            }
-        },
-        {
-            "business_id": "--EF5N7P70J_UYBTPypYlA",
-            "checkin_data": {
-                "checkin_temporal": {
-                    "checkin_times": {
-                        "dates": [
-                            "2018-05-25",
-                            "2018-09-18",
-                            "2019-10-18"
-                        ],
-                        "times": [
-                            "19:52:07",
-                            "16:09:44",
-                            "21:29:09"
-                        ]
-                    }
-                }
-            }
-        },
-        {
-            "business_id": "--Ni3oJ4VOqfOEu7Sj2Vzg",
-            "checkin_data": {
-                "checkin_temporal": {
-                    "checkin_times": {
-                        "dates": [
-                            "2019-06-07"
-                        ],
-                        "times": [
-                            "17:54:58"
-                        ]
-                    }
-                }
-            }
-        },
-        {
-            "business_id": "--Y1Adl1YUWfYIRSd8vkmA",
-            "checkin_data": {
-                "checkin_temporal": {
-                    "checkin_times": {
-                        "dates": [
-                            "2011-05-03",
-                            "2011-08-23",
-                            "2014-12-04",
-                            "2016-11-16"
-                        ],
-                        "times": [
-                            "20:54:05",
-                            "20:49:45",
-                            "06:13:01",
-                            "19:25:55"
-                        ]
-                    }
-                }
-            }
-        },
-        {
-            "business_id": "--YPwqIlRJrhHkJcjY3eiA",
-            "checkin_data": {
-                "checkin_temporal": {
-                    "checkin_times": {
-                        "dates": [
-                            "2016-06-18",
-                            "2016-10-15"
-                        ],
-                        "times": [
-                            "21:35:45",
-                            "18:17:51"
-                        ]
-                    }
-                }
-            }
-        },
-        {
-            "business_id": "--e8PjCNhEz32pprnPhCwQ",
-            "checkin_data": {
-                "checkin_temporal": {
-                    "checkin_times": {
-                        "dates": [
-                            "2015-04-02"
-                        ],
-                        "times": [
-                            "21:45:17"
-                        ]
-                    }
-                }
-            }
-        },
-        {
-            "business_id": "--kinfHwmtdjz03g8B8z8Q",
-            "checkin_data": {
-                "checkin_temporal": {
-                    "checkin_times": {
-                        "dates": [
-                            "2014-08-27",
-                            "2015-12-19",
-                            "2018-11-27"
-                        ],
-                        "times": [
-                            "17:49:18",
-                            "21:30:31",
-                            "15:53:50"
-                        ]
-                    }
-                }
-            }
-        },
-        {
-            "business_id": "--q6datkI-f0EoVheXNEeQ",
-            "checkin_data": {
-                "checkin_temporal": {
-                    "checkin_times": {
-                        "dates": [
-                            "2014-01-28",
-                            "2014-11-16",
-                            "2015-11-15",
-                            "2015-11-15"
-                        ],
-                        "times": [
-                            "20:56:04",
-                            "16:11:58",
-                            "19:21:53",
-                            "19:33:39"
-                        ]
-                    }
-                }
-            }
-        },
-        {
-            "business_id": "--qvQS4MigHPykD2GV0-zw",
-            "checkin_data": {
-                "checkin_temporal": {
-                    "checkin_times": {
-                        "dates": [
-                            "2019-04-11"
-                        ],
-                        "times": [
-                            "18:30:12"
-                        ]
-                    }
-                }
-            }
-        },
-        {
-            "business_id": "--wIGbLEhlpl_UeAIyDmZQ",
-            "checkin_data": {
-                "checkin_temporal": {
-                    "checkin_times": {
-                        "dates": [
-                            "2015-06-06",
-                            "2019-03-14"
-                        ],
-                        "times": [
-                            "20:01:06",
-                            "22:01:52"
-                        ]
-                    }
-                }
-            }
-        },
-        {
-            "business_id": "-0FA-Qdi3SPYIoJz9UQw-A",
-            "checkin_data": {
-                "checkin_temporal": {
-                    "checkin_times": {
-                        "dates": [
-                            "2018-09-29",
-                            "2018-10-20",
-                            "2018-10-20"
-                        ],
-                        "times": [
-                            "18:55:17",
-                            "16:48:05",
-                            "22:20:24"
-                        ]
-                    }
-                }
-            }
-        },
-        {
-            "business_id": "-0Hj1hb_XW6ybWq2M7QhGA",
-            "checkin_data": {
-                "checkin_temporal": {
-                    "checkin_times": {
-                        "dates": [
-                            "2011-04-23",
-                            "2014-05-04",
-                            "2014-05-11",
-                            "2014-06-04",
-                            "2015-12-05",
-                            "2017-05-15"
-                        ],
-                        "times": [
-                            "21:11:22",
-                            "19:42:48",
-                            "19:16:08",
-                            "19:14:18",
-                            "19:22:42",
-                            "23:19:00"
-                        ]
-                    }
-                }
-            }
-        },
-        {
-            "business_id": "-0KMvRFwDWdVBeTpT11iHw",
-            "checkin_data": {
-                "checkin_temporal": {
-                    "checkin_times": {
-                        "dates": [
-                            "2012-07-13",
-                            "2016-12-24",
-                            "2017-08-31"
-                        ],
-                        "times": [
-                            "21:43:57",
-                            "02:27:31",
-                            "00:35:26"
-                        ]
-                    }
-                }
-            }
-        },
-        {
-            "business_id": "-0LPtgJC31FWMrMv317p0Q",
-            "checkin_data": {
-                "checkin_temporal": {
-                    "checkin_times": {
-                        "dates": [
-                            "2013-04-13",
-                            "2013-08-19",
-                            "2013-10-04"
-                        ],
-                        "times": [
-                            "12:35:33",
-                            "23:35:49",
-                            "19:14:56"
-                        ]
-                    }
-                }
-            }
-        },
-        {
-            "business_id": "-0M3o2uWBnQZwd3hmfEwuw",
-            "checkin_data": {
-                "checkin_temporal": {
-                    "checkin_times": {
-                        "dates": [
-                            "2016-09-10",
-                            "2018-09-08",
-                            "2019-09-13"
-                        ],
-                        "times": [
-                            "19:26:19",
-                            "14:15:37",
-                            "22:47:25"
-                        ]
-                    }
-                }
-            }
-        },
-        {
-            "business_id": "-0RRiWDtfnS16AKCtfvBZg",
-            "checkin_data": {
-                "checkin_temporal": {
-                    "checkin_times": {
-                        "dates": [
-                            "2017-05-19",
-                            "2017-05-19",
-                            "2017-08-28",
-                            "2017-09-20",
-                            "2017-10-01",
-                            "2017-10-01",
-                            "2017-12-27"
-                        ],
-                        "times": [
-                            "14:30:16",
-                            "14:30:25",
-                            "15:49:37",
-                            "20:19:51",
-                            "16:31:05",
-                            "16:56:27",
-                            "23:33:20"
-                        ]
-                    }
-                }
-            }
-        },
-        {
-            "business_id": "-0Soj75v-XoRcf2ERr8Bmg",
-            "checkin_data": {
-                "checkin_temporal": {
-                    "checkin_times": {
-                        "dates": [
-                            "2019-06-05"
-                        ],
-                        "times": [
-                            "18:22:49"
-                        ]
-                    }
-                }
-            }
-        },
-        {
-            "business_id": "-0ZumLlFjMh4ZW1z2nXGug",
-            "checkin_data": {
-                "checkin_temporal": {
-                    "checkin_times": {
-                        "dates": [
-                            "2011-09-24",
-                            "2014-03-10",
-                            "2015-05-27",
-                            "2015-08-29",
-                            "2018-03-16"
-                        ],
-                        "times": [
-                            "21:37:32",
-                            "20:20:07",
-                            "00:40:24",
-                            "17:58:15",
-                            "15:03:26"
-                        ]
-                    }
-                }
-            }
-        },
-        {
-            "business_id": "-0aOudcaAyac0VJbMX-L1g",
-            "checkin_data": {
-                "checkin_temporal": {
-                    "checkin_times": {
-                        "dates": [
-                            "2015-03-16",
-                            "2015-12-21",
-                            "2016-10-28",
-                            "2016-10-28"
-                        ],
-                        "times": [
-                            "23:51:16",
-                            "04:48:01",
-                            "20:22:42",
-                            "20:23:00"
-                        ]
-                    }
-                }
-            }
-        },
-        {
-            "business_id": "-0b86isaXMY0v4g-V8GZ9Q",
-            "checkin_data": {
-                "checkin_temporal": {
-                    "checkin_times": {
-                        "dates": [
-                            "2013-10-22",
-                            "2014-11-21"
-                        ],
-                        "times": [
-                            "16:49:21",
-                            "17:39:24"
-                        ]
-                    }
-                }
-            }
-        },
-        {
-            "business_id": "-0d-BfFSU0bwLcnMaGRxYw",
-            "checkin_data": {
-                "checkin_temporal": {
-                    "checkin_times": {
-                        "dates": [
-                            "2014-08-07",
-                            "2014-09-16",
-                            "2014-10-12",
-                            "2015-07-21",
-                            "2015-07-21"
-                        ],
-                        "times": [
-                            "18:30:48",
-                            "20:41:45",
-                            "23:22:27",
-                            "20:43:56",
-                            "20:45:07"
-                        ]
-                    }
-                }
-            }
-        },
-        {
-            "business_id": "-0jz6c3C6i7RG7Ag22K-Pg",
-            "checkin_data": {
-                "checkin_temporal": {
-                    "checkin_times": {
-                        "dates": [
-                            "2015-05-02",
-                            "2015-05-06",
-                            "2015-09-26"
-                        ],
-                        "times": [
-                            "19:49:05",
-                            "03:52:18",
-                            "01:13:19"
-                        ]
-                    }
-                }
-            }
-        },
-        {
-            "business_id": "-0y3MZU2oYP8r1ruDP1bfQ",
-            "checkin_data": {
-                "checkin_temporal": {
-                    "checkin_times": {
-                        "dates": [
-                            "2015-04-11",
-                            "2015-11-21",
-                            "2016-05-06",
-                            "2017-08-09",
-                            "2017-10-21"
-                        ],
-                        "times": [
-                            "13:14:14",
-                            "16:05:56",
-                            "14:10:04",
-                            "15:15:10",
-                            "15:12:56"
-                        ]
-                    }
-                }
-            }
-        },
-        {
-            "business_id": "-1BPe8UjF2_l3nVk-DFUjA",
-            "checkin_data": {
-                "checkin_temporal": {
-                    "checkin_times": {
-                        "dates": [
-                            "2015-12-03",
-                            "2016-03-17",
-                            "2016-11-02"
-                        ],
-                        "times": [
-                            "18:44:00",
-                            "18:19:21",
-                            "15:58:38"
-                        ]
-                    }
-                }
-            }
-        },
-        {
-            "business_id": "-1E2CQu_38mkghvmZgCCRw",
-            "checkin_data": {
-                "checkin_temporal": {
-                    "checkin_times": {
-                        "dates": [
-                            "2019-04-04"
-                        ],
-                        "times": [
-                            "22:02:37"
-                        ]
-                    }
-                }
-            }
-        },
-        {
-            "business_id": "-1wzk43IZ5D9Ysu6kzb5xA",
-            "checkin_data": {
-                "checkin_temporal": {
-                    "checkin_times": {
-                        "dates": [
-                            "2019-02-27"
-                        ],
-                        "times": [
-                            "14:03:08"
-                        ]
-                    }
-                }
-            }
-        },
-        {
-            "business_id": "-23R9P2eG7VTc6DVLjFKzA",
-            "checkin_data": {
-                "checkin_temporal": {
-                    "checkin_times": {
-                        "dates": [
-                            "2011-12-21",
-                            "2012-04-15",
-                            "2012-04-15",
-                            "2013-06-30",
-                            "2013-10-04",
-                            "2014-07-16"
-                        ],
-                        "times": [
-                            "19:02:51",
-                            "04:21:39",
-                            "14:23:56",
-                            "22:39:51",
-                            "20:34:13",
-                            "02:28:40"
-                        ]
-                    }
-                }
-            }
-        },
-        {
-            "business_id": "-26MGfikhJiTfCI-GqmzhQ",
-            "checkin_data": {
-                "checkin_temporal": {
-                    "checkin_times": {
-                        "dates": [
-                            "2018-06-13"
-                        ],
-                        "times": [
-                            "20:16:07"
-                        ]
-                    }
-                }
-            }
-        },
-        {
-            "business_id": "-2bLuJsMZ0WhI9daurVQNQ",
-            "checkin_data": {
-                "checkin_temporal": {
-                    "checkin_times": {
-                        "dates": [
-                            "2015-05-29",
-                            "2015-06-01"
-                        ],
-                        "times": [
-                            "16:46:17",
-                            "15:03:53"
-                        ]
-                    }
-                }
-            }
-        },
-        {
-            "business_id": "-2hDBMaza_ldqnZdiU06LQ",
-            "checkin_data": {
-                "checkin_temporal": {
-                    "checkin_times": {
-                        "dates": [
-                            "2011-10-08",
-                            "2014-08-18",
-                            "2016-01-07",
-                            "2016-10-21",
-                            "2016-12-01",
-                            "2016-12-29",
-                            "2018-07-22",
-                            "2018-09-07",
-                            "2019-03-08"
-                        ],
-                        "times": [
-                            "12:02:23",
-                            "02:11:11",
-                            "05:27:51",
-                            "20:15:55",
-                            "03:57:10",
-                            "01:54:42",
-                            "19:55:31",
-                            "01:42:54",
-                            "03:41:06"
-                        ]
-                    }
-                }
-            }
-        }
-    ]
-);
+LOAD DATASET YelpCheckin
+USING localfs (("path"="asterix_nc1://data/yelp-checkin/with-3-level-record-path.json"),
+                ("format"="json"));
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/array-index/select-unnest-queries/open/with-3-level-record-path/with-3-level-record-path.3.ddl.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/array-index/select-unnest-queries/open/with-3-level-record-path/with-3-level-record-path.3.ddl.sqlpp
index 88a6782..db37a3d 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/array-index/select-unnest-queries/open/with-3-level-record-path/with-3-level-record-path.3.ddl.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/array-index/select-unnest-queries/open/with-3-level-record-path/with-3-level-record-path.3.ddl.sqlpp
@@ -19,4 +19,6 @@
 
 USE TestYelp;
 
-CREATE INDEX IdxYelpCheckinDates ON YelpCheckin (UNNEST checkin_data.checkin_temporal.checkin_times.dates : string ) ;
+CREATE INDEX  IdxYelpCheckinDates
+ON            YelpCheckin (UNNEST checkin_data.checkin_temporal.checkin_times.dates : string )
+EXCLUDE UNKNOWN KEY;
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/array-index/select-unnest-queries/open/with-composite-sk/with-composite-sk.2.update.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/array-index/select-unnest-queries/open/with-composite-sk/with-composite-sk.2.update.sqlpp
index 02ddf21..f05a19b 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/array-index/select-unnest-queries/open/with-composite-sk/with-composite-sk.2.update.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/array-index/select-unnest-queries/open/with-composite-sk/with-composite-sk.2.update.sqlpp
@@ -19,258 +19,6 @@
 
 USE TestYelp;
 
-INSERT INTO YelpCheckin (
-    [
-        {
-            "business_id": "--1UhMGODdWsrMastO9DZw",
-            "checkin_times": [ 
-                {"date": "2016-04-26", "time": "19:49:16"},
-                {"date": "2016-08-30", "time": "18:36:57"},
-                {"date": "2016-10-15", "time": "02:45:18"},
-                {"date": "2016-11-18", "time": "01:54:50"},
-                {"date": "2017-04-20", "time": "18:39:06"},
-                {"date": "2017-05-03", "time": "17:58:02"},
-                {"date": "2019-03-19", "time": "22:04:48"}
-             ]
-        },
-        {
-            "business_id": "--EF5N7P70J_UYBTPypYlA",
-            "checkin_times": [ 
-                {"date": "2018-05-25", "time": "19:52:07"},
-                {"date": "2018-09-18", "time": "16:09:44"},
-                {"date": "2019-10-18", "time": "21:29:09"}
-             ]
-        },
-        {
-            "business_id": "--Ni3oJ4VOqfOEu7Sj2Vzg",
-            "checkin_times": [ 
-                {"date": "2019-06-07", "time": "17:54:58"}
-             ]
-        },
-        {
-            "business_id": "--Y1Adl1YUWfYIRSd8vkmA",
-            "checkin_times": [ 
-                {"date": "2011-05-03", "time": "20:54:05"},
-                {"date": "2011-08-23", "time": "20:49:45"},
-                {"date": "2014-12-04", "time": "06:13:01"},
-                {"date": "2016-11-16", "time": "19:25:55"}
-             ]
-        },
-        {
-            "business_id": "--YPwqIlRJrhHkJcjY3eiA",
-            "checkin_times": [ 
-                {"date": "2016-06-18", "time": "21:35:45"},
-                {"date": "2016-10-15", "time": "18:17:51"}
-             ]
-        },
-        {
-            "business_id": "--e8PjCNhEz32pprnPhCwQ",
-            "checkin_times": [ 
-                {"date": "2015-04-02", "time": "21:45:17"}
-             ]
-        },
-        {
-            "business_id": "--kinfHwmtdjz03g8B8z8Q",
-            "checkin_times": [ 
-                {"date": "2014-08-27", "time": "17:49:18"},
-                {"date": "2015-12-19", "time": "21:30:31"},
-                {"date": "2018-11-27", "time": "15:53:50"}
-             ]
-        },
-        {
-            "business_id": "--q6datkI-f0EoVheXNEeQ",
-            "checkin_times": [ 
-                {"date": "2014-01-28", "time": "20:56:04"},
-                {"date": "2014-11-16", "time": "16:11:58"},
-                {"date": "2015-11-15", "time": "19:21:53"},
-                {"date": "2015-11-15", "time": "19:33:39"}
-             ]
-        },
-        {
-            "business_id": "--qvQS4MigHPykD2GV0-zw",
-            "checkin_times": [ 
-                {"date": "2019-04-11", "time": "18:30:12"}
-             ]
-        },
-        {
-            "business_id": "--wIGbLEhlpl_UeAIyDmZQ",
-            "checkin_times": [ 
-                {"date": "2015-06-06", "time": "20:01:06"},
-                {"date": "2019-03-14", "time": "22:01:52"}
-             ]
-        },
-        {
-            "business_id": "-0FA-Qdi3SPYIoJz9UQw-A",
-            "checkin_times": [ 
-                {"date": "2018-09-29", "time": "18:55:17"},
-                {"date": "2018-10-20", "time": "16:48:05"},
-                {"date": "2018-10-20", "time": "22:20:24"}
-             ]
-        },
-        {
-            "business_id": "-0Hj1hb_XW6ybWq2M7QhGA",
-            "checkin_times": [ 
-                {"date": "2011-04-23", "time": "21:11:22"},
-                {"date": "2014-05-04", "time": "19:42:48"},
-                {"date": "2014-05-11", "time": "19:16:08"},
-                {"date": "2014-06-04", "time": "19:14:18"},
-                {"date": "2015-12-05", "time": "19:22:42"},
-                {"date": "2017-05-15", "time": "23:19:00"}
-             ]
-        },
-        {
-            "business_id": "-0KMvRFwDWdVBeTpT11iHw",
-            "checkin_times": [ 
-                {"date": "2012-07-13", "time": "21:43:57"},
-                {"date": "2016-12-24", "time": "02:27:31"},
-                {"date": "2017-08-31", "time": "00:35:26"}
-             ]
-        },
-        {
-            "business_id": "-0LPtgJC31FWMrMv317p0Q",
-            "checkin_times": [ 
-                {"date": "2013-04-13", "time": "12:35:33"},
-                {"date": "2013-08-19", "time": "23:35:49"},
-                {"date": "2013-10-04", "time": "19:14:56"}
-             ]
-        },
-        {
-            "business_id": "-0M3o2uWBnQZwd3hmfEwuw",
-            "checkin_times": [ 
-                {"date": "2016-09-10", "time": "19:26:19"},
-                {"date": "2018-09-08", "time": "14:15:37"},
-                {"date": "2019-09-13", "time": "22:47:25"}
-             ]
-        },
-        {
-            "business_id": "-0RRiWDtfnS16AKCtfvBZg",
-            "checkin_times": [ 
-                {"date": "2017-05-19", "time": "14:30:16"},
-                {"date": "2017-05-19", "time": "14:30:25"},
-                {"date": "2017-08-28", "time": "15:49:37"},
-                {"date": "2017-09-20", "time": "20:19:51"},
-                {"date": "2017-10-01", "time": "16:31:05"},
-                {"date": "2017-10-01", "time": "16:56:27"},
-                {"date": "2017-12-27", "time": "23:33:20"}
-             ]
-        },
-        {
-            "business_id": "-0Soj75v-XoRcf2ERr8Bmg",
-            "checkin_times": [ 
-                {"date": "2019-06-05", "time": "18:22:49"}
-             ]
-        },
-        {
-            "business_id": "-0ZumLlFjMh4ZW1z2nXGug",
-            "checkin_times": [ 
-                {"date": "2011-09-24", "time": "21:37:32"},
-                {"date": "2014-03-10", "time": "20:20:07"},
-                {"date": "2015-05-27", "time": "00:40:24"},
-                {"date": "2015-08-29", "time": "17:58:15"},
-                {"date": "2018-03-16", "time": "15:03:26"}
-             ]
-        },
-        {
-            "business_id": "-0aOudcaAyac0VJbMX-L1g",
-            "checkin_times": [ 
-                {"date": "2015-03-16", "time": "23:51:16"},
-                {"date": "2015-12-21", "time": "04:48:01"},
-                {"date": "2016-10-28", "time": "20:22:42"},
-                {"date": "2016-10-28", "time": "20:23:00"}
-             ]
-        },
-        {
-            "business_id": "-0b86isaXMY0v4g-V8GZ9Q",
-            "checkin_times": [ 
-                {"date": "2013-10-22", "time": "16:49:21"},
-                {"date": "2014-11-21", "time": "17:39:24"}
-             ]
-        },
-        {
-            "business_id": "-0d-BfFSU0bwLcnMaGRxYw",
-            "checkin_times": [ 
-                {"date": "2014-08-07", "time": "18:30:48"},
-                {"date": "2014-09-16", "time": "20:41:45"},
-                {"date": "2014-10-12", "time": "23:22:27"},
-                {"date": "2015-07-21", "time": "20:43:56"},
-                {"date": "2015-07-21", "time": "20:45:07"}
-             ]
-        },
-        {
-            "business_id": "-0jz6c3C6i7RG7Ag22K-Pg",
-            "checkin_times": [ 
-                {"date": "2015-05-02", "time": "19:49:05"},
-                {"date": "2015-05-06", "time": "03:52:18"},
-                {"date": "2015-09-26", "time": "01:13:19"}
-             ]
-        },
-        {
-            "business_id": "-0y3MZU2oYP8r1ruDP1bfQ",
-            "checkin_times": [ 
-                {"date": "2015-04-11", "time": "13:14:14"},
-                {"date": "2015-11-21", "time": "16:05:56"},
-                {"date": "2016-05-06", "time": "14:10:04"},
-                {"date": "2017-08-09", "time": "15:15:10"},
-                {"date": "2017-10-21", "time": "15:12:56"}
-             ]
-        },
-        {
-            "business_id": "-1BPe8UjF2_l3nVk-DFUjA",
-            "checkin_times": [ 
-                {"date": "2015-12-03", "time": "18:44:00"},
-                {"date": "2016-03-17", "time": "18:19:21"},
-                {"date": "2016-11-02", "time": "15:58:38"}
-             ]
-        },
-        {
-            "business_id": "-1E2CQu_38mkghvmZgCCRw",
-            "checkin_times": [ 
-                {"date": "2019-04-04", "time": "22:02:37"}
-             ]
-        },
-        {
-            "business_id": "-1wzk43IZ5D9Ysu6kzb5xA",
-            "checkin_times": [ 
-                {"date": "2019-02-27", "time": "14:03:08"}
-             ]
-        },
-        {
-            "business_id": "-23R9P2eG7VTc6DVLjFKzA",
-            "checkin_times": [ 
-                {"date": "2011-12-21", "time": "19:02:51"},
-                {"date": "2012-04-15", "time": "04:21:39"},
-                {"date": "2012-04-15", "time": "14:23:56"},
-                {"date": "2013-06-30", "time": "22:39:51"},
-                {"date": "2013-10-04", "time": "20:34:13"},
-                {"date": "2014-07-16", "time": "02:28:40"}
-             ]
-        },
-        {
-            "business_id": "-26MGfikhJiTfCI-GqmzhQ",
-            "checkin_times": [ 
-                {"date": "2018-06-13", "time": "20:16:07"}
-             ]
-        },
-        {
-            "business_id": "-2bLuJsMZ0WhI9daurVQNQ",
-            "checkin_times": [ 
-                {"date": "2015-05-29", "time": "16:46:17"},
-                {"date": "2015-06-01", "time": "15:03:53"}
-             ]
-        },
-        {
-            "business_id": "-2hDBMaza_ldqnZdiU06LQ",
-            "checkin_times": [ 
-                {"date": "2011-10-08", "time": "12:02:23"},
-                {"date": "2014-08-18", "time": "02:11:11"},
-                {"date": "2016-01-07", "time": "05:27:51"},
-                {"date": "2016-10-21", "time": "20:15:55"},
-                {"date": "2016-12-01", "time": "03:57:10"},
-                {"date": "2016-12-29", "time": "01:54:42"},
-                {"date": "2018-07-22", "time": "19:55:31"},
-                {"date": "2018-09-07", "time": "01:42:54"},
-                {"date": "2019-03-08", "time": "03:41:06"}
-             ]
-        }
-    ]
-);
+LOAD DATASET YelpCheckin
+USING localfs (("path"="asterix_nc1://data/yelp-checkin/use-case-3.json"),
+                ("format"="json"));
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/array-index/select-unnest-queries/open/with-composite-sk/with-composite-sk.3.ddl.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/array-index/select-unnest-queries/open/with-composite-sk/with-composite-sk.3.ddl.sqlpp
index a8cf7d4..4ba9f82 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/array-index/select-unnest-queries/open/with-composite-sk/with-composite-sk.3.ddl.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/array-index/select-unnest-queries/open/with-composite-sk/with-composite-sk.3.ddl.sqlpp
@@ -19,4 +19,6 @@
 
 USE TestYelp;
 
-CREATE INDEX IdxYelpCheckinDatesTimesBusiness ON YelpCheckin (UNNEST checkin_times SELECT date : string , time : string );
+CREATE INDEX  IdxYelpCheckinDatesTimesBusiness
+ON            YelpCheckin (UNNEST checkin_times SELECT date : string , time : string )
+EXCLUDE UNKNOWN KEY;
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/testsuite_sqlpp.xml b/asterixdb/asterix-app/src/test/resources/runtimets/testsuite_sqlpp.xml
index 43f7697..e82b94a 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/testsuite_sqlpp.xml
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/testsuite_sqlpp.xml
@@ -8058,6 +8058,14 @@
   <test-group name="array-index">
     <test-group name="array-index/error-handling">
       <test-case FilePath="array-index/error-handling">
+        <compilation-unit name="index-include-unknown-key">
+          <output-dir compare="Text">index-include-unknown-key</output-dir>
+          <expected-error>ASX1079: Compilation error: Array indexes must specify EXCLUDE UNKNOWN KEY</expected-error>
+          <expected-error>ASX1079: Compilation error: Array indexes must specify EXCLUDE UNKNOWN KEY</expected-error>
+          <source-location>false</source-location>
+        </compilation-unit>
+      </test-case>
+      <test-case FilePath="array-index/error-handling">
         <compilation-unit name="index-two-array-fields">
           <output-dir compare="Text">index-two-array-fields</output-dir>
           <expected-error>ASX1079: Compilation error: Cannot create composite index with multiple array fields using different arrays</expected-error>
@@ -8217,10 +8225,10 @@
         </compilation-unit>
       </test-case>
       <test-case FilePath="array-index/bulk-loading/on-index-creation/closed">
-      <compilation-unit name="with-3-level-record-path">
-        <output-dir compare="Text">with-3-level-record-path</output-dir>
-      </compilation-unit>
-    </test-case>
+        <compilation-unit name="with-3-level-record-path">
+          <output-dir compare="Text">with-3-level-record-path</output-dir>
+        </compilation-unit>
+      </test-case>
       <test-case FilePath="array-index/bulk-loading/on-index-creation/open">
         <compilation-unit name="composite-atomic">
           <output-dir compare="Text">composite-atomic</output-dir>
diff --git a/asterixdb/asterix-metadata/src/main/java/org/apache/asterix/metadata/entitytupletranslators/IndexTupleTranslator.java b/asterixdb/asterix-metadata/src/main/java/org/apache/asterix/metadata/entitytupletranslators/IndexTupleTranslator.java
index 9171937..f2a4f4f 100644
--- a/asterixdb/asterix-metadata/src/main/java/org/apache/asterix/metadata/entitytupletranslators/IndexTupleTranslator.java
+++ b/asterixdb/asterix-metadata/src/main/java/org/apache/asterix/metadata/entitytupletranslators/IndexTupleTranslator.java
@@ -767,18 +767,31 @@
     }
 
     private void writeExcludeUnknownKey(Index index) throws HyracksDataException {
-        boolean unknownKeyOptionAllowed =
-                index.getIndexType() == IndexType.BTREE && !index.isPrimaryIndex() && !index.isPrimaryKeyIndex();
-        if (unknownKeyOptionAllowed) {
-            OptionalBoolean excludeUnknownKey =
-                    ((Index.ValueIndexDetails) index.getIndexDetails()).isExcludeUnknownKey();
-            ABoolean bVal = excludeUnknownKey.isEmpty() ? ABoolean.FALSE : ABoolean.valueOf(excludeUnknownKey.get());
-            fieldValue.reset();
-            nameValue.reset();
-            aString.setValue(INDEX_EXCLUDE_UNKNOWN_FIELD_NAME);
-            stringSerde.serialize(aString, nameValue.getDataOutput());
-            booleanSerde.serialize(bVal, fieldValue.getDataOutput());
-            recordBuilder.addField(nameValue, fieldValue);
+        switch (index.getIndexType()) {
+            case BTREE:
+                if (!index.isPrimaryIndex() && !index.isPrimaryKeyIndex()) {
+                    OptionalBoolean excludeUnknownKey =
+                            ((Index.ValueIndexDetails) index.getIndexDetails()).isExcludeUnknownKey();
+                    ABoolean bVal =
+                            excludeUnknownKey.isEmpty() ? ABoolean.FALSE : ABoolean.valueOf(excludeUnknownKey.get());
+                    fieldValue.reset();
+                    nameValue.reset();
+                    aString.setValue(INDEX_EXCLUDE_UNKNOWN_FIELD_NAME);
+                    stringSerde.serialize(aString, nameValue.getDataOutput());
+                    booleanSerde.serialize(bVal, fieldValue.getDataOutput());
+                    recordBuilder.addField(nameValue, fieldValue);
+                }
+                break;
+
+            case ARRAY:
+                // TODO: This value is written for back-compatibility, and is currently always assumed to be true.
+                fieldValue.reset();
+                nameValue.reset();
+                aString.setValue(INDEX_EXCLUDE_UNKNOWN_FIELD_NAME);
+                stringSerde.serialize(aString, nameValue.getDataOutput());
+                booleanSerde.serialize(ABoolean.TRUE, fieldValue.getDataOutput());
+                recordBuilder.addField(nameValue, fieldValue);
+                break;
         }
     }
 }