Bugs item #1871789, was opened at 2008-01-15 09:35
Message generated for change (Comment added) made by vzzzbx
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=482468&aid=1871789&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: Fixed
Priority: 5
Private: No
Submitted By: Wouter Alink (vzzzbx)
Assigned to: Wouter Alink (vzzzbx)
Summary: XQ: substitution fails
Initial Comment:
The following query did not compile (on a "--nightly=current" build of last
week) using "pf -A"
element { "a" }{
for $a in doc("x.xml")//a
let $m := distinct-values($a//d)
for $q in distinct-values($a//c[d])
for $r in $m
where some $x in $a//c satisfies $x[e/d[contains(.,$r)] and a=$q]
return element { "a" } { $a//c }
}
the query returns: "fatal error: attribute `(NULL)' referenced in selection not
found"
however it does compile if the query is rewritten to: (in which $m is
substituted):
element { "a" }{
for $a in doc("x.xml")//a
for $q in distinct-values($a//c[d])
for $r in distinct-values($a//d)
where some $x in $a//c satisfies $x[e/d[contains(.,$r)] and a=$q]
return element { "a" } { $a//c }
}
----------------------------------------------------------------------
>Comment By: Wouter Alink (vzzzbx)
Date: 2008-01-16 22:21
Message:
Logged In: YES
user_id=621590
Originator: YES
i don't have a document for the query (i thought it was just a
query-compiler issue, which i narrowed down to the mentioned query. could
we at a test in pathfinder/src/compiler (only checking compilation). (same
goes for the other bug)
lately i haven't checked out and compiled monetdb from cvs (i try to use
nightly builds as much as possible). jan, if you could just add the query
to the repository (as a compilation test), i would very much appreciate it.
----------------------------------------------------------------------
Comment By: Jan Rittinger (tsheyar)
Date: 2008-01-15 12:52
Message:
Logged In: YES
user_id=993208
Originator: NO
hmm sf still has the back button problems...
Wouter could you please provide the XML document and the output (perhaps
even add the test :-)).
----------------------------------------------------------------------
Comment By: Jan Rittinger (tsheyar)
Date: 2008-01-15 12:48
Message:
Logged In: YES
user_id=993208
Originator: NO
Fixed in CVS. This bug was due to a bug in the thetajoin optimization
phase.
@Wouter: For our compiler the two queries are different as
'distinct-values($a//d)' is evaluated in different scopes ($a vs $q).
----------------------------------------------------------------------
Comment By: Stefan Manegold (stmane)
Date: 2008-01-15 11:41
Message:
Logged In: YES
user_id=572415
Originator: NO
Re-opened to remind us that we should add a test (also) for this one.
(Should be trivial ...)
----------------------------------------------------------------------
Comment By: Jan Rittinger (tsheyar)
Date: 2008-01-15 11:39
Message:
Logged In: YES
user_id=993208
Originator: NO
Fixed in CVS. This bug was due to a bug in the thetajoin optimization
phase.
@Wouter: For our compiler the two queries are different as
'distinct-values($a//d)' is evaluated in different scopes ($a vs $q).
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=482468&aid=1871789&group_id=56967
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Monetdb-bugs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/monetdb-bugs