Changeset: c1b63e8e5d78 for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=c1b63e8e5d78
Modified Files:
        monetdb5/extras/jaql/jaqlgencode.c
Branch: jacqueline
Log Message:

funcs: workaround weird (GDK?) bug

If we use algebra.project(0@0, b), propcheck errors (with --debug=10)
appear:

!GDKerror:!ERROR: BATpropcheck: BAT tmpr_1151(-617)[bte,oid] with 5
tuples was incorrectly marked sorted!
!ERROR: BATpropcheck: BAT tmpr_1151(-617)[bte,oid] with 5 tuples remains
marked radix-clustered on 32 bits; not checked!

If we bat.reverse(b), algebra.project(b, 0@0), bat.reverse(b) all is
fine.


diffs (35 lines):

diff --git a/monetdb5/extras/jaql/jaqlgencode.c 
b/monetdb5/extras/jaql/jaqlgencode.c
--- a/monetdb5/extras/jaql/jaqlgencode.c
+++ b/monetdb5/extras/jaql/jaqlgencode.c
@@ -4788,12 +4788,31 @@ dumptree(jc *j, Client cntxt, MalBlkPtr 
                                                                        break;
                                                                case j_func_arg:
                                                                        a = 
dumpwalkvar(mb, a1, a5);
+                                                                       /* 
WORKAROUND: using project(0@0, b)
+                                                                        * 
causes misc propcheck errors, so
+                                                                        * 
reverse twice */
+                                                                       q = 
newInstruction(mb, ASSIGNsymbol);
+                                                                       
setModuleId(q, batRef);
+                                                                       
setFunctionId(q, reverseRef);
+                                                                       q = 
pushReturn(mb, q,
+                                                                               
        newTmpVariable(mb, TYPE_any));
+                                                                       q = 
pushArgument(mb, q, a);
+                                                                       a = 
getArg(q, 0);
+                                                                       
pushInstruction(mb, q);
                                                                        q = 
newInstruction(mb, ASSIGNsymbol);
                                                                        
setModuleId(q, algebraRef);
                                                                        
setFunctionId(q, projectRef);
                                                                        q = 
pushReturn(mb, q,
                                                                                
        newTmpVariable(mb, TYPE_any));
+                                                                       q = 
pushArgument(mb, q, a);
                                                                        q = 
pushOid(mb, q, 0);
+                                                                       a = 
getArg(q, 0);
+                                                                       
pushInstruction(mb, q);
+                                                                       q = 
newInstruction(mb, ASSIGNsymbol);
+                                                                       
setModuleId(q, batRef);
+                                                                       
setFunctionId(q, reverseRef);
+                                                                       q = 
pushReturn(mb, q,
+                                                                               
        newTmpVariable(mb, TYPE_any));
                                                                        q = 
pushArgument(mb, q, a);
                                                                        a = 
getArg(q, 0);
                                                                        
pushInstruction(mb, q);
_______________________________________________
Checkin-list mailing list
[email protected]
http://mail.monetdb.org/mailman/listinfo/checkin-list

Reply via email to