Changeset: 2e485aca1a4e for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB/rev/2e485aca1a4e
Modified Files:
        sql/server/rel_unnest.c
        sql/test/SQLancer/Tests/sqlancer23.test
Branch: default
Log Message:

Don't copy, use reference. Still gives wrong result


diffs (26 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
@@ -959,7 +959,7 @@ push_up_project(mvc *sql, sql_rel *rel, 
                                                                        else
                                                                                
r->l = rel_add_identity(sql, r->l, &id);
                                                                }
-                                                               sql_exp *ne = 
rel_unop_(sql, NULL, exp_copy(sql, id), "sys", "isnull", card_value);
+                                                               sql_exp *ne = 
rel_unop_(sql, NULL, exp_ref(sql, id), "sys", "isnull", card_value);
                                                                
set_has_no_nil(ne);
                                                                ne = 
rel_nop_(sql, NULL, ne, exp_null(sql->sa, exp_subtype(e)), e, NULL, "sys", 
"ifthenelse", card_value);
                                                                
exp_prop_alias(sql->sa, ne, e);
diff --git a/sql/test/SQLancer/Tests/sqlancer23.test 
b/sql/test/SQLancer/Tests/sqlancer23.test
--- a/sql/test/SQLancer/Tests/sqlancer23.test
+++ b/sql/test/SQLancer/Tests/sqlancer23.test
@@ -99,6 +99,10 @@ query I nosort
 SELECT 1 FROM t0 JOIN (SELECT 1) y(y) ON 1 = (SELECT y.y FROM (SELECT 1 IN 
(SELECT 1 FROM t0)) x(x), t0 WHERE x.x)
 ----
 
+query I nosort
+SELECT 1 FROM (SELECT DISTINCT 1) y(y) WHERE EXISTS (SELECT 1 WHERE (SELECT 
y.y FROM t0 x) = 0)
+----
+
 statement ok
 ROLLBACK
 
_______________________________________________
checkin-list mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to