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

htowaileb pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/asterixdb.git


The following commit(s) were added to refs/heads/master by this push:
     new efb31e35be [ASTERIXDB-3271][EXT]: Add test for views
efb31e35be is described below

commit efb31e35bedee40859db45b3e2801da441432c9c
Author: Hussain Towaileb <hussain.towai...@couchbase.com>
AuthorDate: Wed Sep 27 07:27:26 2023 +0300

    [ASTERIXDB-3271][EXT]: Add test for views
    
    Change-Id: I151fc437d31e6e29d858880375fe37a3067046e2
    Reviewed-on: https://asterix-gerrit.ics.uci.edu/c/asterixdb/+/17823
    Integration-Tests: Jenkins <jenk...@fulliautomatix.ics.uci.edu>
    Tested-by: Jenkins <jenk...@fulliautomatix.ics.uci.edu>
    Reviewed-by: Hussain Towaileb <hussai...@gmail.com>
    Reviewed-by: Murtadha Hubail <mhub...@apache.org>
---
 .../parquet/views/test.000.ddl.sqlpp               | 50 ++++++++++++++++++++++
 .../parquet/views/test.001.query.sqlpp             | 28 ++++++++++++
 .../parquet/views/test.002.query.sqlpp             | 29 +++++++++++++
 .../parquet/views/test.003.query.sqlpp             | 28 ++++++++++++
 .../parquet/views/test.004.query.sqlpp             | 29 +++++++++++++
 .../dynamic-prefixes/views/test.000.ddl.sqlpp      | 50 ++++++++++++++++++++++
 .../dynamic-prefixes/views/test.001.query.sqlpp    | 28 ++++++++++++
 .../dynamic-prefixes/views/test.002.query.sqlpp    | 29 +++++++++++++
 .../dynamic-prefixes/views/test.003.query.sqlpp    | 28 ++++++++++++
 .../dynamic-prefixes/views/test.004.query.sqlpp    | 29 +++++++++++++
 .../dynamic-prefixes/parquet/views/result.001.adm  |  3 ++
 .../dynamic-prefixes/parquet/views/result.002.adm  | 22 ++++++++++
 .../dynamic-prefixes/parquet/views/result.003.adm  |  1 +
 .../dynamic-prefixes/parquet/views/result.004.adm  | 22 ++++++++++
 .../common/dynamic-prefixes/views/result.001.adm   |  3 ++
 .../common/dynamic-prefixes/views/result.002.adm   | 22 ++++++++++
 .../common/dynamic-prefixes/views/result.003.adm   |  1 +
 .../common/dynamic-prefixes/views/result.004.adm   | 22 ++++++++++
 ...stsuite_external_dataset_azure_blob_storage.xml |  6 +++
 .../runtimets/testsuite_external_dataset_s3.xml    | 12 ++++++
 20 files changed, 442 insertions(+)

diff --git 
a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/external-dataset/common/dynamic-prefixes/parquet/views/test.000.ddl.sqlpp
 
b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/external-dataset/common/dynamic-prefixes/parquet/views/test.000.ddl.sqlpp
new file mode 100644
index 0000000000..4ac1466048
--- /dev/null
+++ 
b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/external-dataset/common/dynamic-prefixes/parquet/views/test.000.ddl.sqlpp
@@ -0,0 +1,50 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+DROP DATAVERSE test IF EXISTS;
+CREATE DATAVERSE test;
+USE test;
+
+CREATE TYPE test AS {
+};
+
+CREATE EXTERNAL DATASET maintenance(test) USING %adapter% (
+    %template%,
+    ("container"="playground"),
+    
("definition"="parquet-data/external-filter/embed/car/{company:string}/customer/{customer_id:int}/maintenance-report/year-{year:int}-month-{month:int}-day-{day:int}-date"),
+    ("embed-filter-values" = "true"),
+    ("format"="parquet")
+);
+
+CREATE VIEW maintenance_av(customer_id int, year int, month int, day int, 
company string) DEFAULT NULL AS
+SELECT customer_id, year, month, day, company
+  FROM maintenance m;
+
+
+CREATE EXTERNAL DATASET maintenance2(test) USING %adapter% (
+    %template%,
+    ("container"="playground"),
+    
("definition"="parquet-data/external-filter/embed/car/{company:string}/customer/{customerId:int}/maintenance-report/year-{year:int}-month-{month:int}-day-{day:int}-date"),
+    ("embed-filter-values" = "true"),
+    ("format"="parquet")
+);
+
+CREATE VIEW maintenance_av2(customer_id int, year int, month int, day int, 
company string) DEFAULT NULL AS
+SELECT customer_id, year, month, day, company
+  FROM maintenance2 m;
\ No newline at end of file
diff --git 
a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/external-dataset/common/dynamic-prefixes/parquet/views/test.001.query.sqlpp
 
