You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@asterixdb.apache.org by ht...@apache.org on 2023/11/09 21:45:51 UTC

(asterixdb) branch master updated (11bd6f6430 -> e2fbccbd7a)

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

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


    from 11bd6f6430 [ASTERIXDB-3302][COMP] Compilation error when creating index
     new 8149d01b42 [ASTERIXDB-3301][COMP] NPE for subquery with only SELECT ELEMENT
     new 0861f9034f Merge branch 'gerrit/neo' into 'gerrit/trinity'
     new 210349710a [NO ISSUE]: Only include written bytes when reporting write IO
     new e2fbccbd7a Merge branch 'trinity' into 'master'

The 4 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .../translator/LangExpressionToPlanTranslator.java |  2 +-
 .../SqlppExpressionToPlanTranslator.java           |  8 +++++--
 .../select_element/select_element.01.ddl.sqlpp     | 28 ++++++++++++++++++++++
 .../select_element/select_element.02.query.sqlpp   | 24 +++++++++++++++++++
 .../select_element/select_element.03.query.sqlpp   | 24 +++++++++++++++++++
 .../select_element/select_element.04.query.sqlpp   | 24 +++++++++++++++++++
 .../select_element/select_element.05.query.sqlpp   | 24 +++++++++++++++++++
 .../select_element/select_element.06.query.sqlpp   | 24 +++++++++++++++++++
 .../select_element/select_element.07.query.sqlpp   | 23 ++++++++++++++++++
 .../select_element/select_element.08.query.sqlpp   | 23 ++++++++++++++++++
 .../select_element/select_element.09.query.sqlpp   | 23 ++++++++++++++++++
 .../select_element/select_element.10.query.sqlpp   | 23 ++++++++++++++++++
 .../select_element/select_element.11.query.sqlpp   | 23 ++++++++++++++++++
 .../select_element/select_element.12.query.sqlpp   | 24 +++++++++++++++++++
 .../select_element/select_element.13.query.sqlpp   | 23 ++++++++++++++++++
 .../select_element/select_element.14.query.sqlpp   | 24 +++++++++++++++++++
 .../select_element/select_element.15.query.sqlpp   | 23 ++++++++++++++++++
 .../select_element/select_element.16.query.sqlpp   | 24 +++++++++++++++++++
 .../select_element/select_element.17.query.sqlpp   | 24 +++++++++++++++++++
 .../select_element/select_element.99.ddl.sqlpp}    |  0
 .../subquery/select_element/select_element.02.adm  |  3 +++
 .../subquery/select_element/select_element.03.adm  |  3 +++
 .../subquery/select_element/select_element.04.adm  |  3 +++
 .../subquery/select_element/select_element.05.adm  |  3 +++
 .../subquery/select_element/select_element.06.adm  |  3 +++
 .../subquery/select_element/select_element.07.adm  |  3 +++
 .../subquery/select_element/select_element.08.adm  |  3 +++
 .../subquery/select_element/select_element.09.adm  |  3 +++
 .../subquery/select_element/select_element.10.adm  |  3 +++
 .../subquery/select_element/select_element.11.adm  |  3 +++
 .../subquery/select_element/select_element.12.adm  |  3 +++
 .../subquery/select_element/select_element.13.adm  |  3 +++
 .../subquery/select_element/select_element.14.adm  |  3 +++
 .../subquery/select_element/select_element.15.adm  |  3 +++
 .../subquery/select_element/select_element.16.adm  |  3 +++
 .../subquery/select_element/select_element.17.adm  |  3 +++
 .../control/nc/io/profiling/IOCounterProc.java     |  4 +---
 37 files changed, 461 insertions(+), 6 deletions(-)
 create mode 100644 asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/subquery/select_element/select_element.01.ddl.sqlpp
 create mode 100644 asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/subquery/select_element/select_element.02.query.sqlpp
 create mode 100644 asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/subquery/select_element/select_element.03.query.sqlpp
 create mode 100644 asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/subquery/select_element/select_element.04.query.sqlpp
 create mode 100644 asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/subquery/select_element/select_element.05.query.sqlpp
 create mode 100644 asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/subquery/select_element/select_element.06.query.sqlpp
 create mode 100644 asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/subquery/select_element/select_element.07.query.sqlpp
 create mode 100644 asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/subquery/select_element/select_element.08.query.sqlpp
 create mode 100644 asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/subquery/select_element/select_element.09.query.sqlpp
 create mode 100644 asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/subquery/select_element/select_element.10.query.sqlpp
 create mode 100644 asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/subquery/select_element/select_element.11.query.sqlpp
 create mode 100644 asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/subquery/select_element/select_element.12.query.sqlpp
 create mode 100644 asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/subquery/select_element/select_element.13.query.sqlpp
 create mode 100644 asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/subquery/select_element/select_element.14.query.sqlpp
 create mode 100644 asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/subquery/select_element/select_element.15.query.sqlpp
 create mode 100644 asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/subquery/select_element/select_element.16.query.sqlpp
 create mode 100644 asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/subquery/select_element/select_element.17.query.sqlpp
 copy asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/{ddl/analyze-dataset-with-indexes/analyze-dataset-with-indexes.99.ddl.sqlpp => subquery/select_element/select_element.99.ddl.sqlpp} (100%)
 create mode 100644 asterixdb/asterix-app/src/test/resources/runtimets/results/subquery/select_element/select_element.02.adm
 create mode 100644 asterixdb/asterix-app/src/test/resources/runtimets/results/subquery/select_element/select_element.03.adm
 create mode 100644 asterixdb/asterix-app/src/test/resources/runtimets/results/subquery/select_element/select_element.04.adm
 create mode 100644 asterixdb/asterix-app/src/test/resources/runtimets/results/subquery/select_element/select_element.05.adm
 create mode 100644 asterixdb/asterix-app/src/test/resources/runtimets/results/subquery/select_element/select_element.06.adm
 create mode 100644 asterixdb/asterix-app/src/test/resources/runtimets/results/subquery/select_element/select_element.07.adm
 create mode 100644 asterixdb/asterix-app/src/test/resources/runtimets/results/subquery/select_element/select_element.08.adm
 create mode 100644 asterixdb/asterix-app/src/test/resources/runtimets/results/subquery/select_element/select_element.09.adm
 create mode 100644 asterixdb/asterix-app/src/test/resources/runtimets/results/subquery/select_element/select_element.10.adm
 create mode 100644 asterixdb/asterix-app/src/test/resources/runtimets/results/subquery/select_element/select_element.11.adm
 create mode 100644 asterixdb/asterix-app/src/test/resources/runtimets/results/subquery/select_element/select_element.12.adm
 create mode 100644 asterixdb/asterix-app/src/test/resources/runtimets/results/subquery/select_element/select_element.13.adm
 create mode 100644 asterixdb/asterix-app/src/test/resources/runtimets/results/subquery/select_element/select_element.14.adm
 create mode 100644 asterixdb/asterix-app/src/test/resources/runtimets/results/subquery/select_element/select_element.15.adm
 create mode 100644 asterixdb/asterix-app/src/test/resources/runtimets/results/subquery/select_element/select_element.16.adm
 create mode 100644 asterixdb/asterix-app/src/test/resources/runtimets/results/subquery/select_element/select_element.17.adm


