Changeset: 5b5a393e115f for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=5b5a393e115f
Modified Files:
        sql/server/rel_unnest.c
        sql/test/subquery/Tests/subquery5.stable.out
Branch: Jun2020
Log Message:

small fix for any = + other expression


diffs (39 lines):

diff --git a/sql/server/rel_unnest.c b/sql/server/rel_unnest.c
--- a/sql/server/rel_unnest.c
+++ b/sql/server/rel_unnest.c
@@ -2039,7 +2039,7 @@ rewrite_anyequal(mvc *sql, sql_rel *rel,
                                }
                        }
 
-                       if (is_project(rel->op) || depth > 0 || (!is_tuple && 
rsq && rel_has_freevar(sql, rsq) && !is_anyequal(sf))) {
+                       if (is_project(rel->op) || (is_select(rel->op) && 
(depth > 0 || (!is_tuple && rsq && rel_has_freevar(sql, rsq) && 
!is_anyequal(sf))))) {
                                list *exps = NULL;
                                sql_exp *rid, *lid, *a = NULL;
                                sql_rel *sq = lsq;
diff --git a/sql/test/subquery/Tests/subquery5.stable.out 
b/sql/test/subquery/Tests/subquery5.stable.out
--- a/sql/test/subquery/Tests/subquery5.stable.out
+++ b/sql/test/subquery/Tests/subquery5.stable.out
@@ -154,6 +154,23 @@ stdout of test 'subquery5` in directory 
 % bigint # type
 % 4 # length
 [ 3702 ]
+#SELECT * FROM integers i1 LEFT OUTER JOIN integers i2 ON i2.i = ANY(SELECT 
SUM(i2.i + i3.i) FROM integers i3) = NOT EXISTS(SELECT MIN(i1.i) OVER ());
+% .i1, .i2 # table_name
+% i,   i # name
+% int, int # type
+% 1,   1 # length
+[ 1,   1       ]
+[ 1,   2       ]
+[ 1,   3       ]
+[ 2,   1       ]
+[ 2,   2       ]
+[ 2,   3       ]
+[ 3,   1       ]
+[ 3,   2       ]
+[ 3,   3       ]
+[ NULL,        1       ]
+[ NULL,        2       ]
+[ NULL,        3       ]
 #DROP FUNCTION evilfunction(INT);
 #DROP TABLE tbl_ProductSales;
 #DROP TABLE another_T;
_______________________________________________
checkin-list mailing list
checkin-list@monetdb.org
https://www.monetdb.org/mailman/listinfo/checkin-list

Reply via email to