b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/external-dataset/common/dynamic-prefixes/parquet/views/test.001.query.sqlpp
new file mode 100644
index 0000000000..44f3ff9100
--- /dev/null
+++ 
b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/external-dataset/common/dynamic-prefixes/parquet/views/test.001.query.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.
+ */
+
+USE test;
+
+SELECT VALUE v
+FROM maintenance_av v
+WHERE v.company = "ford"
+  AND v.customer_id = 1
+  AND v.year = 2001
+  AND v.month = 01
+  AND v.day = 01;
\ No newline at end of file
diff --git 
a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/external-dataset/common/dynamic-prefixes/parquet/views/test.002.query.sqlpp
 
b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/external-dataset/common/dynamic-prefixes/parquet/views/test.002.query.sqlpp
new file mode 100644
index 0000000000..5d4b0675c5
--- /dev/null
+++ 
b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/external-dataset/common/dynamic-prefixes/parquet/views/test.002.query.sqlpp
@@ -0,0 +1,29 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+USE test;
+
+EXPLAIN
+SELECT VALUE v
+FROM maintenance_av v
+WHERE v.company = "ford"
+  AND v.customer_id = 1
+  AND v.year = 2001
+  AND v.month = 01
+  AND v.day = 01;
\ No newline at end of file
diff --git 
a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/external-dataset/common/dynamic-prefixes/parquet/views/test.003.query.sqlpp
 
b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/external-dataset/common/dynamic-prefixes/parquet/views/test.003.query.sqlpp
new file mode 100644
index 0000000000..c71e596b75
--- /dev/null
+++ 
b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/external-dataset/common/dynamic-prefixes/parquet/views/test.003.query.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.
+ */
+
+USE test;
+
+SELECT value count(*)
+FROM maintenance_av2 v
+WHERE v.company = "ford"
+  AND v.customerId = 1
+  AND v.year = 2001
+  AND v.month = 01
+  AND v.day = 01;
\ No newline at end of file
diff --git 
a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/external-dataset/common/dynamic-prefixes/parquet/views/test.004.query.sqlpp
 
b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/external-dataset/common/dynamic-prefixes/parquet/views/test.004.query.sqlpp
new file mode 100644
index 0000000000..bf9c84972e
--- /dev/null
+++ 
b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/external-dataset/common/dynamic-prefixes/parquet/views/test.004.query.sqlpp
@@ -0,0 +1,29 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+USE test;
+
+EXPLAIN
+SELECT VALUE v
+FROM maintenance_av2 v
+WHERE v.company = "ford"
+  AND v.customerId = 1
+  AND v.year = 2001
+  AND v.month = 01
+  AND v.day = 01;
\ No newline at end of file
diff --git 
a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/external-dataset/common/dynamic-prefixes/views/test.000.ddl.sqlpp
 
b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/external-dataset/common/dynamic-prefixes/views/test.000.ddl.sqlpp
new file mode 100644
index 0000000000..96d398a1d5
--- /dev/null
+++ 
b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/external-dataset/common/dynamic-prefixes/views/test.000.ddl.sqlpp
@@ -0,0 +1,50 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+DROP DATAVERSE test IF EXISTS;
+CREATE DATAVERSE test;
+USE test;
+
+CREATE TYPE test AS {
+};
+
+CREATE EXTERNAL DATASET maintenance(test) USING %adapter% (
+    %template%,
+    ("container"="playground"),
+    
("definition"="external-filter/embed/car/{company:string}/customer/{customer_id:int}/maintenance-report/year-{year:int}-month-{month:int}-day-{day:int}-date"),
+    ("embed-filter-values" = "true"),
+    ("format"="json")
+);
+
+CREATE VIEW maintenance_av(customer_id int, year int, month int, day int, 
company string) DEFAULT NULL AS
+SELECT customer_id, year, month, day, company
+  FROM maintenance m;
+
+
+CREATE EXTERNAL DATASET maintenance2(test) USING %adapter% (
+    %template%,
+    ("container"="playground"),
+    
("definition"="external-filter/embed/car/{company:string}/customer/{customerId:int}/maintenance-report/year-{year:int}-month-{month:int}-day-{day:int}-date"),
+    ("embed-filter-values" = "true"),
+    ("format"="json")
+);
+
+CREATE VIEW maintenance_av2(customer_id int, year int, month int, day int, 
company string) DEFAULT NULL AS
+SELECT customer_id, year, month, day, company
+  FROM maintenance2 m;
\ No newline at end of file
diff --git 
a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/external-dataset/common/dynamic-prefixes/views/test.001.query.sqlpp
 
