Bugs item #1759552, was opened at 2007-07-24 13:07
Message generated for change (Comment added) made by arthurvb
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=482468&aid=1759552&group_id=56967

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: PF/compiler
Group: Pathfinder CVS Head
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Arthur van Bunningen (arthurvb)
Assigned to: Nobody/Anonymous (nobody)
Summary: Mil optimizer bug

Initial Comment:
When executing attached query (ca_module.xq) monetdb returns the following 
error:

==========================
8272 8273 8274 8275 8276 8277 8278 8279 8280 8281 8282 8283 8284 8285 8286 8287 
8288 8289 8290 8291 8292 8293 8294 8295 8296 8297 8298 8299 8300 8301 8302 8303 
8304 8305 8306 8307 8308 8309 8310 8311 8312 8313 8314 8315 8316 8317 8318 8319 
8320 8321 8322 8323 8324 8325 8326 8327 8328 8329 8332 8333 8334 8335 8336 8337 
8338 8339 19080 19081 19082 19083 19084 19085 19086 !ERROR: interpret: no 
matching MIL operator to 'leftjoin(void, BAT[oid,oid])'.
MAPI  = [EMAIL PROTECTED]:50000
QUERY = printf("1 ");
        var tID := [EMAIL PROTECTED]; # start counter at an arbitrary number
        printf("2 ");
        var tijah_tID   := new(void,oid).seqbase([EMAIL PROTECTED]);
        printf("3 ");
        var tijah_frag  := new(void,oid).seqbase([EMAIL PROTECTED]);
        printf("4 ");
        var tijah_pre   := new(void,oid).seqbase([EMAIL PROTECTED]);
        printf("5 ");
        var tijah_score := new(void,dbl).seqbase([EMAIL PROTECTED]);
        printf("6 ");
        var tijah_resultsz := new(lng,lng);
        printf("7 ");
        var tijah_lock  := lock_nil; # pftijah collection lock
        printf("8 ");
        module("probxml");
        printf("9 ");
        var newid_counter := 1LL; # va
ERROR = !MAYBE YOU MEAN:
        !       leftjoin(BAT[any::1,any::2], BAT[any::2,any::3]) : 
BAT[any::1,any::3]
        !       leftjoin(any::1, BAT[any::1,any::2]) : any::2
        !       leftjoin(oid, any::1) : any::1
        !       leftjoin(BAT[void,oid], any::1) : any::1
        !       leftjoin(BAT[oid,oid], any::1) : BAT[oid,any::1]
==========================

This happens in the following code:
==========================

                                             { # expand ()
printf("8326 ");
                                              var expOid_iter := 
expOid.leftfetchjoin(v_iter009);
printf("8327 ");
                                              var iter_expOid := 
expOid_iter.reverse();
printf("8328 ");
                                              var oidMap_expOid := 
outer010.chk_order().leftjoin(iter_expOid.chk_order());
printf("8329 ");
                                              if 
(not(ordered(reverse(outer010)) and ordered(iter_expOid) and                    
     ordered(reverse(iter_expOid)))) {
printf("8330 ");
                                               var temp_sort := 
oidMap_expOid.hmark([EMAIL PROTECTED]).CTrefine(oidMap_expOid.tmark([EMAIL 
PROTECTED])).mirror();
printf("8331 ");
                                              }
printf("8332 ");
                                              var expOid_oidMap := 
oidMap_expOid.reverse();
printf("8333 ");
                                              v_iter010 := expOid_iter;
printf("8334 ");
                                             } # end of expand ()
printf("8335 ");
                                             # join ()
printf("8336 ");
                                             var cnt := count(v_iter010)*2;
printf("8337 ");
                                             var new_v_iter := v_iter010;
printf("8338 ");
                                             v_iter010 := 
bat(void,oid,cnt).seqbase([EMAIL 
PROTECTED]).access(BAT_APPEND).append(new_v_iter);
printf("8339 ");
                                             var new_v_vid := 
oidNew_expOid.leftjoin(v_vid009);
==========================


Further inspection learns that this is caused by the "oidNew_expOid" variable 
which is not initialized.
When looking at the code in mil_print_summer for expand  and join I saw the 
initialization code is generated but seems to be optimized out by the mil_opt 
optimizer in compiler/mil/mil_opt.c . When running the compiler without 
optimizer the query runs fine.

Attachements:
ca_module.xq : the query
mil_opt.mil : the optimized code which fails (generated with extra line numbers 
for debugging)
mil_not_opt.mil : the non-optimized code which succeeds.

----------------------------------------------------------------------

>Comment By: Arthur van Bunningen (arthurvb)
Date: 2007-07-24 13:08

Message:
Logged In: YES 
user_id=1045637
Originator: YES

File Added: mil_opt.mil.gz

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=482468&aid=1759552&group_id=56967

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
_______________________________________________
Monetdb-bugs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/monetdb-bugs

Reply via email to