Changeset: 1e51b9f80307 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=1e51b9f80307
Modified Files:
        monetdb5/modules/mosaic/Tests/mosaic_linear_thetaselect.malC
        monetdb5/modules/mosaic/Tests/mosaic_linear_thetaselect.stable.out
        monetdb5/modules/mosaic/mosaic.c
Branch: mosaic
Log Message:

Set the correct BAT properties on select operator output.


diffs (244 lines):

diff --git a/monetdb5/modules/mosaic/Tests/mosaic_linear_thetaselect.malC 
b/monetdb5/modules/mosaic/Tests/mosaic_linear_thetaselect.malC
--- a/monetdb5/modules/mosaic/Tests/mosaic_linear_thetaselect.malC
+++ b/monetdb5/modules/mosaic/Tests/mosaic_linear_thetaselect.malC
@@ -21,6 +21,36 @@ mosaic.compress(b,"linear");
 b:= mosaic.decompress(b);
 io.print(b);
 
+s:= algebra.thetaselect(base,4,"<");
+io.print(s);
+xs:= mosaic.thetaselect(b,4,"<");
+io.print(xs);
+
+s:= algebra.thetaselect(base,4,"<=");
+io.print(s);
+xs:= mosaic.thetaselect(b,4,"<=");
+io.print(xs);
+
+s:= algebra.thetaselect(base,4,">");
+io.print(s);
+xs:= mosaic.thetaselect(b,4,">");
+io.print(xs);
+
+s:= algebra.thetaselect(base,4,">=");
+io.print(s);
+xs:= mosaic.thetaselect(b,4,">=");
+io.print(xs);
+
+s:= algebra.thetaselect(base,4,"==");
+io.print(s);
+xs:= mosaic.thetaselect(b,4,"==");
+io.print(xs);
+
+s:= algebra.thetaselect(base,4,"!=");
+io.print(s);
+xs:= mosaic.thetaselect(b,4,"!=");
+io.print(xs);
+
 c:= bat.new(:oid);
 bat.append(c,0@0);
 bat.append(c,3@0);
diff --git a/monetdb5/modules/mosaic/Tests/mosaic_linear_thetaselect.stable.out 
b/monetdb5/modules/mosaic/Tests/mosaic_linear_thetaselect.stable.out
--- a/monetdb5/modules/mosaic/Tests/mosaic_linear_thetaselect.stable.out
+++ b/monetdb5/modules/mosaic/Tests/mosaic_linear_thetaselect.stable.out
@@ -79,7 +79,132 @@ stdout of test 'mosaic_linear_thetaselec
 # void oid  # type
 #--------------------------#
 [ 0@0, 0@0  ]
+[ 1@0, 1@0     ]
+[ 2@0, 6@0     ]
+#--------------------------#
+# h    t  # name
+# void oid  # type
+#--------------------------#
+[ 0@0, 0@0     ]
+[ 1@0, 1@0     ]
+[ 2@0, 6@0     ]
+#--------------------------#
+# h    t  # name
+# void oid  # type
+#--------------------------#
+[ 0@0, 0@0     ]
+[ 1@0, 1@0     ]
+[ 2@0, 2@0     ]
+[ 3@0, 6@0     ]
+[ 4@0, 7@0     ]
+#--------------------------#
+# h    t  # name
+# void oid  # type
+#--------------------------#
+[ 0@0, 0@0     ]
+[ 1@0, 1@0     ]
+[ 2@0, 2@0     ]
+[ 3@0, 6@0     ]
+[ 4@0, 7@0     ]
+#--------------------------#
+# h    t  # name
+# void oid  # type
+#--------------------------#
+[ 0@0, 3@0     ]
+[ 1@0, 4@0     ]
+[ 2@0, 5@0     ]
+[ 3@0, 8@0     ]
+[ 4@0, 9@0     ]
+[ 5@0, 10@0    ]
+[ 6@0, 11@0    ]
+#--------------------------#
+# h    t  # name
+# void oid  # type
+#--------------------------#
+[ 0@0, 3@0     ]
+[ 1@0, 4@0     ]
+[ 2@0, 5@0     ]
+[ 3@0, 8@0     ]
+[ 4@0, 9@0     ]
+[ 5@0, 10@0    ]
+[ 6@0, 11@0    ]
+#--------------------------#
+# h    t  # name
+# void oid  # type
+#--------------------------#
+[ 0@0, 2@0     ]
+[ 1@0, 3@0     ]
+[ 2@0, 4@0     ]
+[ 3@0, 5@0     ]
+[ 4@0, 7@0     ]
+[ 5@0, 8@0     ]
+[ 6@0, 9@0     ]
+[ 7@0, 10@0    ]
+[ 8@0, 11@0    ]
+#--------------------------#
+# h    t  # name
+# void oid  # type
+#--------------------------#
+[ 0@0, 2@0     ]
 [ 1@0, 3@0  ]