b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/external-dataset/common/dynamic-prefixes/views/test.001.query.sqlpp
new file mode 100644
index 0000000000..44f3ff9100
--- /dev/null
+++ 
b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/external-dataset/common/dynamic-prefixes/views/test.001.query.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.
+ */
+
+USE test;
+
+SELECT VALUE v
+FROM maintenance_av v
+WHERE v.company = "ford"
+  AND v.customer_id = 1
+  AND v.year = 2001
+  AND v.month = 01
+  AND v.day = 01;
\ No newline at end of file
diff --git 
a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/external-dataset/common/dynamic-prefixes/views/test.002.query.sqlpp
 
b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/external-dataset/common/dynamic-prefixes/views/test.002.query.sqlpp
new file mode 100644
index 0000000000..5d4b0675c5
--- /dev/null
+++ 
b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/external-dataset/common/dynamic-prefixes/views/test.002.query.sqlpp
@@ -0,0 +1,29 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+USE test;
+
+EXPLAIN
+SELECT VALUE v
+FROM maintenance_av v
+WHERE v.company = "ford"
+  AND v.customer_id = 1
+  AND v.year = 2001
+  AND v.month = 01
+  AND v.day = 01;
\ No newline at end of file
diff --git 
a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/external-dataset/common/dynamic-prefixes/views/test.003.query.sqlpp
 
b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/external-dataset/common/dynamic-prefixes/views/test.003.query.sqlpp
new file mode 100644
index 0000000000..c71e596b75
--- /dev/null
+++ 
b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/external-dataset/common/dynamic-prefixes/views/test.003.query.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.
+ */
+
+USE test;
+
+SELECT value count(*)
+FROM maintenance_av2 v
+WHERE v.company = "ford"
+  AND v.customerId = 1
+  AND v.year = 2001
+  AND v.month = 01
+  AND v.day = 01;
\ No newline at end of file
diff --git 
a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/external-dataset/common/dynamic-prefixes/views/test.004.query.sqlpp
 
b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/external-dataset/common/dynamic-prefixes/views/test.004.query.sqlpp
new file mode 100644
index 0000000000..bf9c84972e
--- /dev/null
+++ 
b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/external-dataset/common/dynamic-prefixes/views/test.004.query.sqlpp
@@ -0,0 +1,29 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+USE test;
+
+EXPLAIN
+SELECT VALUE v
+FROM maintenance_av2 v
+WHERE v.company = "ford"
+  AND v.customerId = 1
+  AND v.year = 2001
+  AND v.month = 01
+  AND v.day = 01;
\ No newline at end of file
diff --git 
a/asterixdb/asterix-app/src/test/resources/runtimets/results/external-dataset/common/dynamic-prefixes/parquet/views/result.001.adm
 
b/asterixdb/asterix-app/src/test/resources/runtimets/results/external-dataset/common/dynamic-prefixes/parquet/views/result.001.adm
new file mode 100644
index 0000000000..eff14d1105
--- /dev/null
+++ 
b/asterixdb/asterix-app/src/test/resources/runtimets/results/external-dataset/common/dynamic-prefixes/parquet/views/result.001.adm
@@ -0,0 +1,3 @@
+{ "customer_id": 1, "year": 2001, "month": 1, "day": 1, "company": "ford" }
+{ "customer_id": 1, "year": 2001, "month": 1, "day": 1, "company": "ford" }
+{ "customer_id": 1, "year": 2001, "month": 1, "day": 1, "company": "ford" }
diff --git 
a/asterixdb/asterix-app/src/test/resources/runtimets/results/external-dataset/common/dynamic-prefixes/parquet/views/result.002.adm
 
