Changeset: 1121bd0ace40 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=1121bd0ace40
Modified Files:
        sql/backends/monet5/sql_statement.c
        sql/test/miscellaneous/Tests/simple_plans.stable.out
        sql/test/miscellaneous/Tests/simple_plans.stable.out.single
Branch: Oct2020
Log Message:

Only push semantics flag if that's the case. Also use GDK macros for thetajoin 
mappings


diffs (77 lines):

diff --git a/sql/backends/monet5/sql_statement.c 
b/sql/backends/monet5/sql_statement.c
--- a/sql/backends/monet5/sql_statement.c
+++ b/sql/backends/monet5/sql_statement.c
@@ -2035,7 +2035,7 @@ stmt_join_cand(backend *be, stmt *op1, s
                else
                        q = pushArgument(mb, q, rcand->nr);
                q = pushInt(mb, q, JOIN_NE);
-               q = pushBit(mb, q, FALSE);
+               q = pushBit(mb, q, is_semantics?TRUE:FALSE);
                q = pushNil(mb, q, TYPE_lng);
                if (q == NULL)
                        return NULL;
@@ -2057,14 +2057,14 @@ stmt_join_cand(backend *be, stmt *op1, s
                else
                        q = pushArgument(mb, q, rcand->nr);
                if (cmptype == cmp_lt)
-                       q = pushInt(mb, q, -1);
+                       q = pushInt(mb, q, JOIN_LT);
                else if (cmptype == cmp_lte)
-                       q = pushInt(mb, q, -2);
+                       q = pushInt(mb, q, JOIN_LE);
                else if (cmptype == cmp_gt)
-                       q = pushInt(mb, q, 1);
+                       q = pushInt(mb, q, JOIN_GT);
                else if (cmptype == cmp_gte)
-                       q = pushInt(mb, q, 2);
-               q = pushBit(mb, q, TRUE);
+                       q = pushInt(mb, q, JOIN_GE);
+               q = pushBit(mb, q, is_semantics?TRUE:FALSE);
                q = pushNil(mb, q, TYPE_lng);
                if (q == NULL)
                        return NULL;
diff --git a/sql/test/miscellaneous/Tests/simple_plans.stable.out 
b/sql/test/miscellaneous/Tests/simple_plans.stable.out
--- a/sql/test/miscellaneous/Tests/simple_plans.stable.out
+++ b/sql/test/miscellaneous/Tests/simple_plans.stable.out
@@ -523,25 +523,25 @@ barrier X_133:bit := language.dataflow()
     C_12:bat[:oid] := sql.tid(X_4:int, "sys":str, "another_t":str);
     X_14:bat[:int] := sql.bind(X_4:int, "sys":str, "another_t":str, 
"col1":str, 0:int);
     X_16:bat[:int] := algebra.projection(C_12:bat[:oid], X_14:bat[:int]);
-    X_99:bat[:oid] := algebra.thetajoin(X_95:bat[:int], X_16:bat[:int], 
nil:BAT, nil:BAT, 1:int, true:bit, nil:lng);
+    X_99:bat[:oid] := algebra.thetajoin(X_95:bat[:int], X_16:bat[:int], 
nil:BAT, nil:BAT, 1:int, false:bit, nil:lng);
     X_107:bat[:int] := algebra.projection(X_99:bat[:oid], X_95:bat[:int]);
     X_115:bat[:bte] := algebra.project(X_107:bat[:int], 1:bte);
     C_81:bat[:oid] := sql.tid(X_4:int, "sys":str, "another_t":str, 1:int, 
4:int);
     X_91:bat[:int] := sql.bind(X_4:int, "sys":str, "another_t":str, 
"col1":str, 0:int, 1:int, 4:int);
     X_96:bat[:int] := algebra.projection(C_81:bat[:oid], X_91:bat[:int]);
-    X_101:bat[:oid] := algebra.thetajoin(X_96:bat[:int], X_16:bat[:int], 
nil:BAT, nil:BAT, 1:int, true:bit, nil:lng);
+    X_101:bat[:oid] := algebra.thetajoin(X_96:bat[:int], X_16:bat[:int], 
nil:BAT, nil:BAT, 1:int, false:bit, nil:lng);
     X_108:bat[:int] := algebra.projection(X_101:bat[:oid], X_96:bat[:int]);
     X_116:bat[:bte] := algebra.project(X_108:bat[:int], 1:bte);
     C_83:bat[:oid] := sql.tid(X_4:int, "sys":str, "another_t":str, 2:int, 
4:int);
     X_92:bat[:int] := sql.bind(X_4:int, "sys":str, "another_t":str, 
"col1":str, 0:int, 2:int, 4:int);
     X_97:bat[:int] := algebra.projection(C_83:bat[:oid], X_92:bat[:int]);
-    X_103:bat[:oid] := algebra.thetajoin(X_97:bat[:int], X_16:bat[:int], 
nil:BAT, nil:BAT, 1:int, true:bit, nil:lng);
+    X_103:bat[:oid] := algebra.thetajoin(X_97:bat[:int], X_16:bat[:int], 
nil:BAT, nil:BAT, 1:int, false:bit, nil:lng);
     X_109:bat[:int] := algebra.projection(X_103:bat[:oid], X_97:bat[:int]);
     X_117:bat[:bte] := algebra.project(X_109:bat[:int], 1:bte);
     C_85:bat[:oid] := sql.tid(X_4:int, "sys":str, "another_t":str, 3:int, 
4:int);
     X_93:bat[:int] := sql.bind(X_4:int, "sys":str, "another_t":str, 
"col1":str, 0:int, 3:int, 4:int);
     X_98:bat[:int] := algebra.projection(C_85:bat[:oid], X_93:bat[:int]);
-    X_105:bat[:oid] := algebra.thetajoin(X_98:bat[:int], X_16:bat[:int], 
nil:BAT, nil:BAT, 1:int, true:bit, nil:lng);
+    X_105:bat[:oid] := algebra.thetajoin(X_98:bat[:int], X_16:bat[:int], 
nil:BAT, nil:BAT, 1:int, false:bit, nil:lng);
     X_110:bat[:int] := algebra.projection(X_105:bat[:oid], X_98:bat[:int]);
     X_118:bat[:bte] := algebra.project(X_110:bat[:int], 1:bte);
     X_127:bat[:bte] := mat.packIncrement(X_115:bat[:bte], 4:int);
diff --git a/sql/test/miscellaneous/Tests/simple_plans.stable.out.single 
b/sql/test/miscellaneous/Tests/simple_plans.stable.out.single
--- a/sql/test/miscellaneous/Tests/simple_plans.stable.out.single
+++ b/sql/test/miscellaneous/Tests/simple_plans.stable.out.single
@@ -397,7 +397,7 @@ function user.main():void;
     C_5:bat[:oid] := sql.tid(X_4:int, "sys":str, "another_t":str);
     X_11:bat[:int] := sql.bind(X_4:int, "sys":str, "another_t":str, 
"col1":str, 0:int);
     X_15:bat[:int] := algebra.projection(C_5:bat[:oid], X_11:bat[:int]);
-    X_17:bat[:oid] := algebra.thetajoin(X_15:bat[:int], X_15:bat[:int], 
nil:BAT, nil:BAT, 1:int, true:bit, nil:lng);
+    X_17:bat[:oid] := algebra.thetajoin(X_15:bat[:int], X_15:bat[:int], 
nil:BAT, nil:BAT, 1:int, false:bit, nil:lng);
     X_24:bat[:int] := algebra.projection(X_17:bat[:oid], X_15:bat[:int]);
     X_28:bat[:bte] := algebra.project(X_24:bat[:int], 1:bte);
     sql.resultSet(X_30:bat[:str], X_31:bat[:str], X_32:bat[:str], 
X_33:bat[:int], X_34:bat[:int], X_28:bat[:bte]);
_______________________________________________
checkin-list mailing list
checkin-list@monetdb.org
https://www.monetdb.org/mailman/listinfo/checkin-list

Reply via email to