Changeset: abd15225308f for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=abd15225308f
Modified Files:
        sql/backends/monet5/rel_bin.c
        sql/test/SQLancer/Tests/sqlancer11.test
Branch: default
Log Message:

Don't be so restricitve, as there is no backend code for batcalc.between with 
constant l, generate a constant column whenever possible


diffs (32 lines):

diff --git a/sql/backends/monet5/rel_bin.c b/sql/backends/monet5/rel_bin.c
--- a/sql/backends/monet5/rel_bin.c
+++ b/sql/backends/monet5/rel_bin.c
@@ -1267,9 +1267,8 @@ exp_bin(backend *be, sql_exp *e, stmt *l
                                s = stmt_join(be, l, r, is_anti(e), 
(comp_type)e->flag, 0, is_semantics(e), false);
                        }
                } else {
-                       if (r2) { /* handle all cases in stmt_uselect,
-                                                reducing, non reducing, scalar 
etc */
-                               if (l->nrcols == 0 && left && left->nrcols > 0)
+                       if (r2) { /* handle all cases in stmt_uselect, 
reducing, non reducing, scalar etc */
+                               if (l->nrcols == 0 && left)
                                        l = stmt_const(be, bin_first_column(be, 
left), l);
                                s = stmt_uselect2(be, l, r, r2, 
(comp_type)e->flag, sel, is_anti(e), reduce);
                        } else {
diff --git a/sql/test/SQLancer/Tests/sqlancer11.test 
b/sql/test/SQLancer/Tests/sqlancer11.test
--- a/sql/test/SQLancer/Tests/sqlancer11.test
+++ b/sql/test/SQLancer/Tests/sqlancer11.test
@@ -879,11 +879,10 @@ statement ok
 START TRANSACTION
 
 statement ok
-CREATE TABLE "sys"."t1" ("c0" VARCHAR(127) NOT NULL,"c2" BOOLEAN,"c3" 
DOUBLE,"c4" REAL,"c5" DECIMAL(18,3) DEFAULT 0.665794, "c7" DECIMAL(18,3),"c8"  
BIGINT,"c9" BOOLEAN,"c10" REAL NOT NULL,
-       "c11" BIGINT NOT NULL,"c12" TINYINT NOT NULL,CONSTRAINT 
"t1_c11_c12_c0_pkey" PRIMARY KEY ("c11", "c12", "c0"),CONSTRAINT 
"t1_c2_c0_unique" UNIQUE ("c2", "c0"),CONSTRAINT "t1_c0_c2_c3_c4_unique" UNIQUE 
("c0", "c2", "c3", "c4"))
+CREATE TABLE "sys"."t1" ("c0" VARCHAR(127),"c2" BOOLEAN,"c3" DOUBLE,"c4" 
REAL,"c5" DECIMAL(18,3),"c7" DECIMAL(18,3),"c8" BIGINT,"c9" BOOLEAN,"c10" 
REAL,"c11" BIGINT,"c12" TINYINT)
 
 statement ok
-CREATE TABLE "sys"."t2" ("c2" UUID NOT NULL,CONSTRAINT "t2_c2_pkey" PRIMARY 
KEY ("c2"),CONSTRAINT "t2_c2_unique" UNIQUE ("c2"))
+CREATE TABLE "sys"."t2" ("c2" UUID)
 
 statement ok
 INSERT INTO "sys"."t2" VALUES ('5a8f807e-47aa-3ddd-9b12-65ec99aa6b89'), 
('adb2afe1-0aff-5af0-aee1-bf5dfdafcdaf'), 
('4b9d0cdd-fd79-ac10-8ab5-6dd3dddebd8a')
_______________________________________________
checkin-list mailing list
checkin-list@monetdb.org
https://www.monetdb.org/mailman/listinfo/checkin-list

Reply via email to