b/asterixdb/asterix-app/src/test/resources/runtimets/results/external-dataset/common/dynamic-prefixes/parquet/views/result.002.adm
new file mode 100644
index 0000000000..ece3177e61
--- /dev/null
+++ 
b/asterixdb/asterix-app/src/test/resources/runtimets/results/external-dataset/common/dynamic-prefixes/parquet/views/result.002.adm
@@ -0,0 +1,22 @@
+distribute result [$$62] [cardinality: 0.0, op-cost: 0.0, total-cost: 0.0]
+-- DISTRIBUTE_RESULT  |PARTITIONED|
+  exchange [cardinality: 0.0, op-cost: 0.0, total-cost: 0.0]
+  -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
+    project ([$$62]) [cardinality: 0.0, op-cost: 0.0, total-cost: 0.0]
+    -- STREAM_PROJECT  |PARTITIONED|
+      assign [$$62] <- [{"customer_id": $$95, "year": $$96, "month": $$97, 
"day": $$98, "company": $$99}] [cardinality: 0.0, op-cost: 0.0, total-cost: 0.0]
+      -- ASSIGN  |PARTITIONED|
+        select (and(eq($$95, 1), eq($$96, 2001), eq($$97, 1), eq($$98, 1), 
eq($$99, "ford"))) [cardinality: 0.0, op-cost: 0.0, total-cost: 0.0]
+        -- STREAM_SELECT  |PARTITIONED|
+          project ([$$99, $$98, $$97, $$96, $$95]) [cardinality: 0.0, op-cost: 
0.0, total-cost: 0.0]
+          -- STREAM_PROJECT  |PARTITIONED|
+            assign [$$99, $$98, $$97, $$96, $$95] <- 
[string-default-null($$m.getField("company")), 
int64-default-null($$m.getField("day")), 
int64-default-null($$m.getField("month")), 
int64-default-null($$m.getField("year")), 
int64-default-null($$m.getField("customer_id"))] [cardinality: 0.0, op-cost: 
0.0, total-cost: 0.0]
+            -- ASSIGN  |PARTITIONED|
+              exchange [cardinality: 0.0, op-cost: 0.0, total-cost: 0.0]
+              -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
+                data-scan []<-[$$m] <- test.maintenance project 
({month:any,year:any,company:any,customer_id:any,day:any}) prefix-filter on: 
and(eq(int64-default-null($$m.getField("customer_id")), 1), 
eq(int64-default-null($$m.getField("year")), 2001), 
eq(int64-default-null($$m.getField("month")), 1), 
eq(int64-default-null($$m.getField("day")), 1), 
eq(string-default-null($$m.getField("company")), "ford")) embed-filter-value: 
true [cardinality: 0.0, op-cost: 0.0, total-cost: 0.0]
+                -- DATASOURCE_SCAN  |PARTITIONED|
+                  exchange [cardinality: 0.0, op-cost: 0.0, total-cost: 0.0]
+                  -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
+                    empty-tuple-source [cardinality: 0.0, op-cost: 0.0, 
total-cost: 0.0]
+                    -- EMPTY_TUPLE_SOURCE  |PARTITIONED|
\ No newline at end of file
diff --git 
a/asterixdb/asterix-app/src/test/resources/runtimets/results/external-dataset/common/dynamic-prefixes/parquet/views/result.003.adm
 
b/asterixdb/asterix-app/src/test/resources/runtimets/results/external-dataset/common/dynamic-prefixes/parquet/views/result.003.adm
new file mode 100644
index 0000000000..573541ac97
--- /dev/null
+++ 
b/asterixdb/asterix-app/src/test/resources/runtimets/results/external-dataset/common/dynamic-prefixes/parquet/views/result.003.adm
@@ -0,0 +1 @@
+0
diff --git 
a/asterixdb/asterix-app/src/test/resources/runtimets/results/external-dataset/common/dynamic-prefixes/parquet/views/result.004.adm
 
