[asterixdb] branch master updated: [ASTERIXDB-2987] Fixes the wrong order of record descriptors for spatial and interval joins

2021-11-22 Thread imaxon
This is an automated email from the ASF dual-hosted git repository.

imaxon 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 7fa215b  [ASTERIXDB-2987] Fixes the wrong order of record descriptors 
for spatial and interval joins
7fa215b is described below

commit 7fa215b7692b5b155c31fea04c1a93ca073c73f2
Author: Akil Sevim 
AuthorDate: Fri Nov 19 13:34:17 2021 -0800

[ASTERIXDB-2987] Fixes the wrong order of record descriptors for spatial 
and interval joins

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

Details:

- Fixes the wrong order of record descriptors in optimized spatial and 
interval join which causes empty results when the projected fields from both 
sides does not yield the same schema.
- Adds tests for the corresponding fix

Change-Id: I4f7186459a490beaac08624e7a5cbe09734a82ad
Reviewed-on: https://asterix-gerrit.ics.uci.edu/c/asterixdb/+/14124
Integration-Tests: Jenkins 
Tested-by: Jenkins 
Contrib: Ian Maxon 
Reviewed-by: Ian Maxon 
---
 .../spatial_join_projection_check.1.ddl.sqlpp  | 30 
 .../spatial_join_projection_check.2.update.sqlpp   | 25 
 .../spatial_join_projection_check.3.query.sqlpp| 25 
 .../queries_sqlpp/temporal/TemporalQueries.xml |  5 
 .../interval_join_projection_check.1.ddl.sqlpp | 30 
 .../interval_join_projection_check.2.update.sqlpp  | 33 ++
 .../interval_join_projection_check.3.query.sqlpp   | 25 
 .../spatial_join_projection_check.1.adm|  8 ++
 .../interval_join_projection_check.1.adm   |  8 ++
 .../test/resources/runtimets/testsuite_sqlpp.xml   |  5 
 .../IntervalMergeJoinOperatorDescriptor.java   |  7 +++--
 .../spatial/PlaneSweepJoinOperatorDescriptor.java  |  6 ++--
 12 files changed, 201 insertions(+), 6 deletions(-)

diff --git 
a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/spatial/spatial_join_projection_check/spatial_join_projection_check.1.ddl.sqlpp
 
b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/spatial/spatial_join_projection_check/spatial_join_projection_check.1.ddl.sqlpp
new file mode 100644
index 000..5ba0acb
--- /dev/null
+++ 
b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/spatial/spatial_join_projection_check/spatial_join_projection_check.1.ddl.sqlpp
@@ -0,0 +1,30 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+DROP DATAVERSE test IF EXISTS;
+CREATE DATAVERSE test;
+USE test;
+
+CREATE TYPE RectangleType AS CLOSED {
+id: uuid,
+name: string,
+g: rectangle
+};
+
+CREATE DATASET RectangleDataset(RectangleType) PRIMARY KEY id AUTOGENERATED;
diff --git 
a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/spatial/spatial_join_projection_check/spatial_join_projection_check.2.update.sqlpp
 
