Bugs item #3345913, was opened at 2011-06-30 10:39
Message generated for change (Comment added) made by mozinsur
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=713730&aid=3345913&group_id=129076

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: Parser
Group: Sedna (current)
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Ilya Taranov (mozinsur)
Assigned to: Ilya Taranov (mozinsur)
Summary: Wrong physical plan generation

Initial Comment:
explain (collection("test")/*)/*

 <operation xmlns="" name="PPQueryRoot">
   <operation name="PPAbsPath" root="collection(test)" path="child::element()" 
position="5:10"/>
 </operation>


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

>Comment By: Ilya Taranov (mozinsur)
Date: 2011-06-30 10:42

Message:
The code form lr2por:

       if (n.isSuitableForAbsPath() && off_cont.opin.op) // if op ==
NULL then this axis starts a relative non-abspath XPath
       {
           if (PPAbsPath *apa = dynamic_cast<PPAbsPath
*>(off_cont.opin.op))
           {
               std::string lr;

               lr = getlrForAxisStep(n);

               off_this.opin = off_cont.opin;
               off_this.lr_path = (off_cont.lr_path + "(" + lr + ")");

               // last step: should finalize abspath
               if (n.isLast)
               {
                   finalizeAbsPath(apa, off_this.lr_path.c_str(),
pers_path_mode);
                   off_this.lr_path = "";
               }

               setOffer(off_this);

               return;
           }
       }

In my development branch I have changed it to:
(Introducing a new "bool open_abs_path" member in child offer)

        if (n.isSuitableForAbsPath() && off_cont.open_abs_path) // if op
== NULL then this axis starts a relative non-abspath XPath
        {
            PPAbsPath *apa = dynamic_cast<PPAbsPath *>(off_cont.opin.op);
            U_ASSERT(apa != NULL);
            
            std::string lr;

            lr = getlrForAxisStep(n);

            off_this.opin = off_cont.opin;
            off_this.lr_path = off_cont.lr_path + " " + lr;

            // last step: should finalize abspath
            if (n.isLast)
            {
                finalizeAbsPath(apa, off_this.lr_path.c_str(),
pers_path_mode);
                off_this.lr_path = "";
                off_this.open_abs_path = false;
            } 
            else 
            {
                off_this.open_abs_path = true;
            }

            setOffer(off_this);

            return;
        }
        else if (n.cont && off_cont.open_abs_path) // need to close
PPAbsPath
        {
            U_ASSERT(dynamic_cast<PPAbsPath *>(off_cont.opin.op) !=
NULL);
            finalizeAbsPath(dynamic_cast<PPAbsPath *>(off_cont.opin.op),
off_cont.lr_path.c_str(), pers_path_mode);
            off_this.open_abs_path = false;
        }

Other places fixed too.

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

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=713730&aid=3345913&group_id=129076

------------------------------------------------------------------------------
All of the data generated in your IT infrastructure is seriously valuable.
Why? It contains a definitive record of application performance, security 
threats, fraudulent activity, and more. Splunk takes this data and makes 
sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-d2d-c2
_______________________________________________
Sedna-discussion mailing list
Sedna-discussion@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sedna-discussion

Reply via email to