b/asterixdb/asterix-app/src/test/resources/runtimets/results/external-dataset/common/dynamic-prefixes/parquet/views/result.004.adm
new file mode 100644
index 0000000000..4c78355f5b
--- /dev/null
+++ 
b/asterixdb/asterix-app/src/test/resources/runtimets/results/external-dataset/common/dynamic-prefixes/parquet/views/result.004.adm
@@ -0,0 +1,22 @@
+distribute result [$$62] [cardinality: 0.0, op-cost: 0.0, total-cost: 0.0]
+-- DISTRIBUTE_RESULT  |PARTITIONED|
+  exchange [cardinality: 0.0, op-cost: 0.0, total-cost: 0.0]
+  -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
+    project ([$$62]) [cardinality: 0.0, op-cost: 0.0, total-cost: 0.0]
+    -- STREAM_PROJECT  |PARTITIONED|
+      select (and(eq($$62.getField("customerId"), 1), eq($$94, 2001), eq($$95, 
1), eq($$96, 1), eq($$97, "ford"))) [cardinality: 0.0, op-cost: 0.0, 
total-cost: 0.0]
+      -- STREAM_SELECT  |PARTITIONED|
+        project ([$$97, $$96, $$95, $$94, $$62]) [cardinality: 0.0, op-cost: 
0.0, total-cost: 0.0]
+        -- STREAM_PROJECT  |PARTITIONED|
+          assign [$$62] <- [{"customer_id": 
int64-default-null($$m.getField("customer_id")), "year": $$94, "month": $$95, 
"day": $$96, "company": $$97}] [cardinality: 0.0, op-cost: 0.0, total-cost: 0.0]
+          -- ASSIGN  |PARTITIONED|
+            assign [$$97, $$96, $$95, $$94] <- 
[string-default-null($$m.getField("company")), 
int64-default-null($$m.getField("day")), 
int64-default-null($$m.getField("month")), 
int64-default-null($$m.getField("year"))] [cardinality: 0.0, op-cost: 0.0, 
total-cost: 0.0]
+            -- ASSIGN  |PARTITIONED|
+              exchange [cardinality: 0.0, op-cost: 0.0, total-cost: 0.0]
+              -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
+                data-scan []<-[$$m] <- test.maintenance2 project 
({month:any,year:any,company:any,customer_id:any,day:any}) prefix-filter on: 
and(eq(int64-default-null($$m.getField("year")), 2001), 
eq(int64-default-null($$m.getField("month")), 1), 
eq(int64-default-null($$m.getField("day")), 1), 
eq(string-default-null($$m.getField("company")), "ford")) embed-filter-value: 
true [cardinality: 0.0, op-cost: 0.0, total-cost: 0.0]
+                -- DATASOURCE_SCAN  |PARTITIONED|
+                  exchange [cardinality: 0.0, op-cost: 0.0, total-cost: 0.0]
+                  -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
+                    empty-tuple-source [cardinality: 0.0, op-cost: 0.0, 
total-cost: 0.0]
+                    -- EMPTY_TUPLE_SOURCE  |PARTITIONED|
diff --git 
a/asterixdb/asterix-app/src/test/resources/runtimets/results/external-dataset/common/dynamic-prefixes/views/result.001.adm
 
b/asterixdb/asterix-app/src/test/resources/runtimets/results/external-dataset/common/dynamic-prefixes/views/result.001.adm
new file mode 100644
index 0000000000..eff14d1105
--- /dev/null
+++ 
b/asterixdb/asterix-app/src/test/resources/runtimets/results/external-dataset/common/dynamic-prefixes/views/result.001.adm
@@ -0,0 +1,3 @@
+{ "customer_id": 1, "year": 2001, "month": 1, "day": 1, "company": "ford" }
+{ "customer_id": 1, "year": 2001, "month": 1, "day": 1, "company": "ford" }
+{ "customer_id": 1, "year": 2001, "month": 1, "day": 1, "company": "ford" }
diff --git 
a/asterixdb/asterix-app/src/test/resources/runtimets/results/external-dataset/common/dynamic-prefixes/views/result.002.adm
 