b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/spatial/spatial_join_projection_check/spatial_join_projection_check.2.update.sqlpp
new file mode 100644
index 000..1876c09
--- /dev/null
+++ 
b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/spatial/spatial_join_projection_check/spatial_join_projection_check.2.update.sqlpp
@@ -0,0 +1,25 @@
+/*
+ * 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 

[asterixdb] branch master updated: [NO ISSUE][CONF] Make partitions related config visible

2021-11-22 Thread mhubail
This is an automated email from the ASF dual-hosted git repository.

mhubail 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 f65920c  [NO ISSUE][CONF] Make partitions related config visible
f65920c is described below

commit f65920c86679783f074c5371c8a42bf85a9262fe
Author: Murtadha Hubail 
AuthorDate: Mon Nov 22 18:18:36 2021 +0300

[NO ISSUE][CONF] Make partitions related config visible

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

Change-Id: Ia1c6a3a0a6e4ac94351c9ef314482e2f224276c9
Reviewed-on: https://asterix-gerrit.ics.uci.edu/c/asterixdb/+/14163
Integration-Tests: Jenkins 
Tested-by: Jenkins 
Reviewed-by: Michael Blow 
---
 .../src/main/java/org/apache/asterix/common/config/NodeProperties.java  | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git 
a/asterixdb/asterix-common/src/main/java/org/apache/asterix/common/config/NodeProperties.java
 
b/asterixdb/asterix-common/src/main/java/org/apache/asterix/common/config/NodeProperties.java
index a03530d..afb103d 100644
--- 
a/asterixdb/asterix-common/src/main/java/org/apache/asterix/common/config/NodeProperties.java
+++ 
b/asterixdb/asterix-common/src/main/java/org/apache/asterix/common/config/NodeProperties.java
@@ -96,7 +96,7 @@ public class NodeProperties extends AbstractProperties {
 
 @Override
 public boolean hidden() {
-return this == INITIAL_RUN || this == STARTING_PARTITION_ID || 
this == ACTIVE_PARTITIONS;
+return this == INITIAL_RUN;
 }
 
 }


[asterixdb-clients] branch master updated: [NO ISSUE] Remove duplicate customization option

2021-11-22 Thread dlych
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/master by this push:
 new 13ec388  [NO ISSUE] Remove duplicate customization option
13ec388 is described below

commit 13ec3886febcc57c8cd6e6895e3b35a4811f8c2e
Author: Dmitry Lychagin 
AuthorDate: Fri Nov 19 16:29:20 2021 -0800

[NO ISSUE] Remove duplicate customization option

Change-Id: I25f28cb50c1c86a4f64ab0116f95071b5e33120c
Reviewed-on: https://asterix-gerrit.ics.uci.edu/c/asterixdb-clients/+/14146
Reviewed-by: Ian Maxon 
Tested-by: Dmitry Lychagin 
---
 .../asterix-jdbc-taco/src/main/taco/plugins/asterixdb_jdbc/manifest.xml  | 1 -
 1 file changed, 1 deletion(-)

diff --git 
a/asterixdb-jdbc/asterix-jdbc-taco/src/main/taco/plugins/asterixdb_jdbc/manifest.xml
 
b/asterixdb-jdbc/asterix-jdbc-taco/src/main/taco/plugins/asterixdb_jdbc/manifest.xml
index 37e9fda..404c2ed 100644
--- 
a/asterixdb-jdbc/asterix-jdbc-taco/src/main/taco/plugins/asterixdb_jdbc/manifest.xml
+++ 
b/asterixdb-jdbc/asterix-jdbc-taco/src/main/taco/plugins/asterixdb_jdbc/manifest.xml
@@ -66,7 +66,6 @@
   
   
   
-  
   
   
   


[asterixdb] branch master updated: [NO ISSUE][COMP] No subquery coercion in EXISTS clause

2021-11-22 Thread dlych
This is an automated email from the ASF dual-hosted git repository.

dlych 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 6dc0f84  [NO ISSUE][COMP] No subquery coercion in EXISTS clause
6dc0f84 is described below

commit 6dc0f84985fde15017d14b316db2ce2c590c3e15
Author: Dmitry Lychagin 
AuthorDate: Fri Nov 19 14:30:16 2021 -0800

[NO ISSUE][COMP] No subquery coercion in EXISTS clause

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

Details:
- In SQL-compat mode do not perform subquery coecrion
  if the subquery is in EXISTS or NOT EXISTS clause
- Add testscases

Change-Id: If4ae567fc449e5fa6bb040555325f429e8953256
Reviewed-on: https://asterix-gerrit.ics.uci.edu/c/asterixdb/+/14145
Integration-Tests: Jenkins 
Tested-by: Jenkins 
Reviewed-by: Dmitry Lychagin 
Reviewed-by: Ali Alsuliman 
---
 .../subquery_coercion_08_misc.1.query.sqlpp}   |  2 +-
 .../subquery_coercion_08_misc.2.query.sqlpp}   |  4 ++--
 .../subquery_coercion_08_misc.3.query.sqlpp}   |  7 +++
 .../subquery_coercion_08_misc.4.query.sqlpp}   |  7 +++
 .../subquery_coercion_08_misc.1.adm}   |  0
 .../subquery_coercion_08_misc.2.adm|  3 +++
 .../subquery_coercion_08_misc.3.adm|  2 ++
 .../subquery_coercion_08_misc.4.adm|  1 +
 .../src/test/resources/runtimets/testsuite_sqlpp.xml   |  5 +
 .../rewrites/visitor/SqlCompatRewriteVisitor.java  | 18 +-
 10 files changed, 37 insertions(+), 12 deletions(-)

diff --git 
a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/sql-compat/subquery_coercion_07_from/subquery_coercion_07_from.4.query.sqlpp
 
b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/sql-compat/subquery_coercion_08_misc/subquery_coercion_08_misc.1.query.sqlpp
similarity index 96%
copy from 
asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/sql-compat/subquery_coercion_07_from/subquery_coercion_07_from.4.query.sqlpp
copy to 
asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/sql-compat/subquery_coercion_08_misc/subquery_coercion_08_misc.1.query.sqlpp
index 833d06e..689d5d5 100644
--- 
a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/sql-compat/subquery_coercion_07_from/subquery_coercion_07_from.4.query.sqlpp
+++ 
b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/sql-compat/subquery_coercion_08_misc/subquery_coercion_08_misc.1.query.sqlpp
@@ -20,7 +20,7 @@
 /*
  * SQL-compat mode.
  * Test no subquery coercion if the subquery is in the IN clause
- * of a quantified expression
+ * of a quantified expression (SOME)
  */
 
 // requesttype=application/json