(asterixdb) 03/04: [NO ISSUE]: Only include written bytes when reporting write IO

Posted by ht...@apache.org.
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

commit 210349710ae555815d57bcde55ff027df49bded9
Author: Hussain Towaileb <Hu...@couchbase.com>
AuthorDate: Thu Nov 9 10:12:03 2023 +0300

    [NO ISSUE]: Only include written bytes when reporting write IO
    
    Change-Id: Ic4df1d055a2a101b6951ab8a18a72596f4b9c487
    Reviewed-on: https://asterix-gerrit.ics.uci.edu/c/asterixdb/+/17937
    Integration-Tests: Jenkins <je...@fulliautomatix.ics.uci.edu>
    Reviewed-by: Murtadha Hubail <mh...@apache.org>
    Reviewed-by: Michael Blow <mb...@apache.org>
    Tested-by: Michael Blow <mb...@apache.org>
---
 .../org/apache/hyracks/control/nc/io/profiling/IOCounterProc.java     | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/hyracks-fullstack/hyracks/hyracks-control/hyracks-control-nc/src/main/java/org/apache/hyracks/control/nc/io/profiling/IOCounterProc.java b/hyracks-fullstack/hyracks/hyracks-control/hyracks-control-nc/src/main/java/org/apache/hyracks/control/nc/io/profiling/IOCounterProc.java