b/asterixdb/asterix-app/src/test/resources/runtimets/results/external-dataset/common/dynamic-prefixes/views/result.002.adm
new file mode 100644
index 0000000000..2478db2caa
--- /dev/null
+++ 
b/asterixdb/asterix-app/src/test/resources/runtimets/results/external-dataset/common/dynamic-prefixes/views/result.002.adm
@@ -0,0 +1,22 @@
+distribute result [$$62] [cardinality: 0.0, op-cost: 0.0, total-cost: 0.0]
+-- DISTRIBUTE_RESULT  |PARTITIONED|
+  exchange [cardinality: 0.0, op-cost: 0.0, total-cost: 0.0]
+  -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
+    project ([$$62]) [cardinality: 0.0, op-cost: 0.0, total-cost: 0.0]
+    -- STREAM_PROJECT  |PARTITIONED|
+      assign [$$62] <- [{"customer_id": $$95, "year": $$96, "month": $$97, 
"day": $$98, "company": $$99}] [cardinality: 0.0, op-cost: 0.0, total-cost: 0.0]
+      -- ASSIGN  |PARTITIONED|
+        select (and(eq($$95, 1), eq($$96, 2001), eq($$97, 1), eq($$98, 1), 
eq($$99, "ford"))) [cardinality: 0.0, op-cost: 0.0, total-cost: 0.0]
+        -- STREAM_SELECT  |PARTITIONED|
+          project ([$$99, $$98, $$97, $$96, $$95]) [cardinality: 0.0, op-cost: 
0.0, total-cost: 0.0]
+          -- STREAM_PROJECT  |PARTITIONED|
+            assign [$$99, $$98, $$97, $$96, $$95] <- 
[string-default-null($$m.getField("company")), 
int64-default-null($$m.getField("day")), 
int64-default-null($$m.getField("month")), 
int64-default-null($$m.getField("year")), 
int64-default-null($$m.getField("customer_id"))] [cardinality: 0.0, op-cost: 
0.0, total-cost: 0.0]
+            -- ASSIGN  |PARTITIONED|
+              exchange [cardinality: 0.0, op-cost: 0.0, total-cost: 0.0]
+              -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
+                data-scan []<-[$$m] <- test.maintenance prefix-filter on: 
and(eq(int64-default-null($$m.getField("customer_id")), 1), 
eq(int64-default-null($$m.getField("year")), 2001), 
eq(int64-default-null($$m.getField("month")), 1), 
eq(int64-default-null($$m.getField("day")), 1), 
eq(string-default-null($$m.getField("company")), "ford")) embed-filter-value: 
true [cardinality: 0.0, op-cost: 0.0, total-cost: 0.0]
+                -- DATASOURCE_SCAN  |PARTITIONED|
+                  exchange [cardinality: 0.0, op-cost: 0.0, total-cost: 0.0]
+                  -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
+                    empty-tuple-source [cardinality: 0.0, op-cost: 0.0, 
total-cost: 0.0]
+                    -- EMPTY_TUPLE_SOURCE  |PARTITIONED|
\ No newline at end of file
diff --git 
a/asterixdb/asterix-app/src/test/resources/runtimets/results/external-dataset/common/dynamic-prefixes/views/result.003.adm
 
b/asterixdb/asterix-app/src/test/resources/runtimets/results/external-dataset/common/dynamic-prefixes/views/result.003.adm
new file mode 100644
index 0000000000..573541ac97
--- /dev/null
+++ 
b/asterixdb/asterix-app/src/test/resources/runtimets/results/external-dataset/common/dynamic-prefixes/views/result.003.adm
@@ -0,0 +1 @@
+0
diff --git 
a/asterixdb/asterix-app/src/test/resources/runtimets/results/external-dataset/common/dynamic-prefixes/views/result.004.adm
 