diff --git 
a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/sql-compat/subquery_coercion_07_from/subquery_coercion_07_from.4.query.sqlpp
 
b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/sql-compat/subquery_coercion_08_misc/subquery_coercion_08_misc.2.query.sqlpp
similarity index 89%
copy from 
asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/sql-compat/subquery_coercion_07_from/subquery_coercion_07_from.4.query.sqlpp
copy to 
asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/sql-compat/subquery_coercion_08_misc/subquery_coercion_08_misc.2.query.sqlpp
index 833d06e..c96057e 100644
--- 
a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/sql-compat/subquery_coercion_07_from/subquery_coercion_07_from.4.query.sqlpp
+++ 
b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/sql-compat/subquery_coercion_08_misc/subquery_coercion_08_misc.2.query.sqlpp
@@ -20,7 +20,7 @@
 /*
  * SQL-compat mode.
  * Test no subquery coercion if the subquery is in the IN clause
- * of a quantified expression
+ * of a quantified expression (EVERY)
  */
 
 // requesttype=application/json
@@ -28,5 +28,5 @@
 
 select r2.r1
 from (select r1 from range(1, 3) r1) r2
-where some r3 in (select r4 from range(0, 2) r4) satisfies r3.r4 = r2.r1
+where every r3 in (select r4 from range(r2.r1, r2.r1) r4) satisfies r3.r4 = 
r2.r1
 order by r2.r1;
diff --git 
a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/sql-compat/subquery_coercion_07_from/subquery_coercion_07_from.4.query.sqlpp
 
b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/sql-compat/subquery_coercion_08_misc/subquery_coercion_08_misc.3.query.sqlpp
similarity index 80%
copy from 
asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/sql-compat/subquery_coercion_07_from/subquery_coercion_07_from.4.query.sqlpp
copy to 
asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/sql-compat/subquery_coercion_08_misc/subquery_coercion_08_misc.3.query.sqlpp
index 833d06e..01b1b40 

