Bugs item #2461857, was opened at 2008-12-23 16:57 Message generated for change (Comment added) made by tsheyar You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=482468&aid=2461857&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: 1 Private: No Submitted By: marspluto (juntezhang) Assigned to: Jan Rittinger (tsheyar) Summary: Error: !fatal error: Algebra implementation for function `#p Initial Comment: I upgraded to the latest stable version, because I wanted to use the standard XQuery algebra, but when I execute a query, I get this error: Error: !fatal error: Algebra implementation for function `#pf:string-value' is missing. To prove that I am indeed using the latest stable version: # MonetDB Server v4.26.2 # based on GDK v1.26.2 # Copyright (c) 1993-July 2008, CWI. All rights reserved. # Copyright (c) August 2008-, MonetDB B.V.. All rights reserved. # Compiled for i686-pc-linux-gnu/32bit with 32bit OIDs; dynamically linked. # Visit http://monetdb.cwi.nl/ for further information. # PF/Tijah module v0.9.0 loaded. http://dbappl.cs.utwente.nl/pftijah # MonetDB/XQuery module v0.26.2 loaded (default back-end is 'algebra') # XRPC administrative console at http://127.0.0.1:50001/admin I installed it from CVS. This problem does not occur when I use the milprint_summer backend. ---------------------------------------------------------------------- >Comment By: Jan Rittinger (tsheyar) Date: 2008-12-24 11:07 Message: I won't fix this problem in the next months to come as you can avoid your problem. The problem here is function pftijah:nodes that returns the most generic type (node) which you then use with normalize-space (line 31 of your query – that triggers the string-value lookup). You can avoid the problem by wrapping the return clause of the for loop over $nodes in a typeswitch that checks for the respective node-kinds (here e.g., 'typeswitch ($node) case $elem-node as element(ead) return '[$node/$elem-node]...' default return error ("unexpected node")'). ---------------------------------------------------------------------- Comment By: marspluto (juntezhang) Date: 2008-12-23 23:51 Message: Oops, the correct query and an instance of my data has been attached. junte File Added: bug.zip ---------------------------------------------------------------------- Comment By: Stefan Manegold (stmane) Date: 2008-12-23 19:04 Message: Is you query correct? I get parse error: syntax error, unexpected { on line 9, column 46 (next token is `{') parse error: XQuery parsing failed In case the SF bug tracker text rendering messes things up, please feel free to attach you query as file to the bug report... ---------------------------------------------------------------------- Comment By: marspluto (juntezhang) Date: 2008-12-23 18:55 Message: Stefan, thanks! If Jan needs more information, please let me know. I really would like to switch to algebra.... junte ---------------------------------------------------------------------- Comment By: Stefan Manegold (stmane) Date: 2008-12-23 18:48 Message: Junte, could you please file a separate bug report for the milprint_summer case (one bug per bug report / one bug report per bug ;-)), indicating that is appears to be a PF/tijah problem (the same seems to hold for the pf:string-value error reported here), and assign it to Jan Flokstra (jflokstra)? Thanks! Stefan ---------------------------------------------------------------------- Comment By: marspluto (juntezhang) Date: 2008-12-23 18:35 Message: This is the query: declare function tijah:getINEXPath ( $node as node() ) as xs:string { let $pathelements := for $a in $node/ancestor-or-self::* return if ( name($a) = "ead" ) then "/ead[1]" else concat(name($a), "[" , count($a/preceding-sibling::*[name()=name($a)]) + 1, "]") return string-join( $pathelements, "/" ) }; let $options := let $start := 1 let $end := 24 let $query_text := tijah:tokenize("groningen") let $query_nexi := concat("//ead[about(., ", $query_text, ")]") let $qid := tijah:queryall-id($query_nexi, $options) let $nodes := tijah:nodes($qid) let $result := for $node in $nodes return { data($node/ancestor-or-self::ead/@file) } { tijah:getINEXPath($node) } { $node/normalize-space() } let $total := count($result) return { for $res at $rankGlobal in $result where( $rankGlobal >= $start and $rankGlobal <= $end ) return { $res } } When I use milprint_summer, I am also getting another error after executing the query the 2nd time: ERROR = !ERROR: interpret: no matching MIL operator to 'tj_query_handler(bit, BAT[void,BAT], BAT[oid,BAT], BAT[void,BAT], BAT[oid,oid], BAT[oid,BAT], BAT[oid,lng], BAT[oid,dbl], BAT[oid,str], void)'. !MAYBE YOU MEAN: ! tj_query_handler(bit, BAT[void,BAT], BAT[void,BAT], BAT[void,BAT], BAT[oid,any], BAT[oid,BAT], BAT[void,lng], BAT[void,dbl], BAT[void,str], BAT[void,BAT]) : BAT[void,BAT] When I restart the Mserver, I can again query 1 time, and then I am getting that error again. So nothing works for me anymore, neither milprint_summer nor algebra. ---------------------------------------------------------------------- Comment By: Stefan Manegold (stmane) Date: 2008-12-23 17:15 Message: Just for info, the code says: ======== /** * Build up operator tree for built-in function '#pf:string-value'. */ struct PFla_pair_t PFbui_pf_string_value (const PFla_op_t *loop, bool ordering, struct PFla_pair_t *args) { /* We cannot cope with a mix of certain node kinds. E.g. comments and element nodes are not distinguishable in the algebra but still require a different treating in the backend. One solution could be to get all nodes with desc-or-self::text() U attribute::* U self::pi() U self::comment and then have a universal doc_access operator kind that can cope with all these kinds. The nicest solution however seems to be C primitive in the runtime that implements string-value. (This would make the algebra a lot easier to read and optimize.) */ PFoops (OOPS_FATAL, "Algebra implementation for function " "`#pf:string-value' is missing."); (void) loop; (void) ordering; return args[0]; } ======== The question is, which XQuer(y|ies) (on what kind of data/document(s)) do(es) trigger this error? (And why?) ---------------------------------------------------------------------- Comment By: Stefan Manegold (stmane) Date: 2008-12-23 17:04 Message: Which XQuer(y|ies) do trigger this error? ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=482468&aid=2461857&group_id=56967 ------------------------------------------------------------------------------ _______________________________________________ Monetdb-bugs mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/monetdb-bugs