index 88822714a7..fe84ee792c 100644
--- a/hyracks-fullstack/hyracks/hyracks-control/hyracks-control-nc/src/main/java/org/apache/hyracks/control/nc/io/profiling/IOCounterProc.java
+++ b/hyracks-fullstack/hyracks/hyracks-control/hyracks-control-nc/src/main/java/org/apache/hyracks/control/nc/io/profiling/IOCounterProc.java
@@ -50,9 +50,7 @@ public class IOCounterProc extends IOCounterCache<List<String>> {
     public long getWrites() {
         try {
             List<String> rows = getInfo();
-            long writes = extractRow(rows, 5);
-            long cancelledWrites = extractRow(rows, 6);
-            return writes - cancelledWrites;
+            return extractRow(rows, 5);
         } catch (Exception e) {
             LOGGER.log(failureCount++ > 0 ? Level.DEBUG : Level.WARN, "Failure getting writes", e);
             return IOCounterDefault.IO_COUNTER_UNAVAILABLE;


(asterixdb) 02/04: Merge branch 'gerrit/neo' into 'gerrit/trinity'

Posted by ht...@apache.org.
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

commit 0861f9034f561b00f4c0c18376b2a78f7ed5e257
Merge: 4d9c68ead7 8149d01b42
Author: Michael Blow <mi...@couchbase.com>
AuthorDate: Thu Nov 9 00:17:13 2023 -0500

    Merge branch 'gerrit/neo' into 'gerrit/trinity'
    
    Change-Id: Ic17d2a435ace3237ae98dbfd8d21d5d1d293d56e

 .../translator/LangExpressionToPlanTranslator.java |  2 +-
 .../SqlppExpressionToPlanTranslator.java           |  8 +++++--
 .../select_element/select_element.01.ddl.sqlpp     | 28 ++++++++++++++++++++++
 .../select_element/select_element.02.query.sqlpp   | 24 +++++++++++++++++++
 .../select_element/select_element.03.query.sqlpp   | 24 +++++++++++++++++++
 .../select_element/select_element.04.query.sqlpp   | 24 +++++++++++++++++++
 .../select_element/select_element.05.query.sqlpp   | 24 +++++++++++++++++++
 .../select_element/select_element.06.query.sqlpp   | 24 +++++++++++++++++++
 .../select_element/select_element.07.query.sqlpp   | 23 ++++++++++++++++++
 .../select_element/select_element.08.query.sqlpp   | 23 ++++++++++++++++++
 .../select_element/select_element.09.query.sqlpp   | 23 ++++++++++++++++++
 .../select_element/select_element.10.query.sqlpp   | 23 ++++++++++++++++++
 .../select_element/select_element.11.query.sqlpp   | 23 ++++++++++++++++++
 .../select_element/select_element.12.query.sqlpp   | 24 +++++++++++++++++++
 .../select_element/select_element.13.query.sqlpp   | 23 ++++++++++++++++++
 .../select_element/select_element.14.query.sqlpp   | 24 +++++++++++++++++++
 .../select_element/select_element.15.query.sqlpp   | 23 ++++++++++++++++++
 .../select_element/select_element.16.query.sqlpp   | 24 +++++++++++++++++++
 .../select_element/select_element.17.query.sqlpp   | 24 +++++++++++++++++++
 .../select_element/select_element.99.ddl.sqlpp     | 20 ++++++++++++++++
 .../subquery/select_element/select_element.02.adm  |  3 +++
 .../subquery/select_element/select_element.03.adm  |  3 +++
 .../subquery/select_element/select_element.04.adm  |  3 +++
 .../subquery/select_element/select_element.05.adm  |  3 +++
 .../subquery/select_element/select_element.06.adm  |  3 +++
 .../subquery/select_element/select_element.07.adm  |  3 +++
 .../subquery/select_element/select_element.08.adm  |  3 +++
 .../subquery/select_element/select_element.09.adm  |  3 +++
 .../subquery/select_element/select_element.10.adm  |  3 +++
 .../subquery/select_element/select_element.11.adm  |  3 +++
 .../subquery/select_element/select_element.12.adm  |  3 +++
 .../subquery/select_element/select_element.13.adm  |  3 +++
 .../subquery/select_element/select_element.14.adm  |  3 +++
 .../subquery/select_element/select_element.15.adm  |  3 +++
 .../subquery/select_element/select_element.16.adm  |  3 +++
 .../subquery/select_element/select_element.17.adm  |  3 +++
 .../test/resources/runtimets/testsuite_sqlpp.xml   |  5 ++++
 37 files changed, 485 insertions(+), 3 deletions(-)



(asterixdb) 01/04: [ASTERIXDB-3301][COMP] NPE for subquery with only SELECT ELEMENT

Posted by ht...@apache.org.
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

commit 8149d01b423192c8aa9487ae1e62094fd3f93e22
Author: Ali Alsuliman <al...@gmail.com>
AuthorDate: Tue Nov 7 10:55:03 2023 -0800

    [ASTERIXDB-3301][COMP] NPE for subquery with only SELECT ELEMENT
    
    - user model changes: no
    - storage format changes: no
    - interface changes: no
    
    Details:
    When a subquery consists of only SELECT ELEMENT, a NullPointerException
    is encountered. The exception is due to the fact that the base/input
    operator for the SUBPLAN of the subquery starts with a 'null' op that
    gets replaced by a NTS op later after translating the subquery. This
    works fine, but when the subquery is only a SELECT ELEMENT
    expression, there are no intermediate operators translated and therefore
    the root op of the subplan tries to reference the input op directly which
    is 'null' at the time.
    
    Change-Id: I5b314c014798daf4890f75998138954e3d858445
    Reviewed-on: https://asterix-gerrit.ics.uci.edu/c/asterixdb/+/17928
    Integration-Tests: Jenkins <je...@fulliautomatix.ics.uci.edu>
    Reviewed-by: Wail Alkowaileet <wa...@gmail.com>
    Tested-by: Jenkins <je...@fulliautomatix.ics.uci.edu>
---
 .../translator/LangExpressionToPlanTranslator.java |  2 +-
 .../SqlppExpressionToPlanTranslator.java           |  8 +++++--
 .../select_element/select_element.01.ddl.sqlpp     | 28 ++++++++++++++++++++++
 .../select_element/select_element.02.query.sqlpp   | 24 +++++++++++++++++++
 .../select_element/select_element.03.query.sqlpp   | 24 +++++++++++++++++++
 .../select_element/select_element.04.query.sqlpp   | 24 +++++++++++++++++++
 .../select_element/select_element.05.query.sqlpp   | 24 +++++++++++++++++++
 .../select_element/select_element.06.query.sqlpp   | 24 +++++++++++++++++++
 .../select_element/select_element.07.query.sqlpp   | 23 ++++++++++++++++++
 .../select_element/select_element.08.query.sqlpp   | 23 ++++++++++++++++++
 .../select_element/select_element.09.query.sqlpp   | 23 ++++++++++++++++++
 .../select_element/select_element.10.query.sqlpp   | 23 ++++++++++++++++++
 .../select_element/select_element.11.query.sqlpp   | 23 ++++++++++++++++++
 .../select_element/select_element.12.query.sqlpp   | 24 +++++++++++++++++++
 .../select_element/select_element.13.query.sqlpp   | 23 ++++++++++++++++++
 .../select_element/select_element.14.query.sqlpp   | 24 +++++++++++++++++++
 .../select_element/select_element.15.query.sqlpp   | 23 ++++++++++++++++++
 .../select_element/select_element.16.query.sqlpp   | 24 +++++++++++++++++++
 .../select_element/select_element.17.query.sqlpp   | 24 +++++++++++++++++++
 .../select_element/select_element.99.ddl.sqlpp     | 20 ++++++++++++++++
 .../subquery/select_element/select_element.02.adm  |  3 +++
 .../subquery/select_element/select_element.03.adm  |  3 +++
 .../subquery/select_element/select_element.04.adm  |  3 +++
 .../subquery/select_element/select_element.05.adm  |  3 +++
 .../subquery/select_element/select_element.06.adm  |  3 +++
 .../subquery/select_element/select_element.07.adm  |  3 +++
 .../subquery/select_element/select_element.08.adm  |  3 +++
 .../subquery/select_element/select_element.09.adm  |  3 +++
 .../subquery/select_element/select_element.10.adm  |  3 +++
 .../subquery/select_element/select_element.11.adm  |  3 +++
 .../subquery/select_element/select_element.12.adm  |  3 +++
 .../subquery/select_element/select_element.13.adm  |  3 +++
 .../subquery/select_element/select_element.14.adm  |  3 +++
 .../subquery/select_element/select_element.15.adm  |  3 +++
 .../subquery/select_element/select_element.16.adm  |  3 +++
 .../subquery/select_element/select_element.17.adm  |  3 +++
 .../test/resources/runtimets/testsuite_sqlpp.xml   |  5 ++++
 37 files changed, 485 insertions(+), 3 deletions(-)

diff --git a/asterixdb/asterix-algebra/src/main/java/org/apache/asterix/translator/LangExpressionToPlanTranslator.java b/asterixdb/asterix-algebra/src/main/java/org/apache/asterix/translator/LangExpressionToPlanTranslator.java
index daa1d2f7fb..dabe327f7a 100644
--- a/asterixdb/asterix-algebra/src/main/java/org/apache/asterix/translator/LangExpressionToPlanTranslator.java
+++ b/asterixdb/asterix-algebra/src/main/java/org/apache/asterix/translator/LangExpressionToPlanTranslator.java
@@ -1776,7 +1776,7 @@ abstract class LangExpressionToPlanTranslator
 
     protected Pair<ILogicalOperator, LogicalVariable> aggListifyForSubquery(LogicalVariable var,
             Mutable<ILogicalOperator> opRef, boolean bProject) {
-        SourceLocation sourceLoc = opRef.getValue().getSourceLocation();
+        SourceLocation sourceLoc = opRef.getValue() != null ? opRef.getValue().getSourceLocation() : null;
         AggregateFunctionCallExpression funAgg =
                 BuiltinFunctions.makeAggregateFunctionExpression(BuiltinFunctions.LISTIFY, new ArrayList<>());
         funAgg.getArguments().add(new MutableObject<>(new VariableReferenceExpression(var)));
diff --git a/asterixdb/asterix-algebra/src/main/java/org/apache/asterix/translator/SqlppExpressionToPlanTranslator.java b/asterixdb/asterix-algebra/src/main/java/org/apache/asterix/translator/SqlppExpressionToPlanTranslator.java
index ddabaa0934..1d9c57bbf3 100644
--- a/asterixdb/asterix-algebra/src/main/java/org/apache/asterix/translator/SqlppExpressionToPlanTranslator.java
+++ b/asterixdb/asterix-algebra/src/main/java/org/apache/asterix/translator/SqlppExpressionToPlanTranslator.java
@@ -206,7 +206,9 @@ public class SqlppExpressionToPlanTranslator extends LangExpressionToPlanTransla
         }
         Pair<ILogicalOperator, LogicalVariable> select =
                 selectExpression.getSelectSetOperation().accept(this, currentOpRef);
-        currentOpRef = new MutableObject<>(select.first);
+        if (select.first != null) {
+            currentOpRef = new MutableObject<>(select.first);
+        }
         if (selectExpression.hasOrderby()) {
             currentOpRef = new MutableObject<>(selectExpression.getOrderbyClause().accept(this, currentOpRef).first);
         }
@@ -768,7 +770,9 @@ public class SqlppExpressionToPlanTranslator extends LangExpressionToPlanTransla
         } else {
             ProjectOperator pr = new ProjectOperator(resVar);
             pr.getInputs().add(returnOpRef);
-            pr.setSourceLocation(returnOpRef.getValue().getSourceLocation());
+            if (returnOpRef.getValue() != null) {
+                pr.setSourceLocation(returnOpRef.getValue().getSourceLocation());
+            }
             return new Pair<>(pr, resVar);
         }
     }
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/subquery/select_element/select_element.01.ddl.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/subquery/select_element/select_element.01.ddl.sqlpp
new file mode 100644
index 0000000000..e3c9e55416
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/subquery/select_element/select_element.01.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 test IF EXISTS;
+CREATE DATAVERSE test;
+USE test;
+
+CREATE OR REPLACE FUNCTION `fun0` (data) { data + 1 };
+CREATE OR REPLACE FUNCTION `fun1` (data) { ( SELECT RAW data ) };
+CREATE OR REPLACE FUNCTION `fun2` (data) { ( SELECT RAW (SELECT RAW data) ) };
+CREATE OR REPLACE FUNCTION `fun3` (data) { ( SELECT data ) };
+CREATE OR REPLACE FUNCTION `fun4` (data) { ( SELECT (SELECT data) AS x) };
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/subquery/select_element/select_element.02.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/subquery/select_element/select_element.02.query.sqlpp
new file mode 100644
index 0000000000..0a298b23f6
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/subquery/select_element/select_element.02.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.
+ */
+
+USE test;
+
+FROM [1,2,3] a
+LET test = fun0(a)
+SELECT a, test;
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/subquery/select_element/select_element.03.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/subquery/select_element/select_element.03.query.sqlpp
new file mode 100644
index 0000000000..d4c60c9fb8
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/subquery/select_element/select_element.03.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.
+ */
+
+USE test;
+
+FROM [1,2,3] a
+LET test = fun1(a)
+SELECT a, test;
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/subquery/select_element/select_element.04.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/subquery/select_element/select_element.04.query.sqlpp
new file mode 100644
index 0000000000..7dc96f05b1
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/subquery/select_element/select_element.04.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.
+ */
+
+USE test;
+
+FROM [1,2,3] a
+LET test = fun2(a)
+SELECT a, test;
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/subquery/select_element/select_element.05.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/subquery/select_element/select_element.05.query.sqlpp
new file mode 100644
index 0000000000..4e579706e8
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/subquery/select_element/select_element.05.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.
+ */
+
+USE test;
+
+FROM [1,2,3] a
+LET test = fun3(a)
+SELECT a, test;
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/subquery/select_element/select_element.06.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/subquery/select_element/select_element.06.query.sqlpp
new file mode 100644
index 0000000000..fc0402b2af
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/subquery/select_element/select_element.06.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.
+ */
+
+USE test;
+
+FROM [1,2,3] a
+LET test = fun4(a)
+SELECT a, test;
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/subquery/select_element/select_element.07.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/subquery/select_element/select_element.07.query.sqlpp
new file mode 100644
index 0000000000..60faeb8842
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/subquery/select_element/select_element.07.query.sqlpp
@@ -0,0 +1,23 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+USE test;
+
+FROM [1,2,3] a
+SELECT a, fun0(a);
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/subquery/select_element/select_element.08.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/subquery/select_element/select_element.08.query.sqlpp
new file mode 100644
index 0000000000..6d470c7248
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/subquery/select_element/select_element.08.query.sqlpp
@@ -0,0 +1,23 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+USE test;
+
+FROM [1,2,3] a
+SELECT a, fun1(a);
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/subquery/select_element/select_element.09.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/subquery/select_element/select_element.09.query.sqlpp
new file mode 100644
index 0000000000..7c9637016f
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/subquery/select_element/select_element.09.query.sqlpp
@@ -0,0 +1,23 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+USE test;
+
+FROM [1,2,3] a
+SELECT a, fun2(a);
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/subquery/select_element/select_element.10.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/subquery/select_element/select_element.10.query.sqlpp
new file mode 100644
index 0000000000..975b7088e8
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/subquery/select_element/select_element.10.query.sqlpp
@@ -0,0 +1,23 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+USE test;
+
+FROM [1,2,3] a
+SELECT a, fun3(a);
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/subquery/select_element/select_element.11.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/subquery/select_element/select_element.11.query.sqlpp
new file mode 100644
index 0000000000..fc50baa7ff
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/subquery/select_element/select_element.11.query.sqlpp
@@ -0,0 +1,23 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+USE test;
+
+FROM [1,2,3] a
+SELECT a, fun4(a);
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/subquery/select_element/select_element.12.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/subquery/select_element/select_element.12.query.sqlpp
new file mode 100644
index 0000000000..0c3dc54fdc
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/subquery/select_element/select_element.12.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.
+ */
+
+USE test;
+
+FROM [1,2,3] a
+LET test = (SELECT RAW a)
+SELECT a, test;
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/subquery/select_element/select_element.13.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/subquery/select_element/select_element.13.query.sqlpp
new file mode 100644
index 0000000000..54e82fde50
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/subquery/select_element/select_element.13.query.sqlpp
@@ -0,0 +1,23 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+USE test;
+
+FROM [1,2,3] a
+SELECT a, (SELECT RAW a);
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/subquery/select_element/select_element.14.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/subquery/select_element/select_element.14.query.sqlpp
new file mode 100644
index 0000000000..4bc8a67f73
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/subquery/select_element/select_element.14.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.
+ */
+
+USE test;
+
+FROM [1,2,3] a
+LET test = ( SELECT RAW (SELECT RAW a) )
+SELECT a, test;
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/subquery/select_element/select_element.15.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/subquery/select_element/select_element.15.query.sqlpp
new file mode 100644
index 0000000000..cfa7a65e8e
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/subquery/select_element/select_element.15.query.sqlpp
@@ -0,0 +1,23 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+USE test;
+
+FROM [1,2,3] a
+SELECT a, ( SELECT RAW (SELECT RAW a) );
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/subquery/select_element/select_element.16.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/subquery/select_element/select_element.16.query.sqlpp
new file mode 100644
index 0000000000..978b6cb198
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/subquery/select_element/select_element.16.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.
+ */
+
+USE test;
+
+FROM [1,2,3] a
+LET test = ( (LET x = 6 SELECT RAW a+x) )
+SELECT a, test;
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/subquery/select_element/select_element.17.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/subquery/select_element/select_element.17.query.sqlpp
new file mode 100644
index 0000000000..392da0995c
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/subquery/select_element/select_element.17.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.
+ */
+
+USE test;
+
+FROM [1,2,3] a
+LET test = ( (LET x = random() SELECT RAW a+x) )
+SELECT a, floor(test[0]);
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/subquery/select_element/select_element.99.ddl.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/subquery/select_element/select_element.99.ddl.sqlpp
new file mode 100644
index 0000000000..36b2bab543
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/subquery/select_element/select_element.99.ddl.sqlpp
@@ -0,0 +1,20 @@
+/*
+ * 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;
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/subquery/select_element/select_element.02.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/subquery/select_element/select_element.02.adm
new file mode 100644
index 0000000000..f6fb5bde61
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/subquery/select_element/select_element.02.adm
@@ -0,0 +1,3 @@
+{ "a": 1, "test": 2 }
+{ "a": 2, "test": 3 }
+{ "a": 3, "test": 4 }
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/subquery/select_element/select_element.03.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/subquery/select_element/select_element.03.adm
new file mode 100644
index 0000000000..ea413fe5f7
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/subquery/select_element/select_element.03.adm
@@ -0,0 +1,3 @@
+{ "a": 1, "test": [ 1 ] }
+{ "a": 2, "test": [ 2 ] }
+{ "a": 3, "test": [ 3 ] }
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/subquery/select_element/select_element.04.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/subquery/select_element/select_element.04.adm
new file mode 100644
index 0000000000..2cf7df3a71
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/subquery/select_element/select_element.04.adm
@@ -0,0 +1,3 @@
+{ "a": 1, "test": [ [ 1 ] ] }
+{ "a": 2, "test": [ [ 2 ] ] }
+{ "a": 3, "test": [ [ 3 ] ] }
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/subquery/select_element/select_element.05.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/subquery/select_element/select_element.05.adm
new file mode 100644
index 0000000000..59b19361b0
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/subquery/select_element/select_element.05.adm
@@ -0,0 +1,3 @@
+{ "a": 1, "test": [ { "data": 1 } ] }
+{ "a": 2, "test": [ { "data": 2 } ] }
+{ "a": 3, "test": [ { "data": 3 } ] }
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/subquery/select_element/select_element.06.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/subquery/select_element/select_element.06.adm
new file mode 100644
index 0000000000..3eed37c682
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/subquery/select_element/select_element.06.adm
@@ -0,0 +1,3 @@
+{ "a": 1, "test": [ { "x": [ { "data": 1 } ] } ] }
+{ "a": 2, "test": [ { "x": [ { "data": 2 } ] } ] }
+{ "a": 3, "test": [ { "x": [ { "data": 3 } ] } ] }
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/subquery/select_element/select_element.07.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/subquery/select_element/select_element.07.adm
new file mode 100644
index 0000000000..944e5a2de7
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/subquery/select_element/select_element.07.adm
@@ -0,0 +1,3 @@
+{ "a": 1, "$1": 2 }
+{ "a": 2, "$1": 3 }
+{ "a": 3, "$1": 4 }
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/subquery/select_element/select_element.08.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/subquery/select_element/select_element.08.adm
new file mode 100644
index 0000000000..c8f629ba0e
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/subquery/select_element/select_element.08.adm
@@ -0,0 +1,3 @@
+{ "a": 1, "$1": [ 1 ] }
+{ "a": 2, "$1": [ 2 ] }
+{ "a": 3, "$1": [ 3 ] }
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/subquery/select_element/select_element.09.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/subquery/select_element/select_element.09.adm
new file mode 100644
index 0000000000..325d24fef4
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/subquery/select_element/select_element.09.adm
@@ -0,0 +1,3 @@
+{ "a": 1, "$1": [ [ 1 ] ] }
+{ "a": 2, "$1": [ [ 2 ] ] }
+{ "a": 3, "$1": [ [ 3 ] ] }
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/subquery/select_element/select_element.10.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/subquery/select_element/select_element.10.adm
new file mode 100644
index 0000000000..a5ef5cd748
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/subquery/select_element/select_element.10.adm
@@ -0,0 +1,3 @@
+{ "a": 1, "$1": [ { "data": 1 } ] }
+{ "a": 2, "$1": [ { "data": 2 } ] }
+{ "a": 3, "$1": [ { "data": 3 } ] }
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/subquery/select_element/select_element.11.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/subquery/select_element/select_element.11.adm
new file mode 100644
index 0000000000..1936e656e9
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/subquery/select_element/select_element.11.adm
@@ -0,0 +1,3 @@
+{ "a": 1, "$1": [ { "x": [ { "data": 1 } ] } ] }
+{ "a": 2, "$1": [ { "x": [ { "data": 2 } ] } ] }
+{ "a": 3, "$1": [ { "x": [ { "data": 3 } ] } ] }
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/subquery/select_element/select_element.12.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/subquery/select_element/select_element.12.adm
new file mode 100644
index 0000000000..ea413fe5f7
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/subquery/select_element/select_element.12.adm
@@ -0,0 +1,3 @@
+{ "a": 1, "test": [ 1 ] }
+{ "a": 2, "test": [ 2 ] }
+{ "a": 3, "test": [ 3 ] }
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/subquery/select_element/select_element.13.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/subquery/select_element/select_element.13.adm
new file mode 100644
index 0000000000..c8f629ba0e
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/subquery/select_element/select_element.13.adm
@@ -0,0 +1,3 @@
+{ "a": 1, "$1": [ 1 ] }
+{ "a": 2, "$1": [ 2 ] }
+{ "a": 3, "$1": [ 3 ] }
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/subquery/select_element/select_element.14.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/subquery/select_element/select_element.14.adm
new file mode 100644
index 0000000000..2cf7df3a71
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/subquery/select_element/select_element.14.adm
@@ -0,0 +1,3 @@
+{ "a": 1, "test": [ [ 1 ] ] }
+{ "a": 2, "test": [ [ 2 ] ] }
+{ "a": 3, "test": [ [ 3 ] ] }
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/subquery/select_element/select_element.15.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/subquery/select_element/select_element.15.adm
new file mode 100644
index 0000000000..325d24fef4
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/subquery/select_element/select_element.15.adm
@@ -0,0 +1,3 @@
+{ "a": 1, "$1": [ [ 1 ] ] }
+{ "a": 2, "$1": [ [ 2 ] ] }
+{ "a": 3, "$1": [ [ 3 ] ] }
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/subquery/select_element/select_element.16.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/subquery/select_element/select_element.16.adm
new file mode 100644
index 0000000000..0f584e9821
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/subquery/select_element/select_element.16.adm
@@ -0,0 +1,3 @@
+{ "a": 1, "test": [ 7 ] }
+{ "a": 2, "test": [ 8 ] }
+{ "a": 3, "test": [ 9 ] }
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/subquery/select_element/select_element.17.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/subquery/select_element/select_element.17.adm
new file mode 100644
index 0000000000..74fd97fb7c
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/subquery/select_element/select_element.17.adm
@@ -0,0 +1,3 @@
+{ "a": 1, "$1": 1.0 }
+{ "a": 2, "$1": 2.0 }
+{ "a": 3, "$1": 3.0 }
\ No newline at end of file
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 ee5fafb594..0ab9672789 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/testsuite_sqlpp.xml
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/testsuite_sqlpp.xml
@@ -11326,6 +11326,11 @@
     </test-case>
   </test-group>
   <test-group name="subquery">
+    <test-case FilePath="subquery">
+      <compilation-unit name="select_element">
+        <output-dir compare="Text">select_element</output-dir>
+      </compilation-unit>
+    </test-case>
     <test-case FilePath="subquery">
       <compilation-unit name="aggregate_join">
         <output-dir compare="Text">aggregate_join</output-dir>


(asterixdb) 04/04: Merge branch 'trinity' into 'master'

Posted by ht...@apache.org.
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

commit e2fbccbd7a91f08bb5afdfcb922c8669342950d3
Merge: 11bd6f6430 210349710a
Author: Hussain Towaileb <Hu...@couchbase.com>
AuthorDate: Thu Nov 9 22:46:48 2023 +0300

    Merge branch 'trinity' into 'master'
    
    Change-Id: Ia28a0979d62dcd9283784fd36012f51fb54cf0d5

 .../translator/LangExpressionToPlanTranslator.java |  2 +-
 .../SqlppExpressionToPlanTranslator.java           |  8 +++++--
 .../select_element/select_element.01.ddl.sqlpp     | 28 ++++++++++++++++++++++
 .../select_element/select_element.02.query.sqlpp   | 24 +++++++++++++++++++
 .../select_element/select_element.03.query.sqlpp   | 24 +++++++++++++++++++
 .../select_element/select_element.04.query.sqlpp   | 24 +++++++++++++++++++
 .../select_element/select_element.05.query.sqlpp   | 24 +++++++++++++++++++
 .../select_element/select_element.06.query.sqlpp   | 24 +++++++++++++++++++
 .../select_element/select_element.07.query.sqlpp   | 23 ++++++++++++++++++
 .../select_element/select_element.08.query.sqlpp   | 23 ++++++++++++++++++
 .../select_element/select_element.09.query.sqlpp   | 23 ++++++++++++++++++
 .../select_element/select_element.10.query.sqlpp   | 23 ++++++++++++++++++
 .../select_element/select_element.11.query.sqlpp   | 23 ++++++++++++++++++
 .../select_element/select_element.12.query.sqlpp   | 24 +++++++++++++++++++
 .../select_element/select_element.13.query.sqlpp   | 23 ++++++++++++++++++
 .../select_element/select_element.14.query.sqlpp   | 24 +++++++++++++++++++
 .../select_element/select_element.15.query.sqlpp   | 23 ++++++++++++++++++
 .../select_element/select_element.16.query.sqlpp   | 24 +++++++++++++++++++
 .../select_element/select_element.17.query.sqlpp   | 24 +++++++++++++++++++
 .../select_element/select_element.99.ddl.sqlpp     | 20 ++++++++++++++++
 .../subquery/select_element/select_element.02.adm  |  3 +++
 .../subquery/select_element/select_element.03.adm  |  3 +++
 .../subquery/select_element/select_element.04.adm  |  3 +++
 .../subquery/select_element/select_element.05.adm  |  3 +++
 .../subquery/select_element/select_element.06.adm  |  3 +++
 .../subquery/select_element/select_element.07.adm  |  3 +++
 .../subquery/select_element/select_element.08.adm  |  3 +++
 .../subquery/select_element/select_element.09.adm  |  3 +++
 .../subquery/select_element/select_element.10.adm  |  3 +++
 .../subquery/select_element/select_element.11.adm  |  3 +++
 .../subquery/select_element/select_element.12.adm  |  3 +++
 .../subquery/select_element/select_element.13.adm  |  3 +++
 .../subquery/select_element/select_element.14.adm  |  3 +++
 .../subquery/select_element/select_element.15.adm  |  3 +++
 .../subquery/select_element/select_element.16.adm  |  3 +++
 .../subquery/select_element/select_element.17.adm  |  3 +++
 .../control/nc/io/profiling/IOCounterProc.java     |  4 +---
 37 files changed, 481 insertions(+), 6 deletions(-)