>From Ritik Raj <[email protected]>:

Ritik Raj has uploaded this change for review. ( 
https://asterix-gerrit.ics.uci.edu/c/asterixdb/+/20703?usp=email )


Change subject: [ASTERIXDB-3680][STO] Suppress warning for Missing
......................................................................

[ASTERIXDB-3680][STO] Suppress warning for Missing

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

Details:
In case of schema upgrade from MISSING to NON_MISSING,
certain projections can give some warning for MISSING,
which should be supressed because its just natural
course of upgrade.

Ext-ref: MB-69937
Change-Id: I2f63208298a61912509fc671f7bd69d07ded8e2f
---
A 
asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/column/pushdown/ASTERIXDB-3680/ASTERIXDB-3680.001.ddl.sqlpp
A 
asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/column/pushdown/ASTERIXDB-3680/ASTERIXDB-3680.002.update.sqlpp
A 
asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/column/pushdown/ASTERIXDB-3680/ASTERIXDB-3680.003.update.sqlpp
A 
asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/column/pushdown/ASTERIXDB-3680/ASTERIXDB-3680.004.update.sqlpp
A 
asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/column/pushdown/ASTERIXDB-3680/ASTERIXDB-3680.005.query.sqlpp
A 
asterixdb/asterix-app/src/test/resources/runtimets/results/column/pushdown/ASTERIXDB-3680/ASTERIXDB-3680.005.adm
M 
asterixdb/asterix-app/src/test/resources/runtimets/testsuite_single_partition_sqlpp.xml
M 
asterixdb/asterix-column/src/main/java/org/apache/asterix/column/metadata/schema/visitor/SchemaClipperVisitor.java
8 files changed, 127 insertions(+), 0 deletions(-)



  git pull ssh://asterix-gerrit.ics.uci.edu:29418/asterixdb 
refs/changes/03/20703/1

diff --git 
a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/column/pushdown/ASTERIXDB-3680/ASTERIXDB-3680.001.ddl.sqlpp
 
b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/column/pushdown/ASTERIXDB-3680/ASTERIXDB-3680.001.ddl.sqlpp
new file mode 100644
index 0000000..219ca11
--- /dev/null
+++ 
b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/column/pushdown/ASTERIXDB-3680/ASTERIXDB-3680.001.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 test IF EXISTS;
+CREATE DATAVERSE test;
+
+USE test;
+
+CREATE DATASET ColumnDataset PRIMARY KEY (id: String) WITH {
+    "storage-format": {"format" : "column"}
+};
\ No newline at end of file
diff --git 
a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/column/pushdown/ASTERIXDB-3680/ASTERIXDB-3680.002.update.sqlpp
 
b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/column/pushdown/ASTERIXDB-3680/ASTERIXDB-3680.002.update.sqlpp
new file mode 100644
index 0000000..2601cdd
--- /dev/null
+++ 
b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/column/pushdown/ASTERIXDB-3680/ASTERIXDB-3680.002.update.sqlpp
@@ -0,0 +1,22 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+USE test;
+
+UPSERT INTO ColumnDataset({ "id": "1", "a": {  }});
\ No newline at end of file
diff --git 
a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/column/pushdown/ASTERIXDB-3680/ASTERIXDB-3680.003.update.sqlpp
 
b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/column/pushdown/ASTERIXDB-3680/ASTERIXDB-3680.003.update.sqlpp
new file mode 100644
index 0000000..53b2342
--- /dev/null
+++ 
b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/column/pushdown/ASTERIXDB-3680/ASTERIXDB-3680.003.update.sqlpp
@@ -0,0 +1,22 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+USE test;
+
+UPSERT INTO ColumnDataset({ "id": "1", "a": { "c": {} }});
\ No newline at end of file
diff --git 
a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/column/pushdown/ASTERIXDB-3680/ASTERIXDB-3680.004.update.sqlpp
 
b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/column/pushdown/ASTERIXDB-3680/ASTERIXDB-3680.004.update.sqlpp
new file mode 100644
index 0000000..e4875ee
--- /dev/null
+++ 
b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/column/pushdown/ASTERIXDB-3680/ASTERIXDB-3680.004.update.sqlpp
@@ -0,0 +1,22 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+USE test;
+
+UPSERT INTO ColumnDataset({ "id": "1", "a": { "c": 2 }});
\ No newline at end of file
diff --git 
a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/column/pushdown/ASTERIXDB-3680/ASTERIXDB-3680.005.query.sqlpp
 
b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/column/pushdown/ASTERIXDB-3680/ASTERIXDB-3680.005.query.sqlpp
new file mode 100644
index 0000000..bba0070
--- /dev/null
+++ 
b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/column/pushdown/ASTERIXDB-3680/ASTERIXDB-3680.005.query.sqlpp
@@ -0,0 +1,24 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+// param max-warnings:json=2
+
+USE test;
+
+SELECT a.c.f FROM ColumnDataset;
\ No newline at end of file
diff --git 
a/asterixdb/asterix-app/src/test/resources/runtimets/results/column/pushdown/ASTERIXDB-3680/ASTERIXDB-3680.005.adm
 
b/asterixdb/asterix-app/src/test/resources/runtimets/results/column/pushdown/ASTERIXDB-3680/ASTERIXDB-3680.005.adm
new file mode 100644
index 0000000..f7bcb87
--- /dev/null
+++ 
b/asterixdb/asterix-app/src/test/resources/runtimets/results/column/pushdown/ASTERIXDB-3680/ASTERIXDB-3680.005.adm
@@ -0,0 +1 @@
+{  }
\ No newline at end of file
diff --git 
a/asterixdb/asterix-app/src/test/resources/runtimets/testsuite_single_partition_sqlpp.xml
 
b/asterixdb/asterix-app/src/test/resources/runtimets/testsuite_single_partition_sqlpp.xml
index b248475..9deade3 100644
--- 
a/asterixdb/asterix-app/src/test/resources/runtimets/testsuite_single_partition_sqlpp.xml
+++ 
b/asterixdb/asterix-app/src/test/resources/runtimets/testsuite_single_partition_sqlpp.xml
@@ -279,6 +279,12 @@
         <output-dir compare="Text">pushdown/ASTERIXDB-3540</output-dir>
       </compilation-unit>
     </test-case>
+    <test-case FilePath="column" check-warnings="true">
+      <compilation-unit name="pushdown/ASTERIXDB-3680">
+        <output-dir compare="Text">pushdown/ASTERIXDB-3680</output-dir>
+        <expected-warn>ASX0002: Type mismatch: function field-access-by-name 
expects its 1st input parameter to be of type object, but the actual input type 
is bigint (in line 24, at column 11)</expected-warn>
+      </compilation-unit>
+    </test-case>
     <test-case FilePath="column">
       <compilation-unit name="pushdown/heterogeneous-access-pushdown">
         <output-dir 
compare="Text">pushdown/heterogeneous-access-pushdown</output-dir>
diff --git 
a/asterixdb/asterix-column/src/main/java/org/apache/asterix/column/metadata/schema/visitor/SchemaClipperVisitor.java
 
b/asterixdb/asterix-column/src/main/java/org/apache/asterix/column/metadata/schema/visitor/SchemaClipperVisitor.java
index ff05568..94032ce 100644
--- 
a/asterixdb/asterix-column/src/main/java/org/apache/asterix/column/metadata/schema/visitor/SchemaClipperVisitor.java
+++ 
b/asterixdb/asterix-column/src/main/java/org/apache/asterix/column/metadata/schema/visitor/SchemaClipperVisitor.java
@@ -158,6 +158,9 @@

     private boolean notInUnion(IAType requestedType, UnionSchemaNode 
unionNode) {
         for (AbstractSchemaNode unionChildNode : 
unionNode.getChildren().values()) {
+            if (unionChildNode.getTypeTag() == ATypeTag.MISSING) {
+                continue;
+            }
             warn(requestedType, unionChildNode);
         }
         return 
!unionNode.getChildren().containsKey(requestedType.getTypeTag());

--
To view, visit https://asterix-gerrit.ics.uci.edu/c/asterixdb/+/20703?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://asterix-gerrit.ics.uci.edu/settings?usp=email

Gerrit-MessageType: newchange
Gerrit-Project: asterixdb
Gerrit-Branch: master
Gerrit-Change-Id: I2f63208298a61912509fc671f7bd69d07ded8e2f
Gerrit-Change-Number: 20703
Gerrit-PatchSet: 1
Gerrit-Owner: Ritik Raj <[email protected]>

Reply via email to