b/asterixdb/asterix-app/src/test/resources/runtimets/results/external-dataset/common/dynamic-prefixes/views/result.004.adm
new file mode 100644
index 0000000000..f7cba8ac63
--- /dev/null
+++ 
b/asterixdb/asterix-app/src/test/resources/runtimets/results/external-dataset/common/dynamic-prefixes/views/result.004.adm
@@ -0,0 +1,22 @@
+distribute result [$$62] [cardinality: 0.0, op-cost: 0.0, total-cost: 0.0]
+-- DISTRIBUTE_RESULT  |PARTITIONED|
+  exchange [cardinality: 0.0, op-cost: 0.0, total-cost: 0.0]
+  -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
+    project ([$$62]) [cardinality: 0.0, op-cost: 0.0, total-cost: 0.0]
+    -- STREAM_PROJECT  |PARTITIONED|
+      select (and(eq($$62.getField("customerId"), 1), eq($$94, 2001), eq($$95, 
1), eq($$96, 1), eq($$97, "ford"))) [cardinality: 0.0, op-cost: 0.0, 
total-cost: 0.0]
+      -- STREAM_SELECT  |PARTITIONED|
+        project ([$$97, $$96, $$95, $$94, $$62]) [cardinality: 0.0, op-cost: 
0.0, total-cost: 0.0]
+        -- STREAM_PROJECT  |PARTITIONED|
+          assign [$$62] <- [{"customer_id": 
int64-default-null($$m.getField("customer_id")), "year": $$94, "month": $$95, 
"day": $$96, "company": $$97}] [cardinality: 0.0, op-cost: 0.0, total-cost: 0.0]
+          -- ASSIGN  |PARTITIONED|
+            assign [$$97, $$96, $$95, $$94] <- 
[string-default-null($$m.getField("company")), 
int64-default-null($$m.getField("day")), 
int64-default-null($$m.getField("month")), 
int64-default-null($$m.getField("year"))] [cardinality: 0.0, op-cost: 0.0, 
total-cost: 0.0]
+            -- ASSIGN  |PARTITIONED|
+              exchange [cardinality: 0.0, op-cost: 0.0, total-cost: 0.0]
+              -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
+                data-scan []<-[$$m] <- test.maintenance2 prefix-filter on: 
and(eq(int64-default-null($$m.getField("year")), 2001), 
eq(int64-default-null($$m.getField("month")), 1), 
eq(int64-default-null($$m.getField("day")), 1), 
eq(string-default-null($$m.getField("company")), "ford")) embed-filter-value: 
true [cardinality: 0.0, op-cost: 0.0, total-cost: 0.0]
+                -- DATASOURCE_SCAN  |PARTITIONED|
+                  exchange [cardinality: 0.0, op-cost: 0.0, total-cost: 0.0]
+                  -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
+                    empty-tuple-source [cardinality: 0.0, op-cost: 0.0, 
total-cost: 0.0]
+                    -- EMPTY_TUPLE_SOURCE  |PARTITIONED|
diff --git 
a/asterixdb/asterix-app/src/test/resources/runtimets/testsuite_external_dataset_azure_blob_storage.xml
 
b/asterixdb/asterix-app/src/test/resources/runtimets/testsuite_external_dataset_azure_blob_storage.xml
index e10c812484..e252ab29b5 100644
--- 
a/asterixdb/asterix-app/src/test/resources/runtimets/testsuite_external_dataset_azure_blob_storage.xml
+++ 
b/asterixdb/asterix-app/src/test/resources/runtimets/testsuite_external_dataset_azure_blob_storage.xml
@@ -316,6 +316,12 @@
         <expected-error>Unsupported computed field type: 'zft'</expected-error>
       </compilation-unit>
     </test-case>
+    <test-case FilePath="external-dataset/common/dynamic-prefixes">
+      <compilation-unit name="views">
+        <placeholder name="adapter" value="AZUREBLOB" />
+        <output-dir compare="Text">views</output-dir>
+      </compilation-unit>
+    </test-case>
     <!--
     <test-case FilePath="external-dataset/common/dynamic-prefixes/parquet">
       <compilation-unit name="computed-field-segment-pattern-mismatch">
diff --git 
a/asterixdb/asterix-app/src/test/resources/runtimets/testsuite_external_dataset_s3.xml
 
b/asterixdb/asterix-app/src/test/resources/runtimets/testsuite_external_dataset_s3.xml
index fdbb959002..2af4b9f4b6 100644
--- 
a/asterixdb/asterix-app/src/test/resources/runtimets/testsuite_external_dataset_s3.xml
+++ 
b/asterixdb/asterix-app/src/test/resources/runtimets/testsuite_external_dataset_s3.xml
@@ -294,6 +294,12 @@
         <output-dir compare="Text">using-limit</output-dir>
       </compilation-unit>
     </test-case>
+    <test-case FilePath="external-dataset/common/dynamic-prefixes">
+      <compilation-unit name="views">
+        <placeholder name="adapter" value="S3" />
+        <output-dir compare="Text">views</output-dir>
+      </compilation-unit>
+    </test-case>
     <test-case FilePath="external-dataset/common/dynamic-prefixes/parquet">
       <compilation-unit name="one-field">
         <placeholder name="adapter" value="S3" />
@@ -340,6 +346,12 @@
         <output-dir compare="Text">using-limit</output-dir>
       </compilation-unit>
     </test-case>
+    <test-case FilePath="external-dataset/common/dynamic-prefixes/parquet">
+      <compilation-unit name="views">
+        <placeholder name="adapter" value="S3" />
+        <output-dir compare="Text">views</output-dir>
+      </compilation-unit>
+    </test-case>
     <test-case FilePath="external-dataset/common/dynamic-prefixes/csv">
       <compilation-unit name="embed-one-value">
         <placeholder name="adapter" value="S3" />

Reply via email to