Bugs item #2716743, was opened at 2009-03-27 12:01
Message generated for change (Comment added) made by tsheyar
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=482468&aid=2716743&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 "stable"
Status: Open
Resolution: None
>Priority: 2
Private: No
Submitted By: Wouter Alink (vzzzbx)
Assigned to: Jan Rittinger (tsheyar)
Summary: PF: pf:string-value missing

Initial Comment:
The following error occurs for the query below:

$ ~/opt/MonetDB-Feb2009/bin/pf ../bugs/no_string_value_implementation.xq
fatal error: Algebra implementation for function `#pf:string-value' is missing.

What I tried:
- specify the return type of the function: "as node()*" (which does not work)
- specify the return type of the function: "as element()*" (which works fine)
- inline the function in the query "let $items :=  $patents//country" (works 
fine too)

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

declare function do($nodes as node()*) {
  $nodes//country
};

let $countries := ("NL","DE","UK")
let $patents := (<entry><country>NL</country></entry>,
                 <entry><country>DE</country></entry>)
  let $items :=  do($patents)
  for $i at $k in $items
  let $country := $countries[. = $i] 
  return element { "entry" } { $i, $country }


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

>Comment By: Jan Rittinger (tsheyar)
Date: 2009-04-07 14:07

Message:
Currently we only resolve string-value if (at compile time) we can derive a
type for which we have a translation on the MIL level. As there is no code
that can provide the string-value of mixed node sequences an error is
generated.

A solution which (almost) always helps is a stricter return type for UDFs.

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

Comment By: Peter Boncz (boncz)
Date: 2009-04-07 13:38

Message:
it is interesting that there is a difference between node() and element()

Jan, any idea?

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

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

------------------------------------------------------------------------------
This SF.net email is sponsored by:
High Quality Requirements in a Collaborative Environment.
Download a free trial of Rational Requirements Composer Now!
http://p.sf.net/sfu/www-ibm-com
_______________________________________________
Monetdb-bugs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/monetdb-bugs

Reply via email to