+[ 2@0, 4@0     ]
+[ 3@0, 5@0     ]
+[ 4@0, 7@0     ]
+[ 5@0, 8@0     ]
+[ 6@0, 9@0     ]
+[ 7@0, 10@0    ]
+[ 8@0, 11@0    ]
+#--------------------------#
+# h    t  # name
+# void oid  # type
+#--------------------------#
+[ 0@0, 2@0     ]
+[ 1@0, 7@0     ]
+#--------------------------#
+# h    t  # name
+# void oid  # type
+#--------------------------#
+[ 0@0, 2@0     ]
+[ 1@0, 7@0     ]
+#--------------------------#
+# h    t  # name
+# void oid  # type
+#--------------------------#
+[ 0@0, 0@0  ]
+[ 1@0, 1@0     ]
+[ 2@0, 3@0     ]
+[ 3@0, 4@0     ]
+[ 4@0, 5@0     ]
+[ 5@0, 6@0     ]
+[ 6@0, 8@0     ]
+[ 7@0, 9@0     ]
+[ 8@0, 10@0    ]
+[ 9@0, 11@0    ]
+#--------------------------#
+# h    t  # name
+# void oid  # type
+#--------------------------#
+[ 0@0, 0@0  ]
+[ 1@0, 1@0     ]
+[ 2@0, 3@0     ]
+[ 3@0, 4@0     ]
+[ 4@0, 5@0     ]
+[ 5@0, 6@0     ]
+[ 6@0, 8@0     ]
+[ 7@0, 9@0     ]
+[ 8@0, 10@0    ]
+[ 9@0, 11@0    ]
+#--------------------------#
+# h    t  # name
+# void oid  # type
+#--------------------------#
+[ 0@0, 0@0  ]
+[ 1@0, 3@0     ]
+#--------------------------#
+# h    t  # name
+# void void  # type
+#--------------------------#
+[ 0@0, 0@0     ]
 #--------------------------#
 # h    t  # name
 # void oid  # type
@@ -87,22 +212,17 @@ stdout of test 'mosaic_linear_thetaselec
 [ 0@0, 0@0  ]
 #--------------------------#
 # h    t  # name
-# void oid  # type
+# void void  # type
 #--------------------------#
-[ 0@0, 0@0  ]
+[ 0@0, 0@0     ]
 #--------------------------#
 # h    t  # name
 # void oid  # type
 #--------------------------#
-[ 0@0, 0@0  ]
+[ 0@0, 0@0     ]
 #--------------------------#
 # h    t  # name
-# void oid  # type
-#--------------------------#
-[ 0@0, 0@0  ]
-#--------------------------#
-# h    t  # name
-# void oid  # type
+# void void  # type
 #--------------------------#
 [ 0@0, 3@0  ]
 #--------------------------#
diff --git a/monetdb5/modules/mosaic/mosaic.c b/monetdb5/modules/mosaic/mosaic.c
--- a/monetdb5/modules/mosaic/mosaic.c
+++ b/monetdb5/modules/mosaic/mosaic.c
@@ -890,16 +890,18 @@ MOSselect(Client cntxt, MalBlkPtr mb, Ma
        cnt = (BUN) (task->lb - (oid*) Tloc(bn,0));
        assert(bn->batCapacity >= cnt);
        BATsetcount(bn,cnt);
-       bn->tnil = 0;
-       bn->tnonil = 1;
-       bn->tsorted = bn->trevsorted = cnt <=1;
+       bn->tnil = false;
+       bn->tnonil = true;
+       bn->tsorted = true;
+       bn->trevsorted = cnt <=1;
+       bn->tkey = true;
+
        *getArgReference_bat(stk, pci, 0) = bn->batCacheid;
        GDKfree(task);
        BBPkeepref(bn->batCacheid);
        return msg;
 }
 
-
 str MOSthetaselect(Client cntxt, MalBlkPtr mb, MalStkPtr stk, InstrPtr pci)
 {
        int idx;
@@ -1003,9 +1005,11 @@ str MOSthetaselect(Client cntxt, MalBlkP
                BBPunfix(*cid);
        if( bn){
                BATsetcount(bn,cnt);
-               bn->tnil = 0;
-               bn->tnonil = 1;
-               bn->tsorted = bn->trevsorted = cnt <= 1;
+               bn->tnil = false;
+               bn->tnonil = true;
+               bn->tsorted = true;
+               bn->trevsorted = cnt <=1;
+               bn->tkey = true;
                BBPkeepref(*getArgReference_bat(stk,pci,0)= bn->batCacheid);
        }
        GDKfree(task);
_______________________________________________
checkin-list mailing list
[email protected]
https://www.monetdb.org/mailman/listinfo/checkin-list

Reply via email to