[asterixdb] branch master updated: [NO ISSUE][HYR][MISC] += ThrowingBi[Consumer|Function] ifaces

2021-11-22 Thread dlych
This is an automated email from the ASF dual-hosted git repository.

dlych 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 7cdb65d  [NO ISSUE][HYR][MISC] += ThrowingBi[Consumer|Function] ifaces
7cdb65d is described below

commit 7cdb65de50192b1fc551de9e25b08cc46f030982
Author: Michael Blow 
AuthorDate: Fri Nov 19 07:43:32 2021 -0500

[NO ISSUE][HYR][MISC] += ThrowingBi[Consumer|Function] ifaces

Change-Id: I6c884bc92ef6773bd17d127dc208bd09f5ce6808
Reviewed-on: https://asterix-gerrit.ics.uci.edu/c/asterixdb/+/14144
Integration-Tests: Jenkins 
Tested-by: Jenkins 
Reviewed-by: Michael Blow 
Reviewed-by: Murtadha Hubail 
---
 .../apache/hyracks/util/ThrowingBiConsumer.java| 49 ++
 .../apache/hyracks/util/ThrowingBiFunction.java| 43 +++
 2 files changed, 92 insertions(+)

diff --git 
a/hyracks-fullstack/hyracks/hyracks-util/src/main/java/org/apache/hyracks/util/ThrowingBiConsumer.java
 
b/hyracks-fullstack/hyracks/hyracks-util/src/main/java/org/apache/hyracks/util/ThrowingBiConsumer.java
new file mode 100644
index 000..3d7541b
--- /dev/null
+++ 
b/hyracks-fullstack/hyracks/hyracks-util/src/main/java/org/apache/hyracks/util/ThrowingBiConsumer.java
@@ -0,0 +1,49 @@
+/*
+ * 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.
+ */
+package org.apache.hyracks.util;
+
+import java.util.function.BiConsumer;
+
+import com.google.common.util.concurrent.UncheckedExecutionException;
+
+@FunctionalInterface
+public interface ThrowingBiConsumer {
+void process(L left, R right) throws Exception;
+
+@SuppressWarnings("Duplicates")
+static  BiConsumer asUnchecked(ThrowingBiConsumer 
consumer) {
+return (left, right) -> {
+try {
+consumer.process(left, right);
+} catch (InterruptedException e) {
+Thread.currentThread().interrupt();
+throw new UncheckedExecutionException(e);
+} catch (Exception e) {
+throw new UncheckedExecutionException(e);
+}
+};
+}
+
+static  ThrowingBiFunction 
asFunction(ThrowingBiConsumer consumer) {
+return (p1, p2) -> {
+consumer.process(p1, p2);
+return null;
+};
+}
+}
diff --git 
a/hyracks-fullstack/hyracks/hyracks-util/src/main/java/org/apache/hyracks/util/ThrowingBiFunction.java
 
b/hyracks-fullstack/hyracks/hyracks-util/src/main/java/org/apache/hyracks/util/ThrowingBiFunction.java
new file mode 100644
index 000..b8fdc8b
--- /dev/null
+++ 
b/hyracks-fullstack/hyracks/hyracks-util/src/main/java/org/apache/hyracks/util/ThrowingBiFunction.java
@@ -0,0 +1,43 @@
+/*
+ * 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.
+ */
+package org.apache.hyracks.util;
+
+import java.util.function.BiFunction;
+
+import com.google.common.util.concurrent.UncheckedExecutionException;
+
+@FunctionalInterface
+public interface ThrowingBiFunction {
+R process(I p1, J p2) throws Exception;
+
+@SuppressWarnings("Duplicates")
+static  BiFunction asUnchecked(ThrowingBiFunction function) {
+return (p1, p2) -> {
+try {
+return function.process(p1, p2);
+} catch (InterruptedException e) {
+Thread.currentThread().interrupt();
+throw new