Bugs item #3345913, was opened at 2011-06-30 10:39
Message generated for change (Settings changed) 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: Closed
>Resolution: Fixed
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
------------------------------------------------------------------------------
Got Input? Slashdot Needs You.
Take our quick survey online. Come on, we don't ask for help often.
Plus, you'll get a chance to win $100 to spend on ThinkGeek.
http://p.sf.net/sfu/slashdot-survey
_______________________________________________
Sedna-discussion mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/sedna-discussion