The problem was that the udf body is a general flwor expr. The index
join rule is not supposed to work for general flwors (yet), but it was
not completely insulated against gflwors.

** Changed in: zorba
       Status: New => Fix Committed

You received this bug notification because you are a member of Zorba
Coders, which is the registrant for Zorba.

  Assertion failure flworExpr!=__null in index_join_rule.cpp

Status in Zorba - The XQuery Processor:
  Fix Committed

Bug description:
  The following query generates an assertion failure in
  index_join_rule.cpp :

~/work/xquery_temp1/src/compiler/rewriter/rules/index_join_rule.cpp:671: void 
zorba::findFlworForVar(zorba::RewriterContext&, const zorba::var_expr*, 
zorba::flwor_expr*&, zorba::sequential_expr*&, ulong&, ulong&): Assertion 
`flworExpr != __null' failed.
  ./ line 11: 31507 Aborted                 $ZORBA_BINARY 
--optimization-level O1 -z "omit-xml-declaration=yes" -z "indent=yes" -f -q 

  declare namespace l = "l";

  declare variable $page as node()* := ();
  declare variable $old_list as node()* := ();
  declare variable $lastPageNum as xs:integer := 0;

  declare function l:getLastPage($page as node()*) as xs:integer
    let $pageNum := $page[last()]
    return if (count($pageNum) eq 0)
           then -1
           else 1

  set $lastPageNum := l:getLastPage($page);

  for $rec in $page
    let $id as xs:string := $rec
    let $old_rec := $old_list[id/text() eq $id]
  return ();

To manage notifications about this bug go to:

Mailing list:
Post to     :
Unsubscribe :
More help   :

Reply via email to